Add gl_PointCoord.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20510 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-02-08 22:54:14 +00:00
parent 38c507e75a
commit 6968b823ef
6 changed files with 44 additions and 12 deletions

15
Test/pointCoord.frag Normal file
View File

@@ -0,0 +1,15 @@
precision mediump float;
uniform sampler2D sampler;
void main()
{
vec4 color;
if (length(gl_PointCoord) < 0.3)
color = texture2D(sampler, gl_PointCoord);
else
color = vec4(0.0);
gl_FragColor = color;
}