From c672560f6815986879d87d4886cd1bad292a3cee Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 13 Mar 2021 13:51:25 +0200 Subject: [PATCH] Add declarations for some more builtin variables --- builtin_data/_builtin.glsl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/builtin_data/_builtin.glsl b/builtin_data/_builtin.glsl index b7737356..61e7519f 100644 --- a/builtin_data/_builtin.glsl +++ b/builtin_data/_builtin.glsl @@ -451,9 +451,12 @@ vec4 texelFetch(sampler2DArray sampler, ivec3 P, int lod); // END BUILTIN FUNCTIONS #pragma MSP stage(vertex) +in int gl_VertexID; +in int gl_InstanceID; out gl_PerVertex { vec4 gl_Position; + float gl_PointSize; float gl_ClipDistance[]; }; @@ -461,13 +464,18 @@ out gl_PerVertex in gl_PerVertex { vec4 gl_Position; + float gl_PointSize; float gl_ClipDistance[]; } gl_in[]; +in int gl_PrimitiveIDIn; out gl_PerVertex { vec4 gl_Position; + float gl_PointSize; float gl_ClipDistance[]; }; +out int gl_PrimitiveID; +out int gl_Layer; void EmitVertex(); void EndPrimitive(); @@ -523,3 +531,13 @@ vec2 interpolateAtOffset(vec2 interpolant, vec2 offset); vec3 interpolateAtOffset(vec3 interpolant, vec2 offset); vec4 interpolateAtOffset(vec4 interpolant, vec2 offset); // END BUILTIN FRAGMENT FUNCTIONS + +in vec4 gl_FragCoord; +in bool gl_FrontFacing; +in float gl_ClipDistance[]; +in vec2 gl_PointCoord; +in int gl_PrimitiveID; +in int gl_SampleID; +in vec2 gl_SamplePosition; +in int gl_Layer; +out float gl_FragDepth; -- 2.45.2