[require] GLSL >= 1.10 [vertex shader] varying float x; void main() { gl_Position = gl_Vertex; x = (gl_Vertex.x + 1.0) / 2.0 + 1.0 - 1.0 / 256.0; } [fragment shader] varying float x; void main() { gl_FragColor = vec4(log(x)); } [test] draw rect -1 -1 2 2 relative probe rgba (0.0, 0.5) (0.000, 0.000, 0.000, 0.000) relative probe rgba (0.1, 0.5) (0.095, 0.095, 0.095, 0.095) relative probe rgba (0.2, 0.5) (0.182, 0.182, 0.182, 0.182) relative probe rgba (0.3, 0.5) (0.262, 0.262, 0.262, 0.262) relative probe rgba (0.4, 0.5) (0.336, 0.336, 0.336, 0.336) relative probe rgba (0.5, 0.5) (0.405, 0.405, 0.405, 0.405) relative probe rgba (0.6, 0.5) (0.470, 0.470, 0.470, 0.470) relative probe rgba (0.7, 0.5) (0.531, 0.531, 0.531, 0.531) relative probe rgba (0.8, 0.5) (0.588, 0.588, 0.588, 0.588) relative probe rgba (0.9, 0.5) (0.642, 0.642, 0.642, 0.642) relative probe rgba (1.0, 0.5) (0.693, 0.693, 0.693, 0.693)