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:
15
Test/pointCoord.frag
Normal file
15
Test/pointCoord.frag
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user