OpenGL: one more point shader
Added a built-in shader for points that vary both size and color.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
|
||||
#if __VERSION__ == 120
|
||||
attribute vec3 pos;
|
||||
attribute float size;
|
||||
attribute vec4 color;
|
||||
varying vec4 finalColor;
|
||||
#else
|
||||
in vec3 pos;
|
||||
in float size;
|
||||
in vec4 color;
|
||||
out vec4 finalColor;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0);
|
||||
gl_PointSize = size;
|
||||
finalColor = color;
|
||||
}
|
||||
Reference in New Issue
Block a user