More 'stuff'
This commit is contained in:
parent
eb7a0c485a
commit
10666a9b87
|
@ -733,10 +733,12 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
}
|
||||
if (DepthTextureEnable)
|
||||
WRITE(p, " float depth;\n"); // TODO: Passed to Vertex Shader right?
|
||||
WRITE(p, "VARYIN float4 rawpos;\n");
|
||||
WRITE(p, " float4 rawpos = gl_FragCoord;\n");
|
||||
|
||||
WRITE(p, " float4 colors_0 = gl_Color;\n");
|
||||
WRITE(p, " float4 colors_1 = gl_SecondaryColor;\n");
|
||||
WRITE(p, "VARYIN float4 colors_02;\n");
|
||||
WRITE(p, "VARYIN float4 colors_12;\n");
|
||||
WRITE(p, " float4 colors_0 = colors_02;\n");
|
||||
WRITE(p, " float4 colors_1 = colors_12;\n");
|
||||
|
||||
// compute window position if needed because binding semantic WPOS is not widely supported
|
||||
// Let's set up attributes
|
||||
|
|
|
@ -298,10 +298,11 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
|
|||
WRITE(p, "VARYOUT float%d uv%d_2;\n", i < 4 ? 4 : 3 , i);
|
||||
}
|
||||
}
|
||||
WRITE(p, "VARYOUT float4 rawpos;\n") ;
|
||||
WRITE(p, " float4 rawpos = gl_Vertex;\n");
|
||||
WRITE(p, "VARYOUT float4 colors_02;\n");
|
||||
WRITE(p, "VARYOUT float4 colors_12;\n");
|
||||
|
||||
WRITE(p, "void main()\n{\n");
|
||||
WRITE(p, "rawpos = gl_Vertex;\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -627,8 +628,8 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
|
|||
WRITE(p, " uv%d_2%s = o.tex%d;\n", i, i < 4 ? ".xyzw" : ".xyz" , i);
|
||||
}
|
||||
}
|
||||
WRITE(p, "gl_FrontColor = o.colors_0;\n");
|
||||
WRITE(p, "gl_FrontSecondaryColor = o.colors_1;\n");
|
||||
WRITE(p, "colors_02 = o.colors_0;\n");
|
||||
WRITE(p, "colors_12 = o.colors_1;\n");
|
||||
WRITE(p, "gl_Position = o.pos;\n");
|
||||
WRITE(p, "}\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue