WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   passthrough fragment shader (https://forum.worldviz.com/showthread.php?t=5844)

dcnieho 09-13-2016 11:44 AM

passthrough fragment shader
 
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.

Code:

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

fragment shader instead of None above:
Code:

void main()
{
        gl_FragColor = gl_Color;
}

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


All times are GMT -7. The time now is 01:09 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC