diff --git a/src/front/glsl/variables.rs b/src/front/glsl/variables.rs index 529036caa8..cec46cdfff 100644 --- a/src/front/glsl/variables.rs +++ b/src/front/glsl/variables.rs @@ -100,8 +100,27 @@ impl Program<'_> { }, BuiltIn::Position, true, + PrologueStage::empty(), + ), + "gl_FragCoord" => add_builtin( + TypeInner::Vector { + size: VectorSize::Quad, + kind: ScalarKind::Float, + width: 4, + }, + BuiltIn::Position, + false, PrologueStage::FRAGMENT, ), + "gl_FragDepth" => add_builtin( + TypeInner::Scalar { + kind: ScalarKind::Float, + width: 4, + }, + BuiltIn::FragDepth, + true, + PrologueStage::empty(), + ), "gl_VertexIndex" => add_builtin( TypeInner::Scalar { kind: ScalarKind::Uint,