PDA

View Full Version : NURBS and GLSL



alexxi
06-20-2015, 03:19 PM
I achieved NURBS texture mapping and lighting using the OpenGL fixed function pipeline. I am wondering if anyone has hints on how I can do this using GLSL vertex and fragment shaders?

GClements
06-20-2015, 03:51 PM
You can use a tessellation shader (OpenGL 4+), or a compute shader (OpenGL 4.3+), or you can render a tessellated mesh where the vertex attributes consist solely of parametric (UV) coordinates and calculate the actual attributes (position, normal, texture coordinates, etc) in a vertex shader.