1
0
Fork 0
forked from eden-emu/eden

Merge pull request #9253 from vonchenplus/attr_layer

shader: Implement miss attribute layer
This commit is contained in:
liamwhite 2022-11-18 22:04:18 -05:00 committed by GitHub
commit 9c67334031
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 0 deletions

View file

@ -205,6 +205,9 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
case IR::Attribute::PrimitiveId:
ctx.AddF32("{}=itof(gl_PrimitiveID);", inst);
break;
case IR::Attribute::Layer:
ctx.AddF32("{}=itof(gl_Layer);", inst);
break;
case IR::Attribute::PositionX:
case IR::Attribute::PositionY:
case IR::Attribute::PositionZ: