Search code examples
openglglslderivative

Using lines and derivatives instructions


I'd like to know if derivatives in glsl are working on GL_LINES primitives.

AFAIK OpenGL implementations perform a discrete approximation on a group of 4 pixels (2x2 pixel quad) to compute derivative. Could it be possible to make them work on 1 pixel width lines?


Solution

  • Yes, mipmapping and derivatives work on line primitives.