Add FaceAttr in GLSL, unmanaged case in EmitTex and ConstantColorG80 blend factor (#207)
* Add FaceAttr (0x3fc) input attribute in GLSL * Implement unmanaged case in EmitTex * Add ConstantColor for 0xC001 (G80) from PR #145
This commit is contained in:
parent
741773910d
commit
9cbf908cf5
5 changed files with 46 additions and 16 deletions
|
@ -658,6 +658,14 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
case GlslDecl.TessCoordAttrZ: return "gl_TessCoord.z";
|
||||
}
|
||||
}
|
||||
else if (Decl.ShaderType == GalShaderType.Fragment)
|
||||
{
|
||||
switch (Abuf.Offs)
|
||||
{
|
||||
//Note: It's a guess that Maxwell's face is 1 when gl_FrontFacing == true
|
||||
case GlslDecl.FaceAttr: return "(gl_FrontFacing ? 1 : 0)";
|
||||
}
|
||||
}
|
||||
|
||||
return GetAttrTempName(Abuf);
|
||||
}
|
||||
|
@ -1084,7 +1092,8 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
{
|
||||
case ShaderIrOperAbuf Abuf:
|
||||
return Abuf.Offs == GlslDecl.VertexIdAttr ||
|
||||
Abuf.Offs == GlslDecl.InstanceIdAttr
|
||||
Abuf.Offs == GlslDecl.InstanceIdAttr ||
|
||||
Abuf.Offs == GlslDecl.FaceAttr
|
||||
? OperType.I32
|
||||
: OperType.F32;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue