View Single Post
  #2  
Old 08-01-2016, 07:29 PM
Vaquero Vaquero is offline
Member
 
Join Date: Nov 2015
Posts: 62
Could someone please post a simple example that shows how to access the variables for normal, eyevec, viewDir etc. in a custom GLSL fragment shader?
The make-it-all-red sample in the documentation isn't helping:
Code:
fragCode = """
void main()
{
    gl_FragColor = vec4(1.0,0.0,0.0,1.0);
}
"""

shader = viz.addShader(frag=fragCode)
That's just TOO simple.
Reply With Quote