OpenGL: one more point shader

Added a built-in shader for points that vary both size and color.
This commit is contained in:
2016-10-01 17:32:29 -04:00
parent 5753a1462f
commit 875d63ccb5
4 changed files with 36 additions and 0 deletions

View File

@@ -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;
}