mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[glsl-in] Add support for gl_FragCoord / gl_FragDepth
And remove the ability to read gl_Position in fragment.
This commit is contained in:
committed by
João Capucho
parent
0b9af95793
commit
7a9fb864ad
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user