PDA

View Full Version : passthrough fragment shader


dcnieho
09-13-2016, 11:44 AM
I am trying to do a bit of vertex (and hopefully geometry) shading with the vertices of a node. Specifying a shader program with no fragment shader, or specifying the below fragment shader however both lead to color of the node being discarded.


obj = vizshape.addSphere()
shader = viz.addShader(vert=getVertexCode(),frag=None)
obj.apply(shader)


fragment shader instead of None above:

void main()
{
gl_FragColor = gl_Color;
}


Could you let me know what the passthrough vertex shader should look like in this case?