Redoing changes
This commit is contained in:
parent
9ffbcc4b8c
commit
32abd7cf97
1 changed files with 10 additions and 7 deletions
|
@ -23,8 +23,6 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
|
||||
private const int MaxVertexInput = 3;
|
||||
|
||||
private static string[] ElemTypes = new string[] { "float", "vec2", "vec3", "vec4" };
|
||||
|
||||
private GlslDecl Decl;
|
||||
|
||||
private ShaderHeader Header, HeaderB;
|
||||
|
@ -297,7 +295,7 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
{
|
||||
if (DeclInfo.Index >= 0)
|
||||
{
|
||||
SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " " + GetDecl(DeclInfo) + ";");
|
||||
SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " vec4 " + DeclInfo.Name + ";");
|
||||
|
||||
Count++;
|
||||
}
|
||||
|
@ -331,7 +329,7 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
}
|
||||
else if (DeclInfo.Name == GlslDecl.FragmentOutputName)
|
||||
{
|
||||
Name = "layout (location = 0) out " + GetDecl(DeclInfo) + Suffix + ";" + Environment.NewLine;
|
||||
Name = "layout (location = 0) out " + "vec4 " + DeclInfo.Name + Suffix + ";" + Environment.NewLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -354,7 +352,14 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
|
||||
private string GetDecl(ShaderDeclInfo DeclInfo)
|
||||
{
|
||||
return ElemTypes[DeclInfo.Size - 1] + " " + DeclInfo.Name;
|
||||
if (DeclInfo.Size == 4)
|
||||
{
|
||||
return "vec4 " + DeclInfo.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "float " + DeclInfo.Name;
|
||||
}
|
||||
}
|
||||
|
||||
private void PrintMain()
|
||||
|
@ -370,8 +375,6 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
|
||||
ShaderDeclInfo DeclInfo = KV.Value;
|
||||
|
||||
string Swizzle = ".xyzw".Substring(0, DeclInfo.Size + 1);
|
||||
|
||||
if (Decl.ShaderType == GalShaderType.Geometry)
|
||||
{
|
||||
for (int Vertex = 0; Vertex < MaxVertexInput; Vertex++)
|
||||
|
|
Loading…
Add table
Reference in a new issue