OpenGL: Convert drawobject.c (cont)
Particle system (not edit mode)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
uniform vec3 light;
|
||||
|
||||
#if __VERSION__ == 120
|
||||
varying vec3 normal;
|
||||
varying vec4 finalColor;
|
||||
#define fragColor gl_FragColor
|
||||
#else
|
||||
in vec3 normal;
|
||||
in vec4 finalColor;
|
||||
out vec4 fragColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = finalColor * max(0.0, dot(normalize(normal), light));
|
||||
}
|
||||
Reference in New Issue
Block a user