mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
HW T&L: Change unlitcolor initialization and cleanup fragmentshader formatting
This commit is contained in:
parent
f25735aa93
commit
da1b345cd4
@ -181,15 +181,15 @@ void GenerateFragmentShader(char *buffer) {
|
||||
} else { // texfmt == RGB
|
||||
switch (gstate.texfunc & 0x7) {
|
||||
case GE_TEXFUNC_MODULATE:
|
||||
WRITE(p, " vec4 v = vec4(t.rgb * p.rgb, p.a)%s;\n", secondary); break;
|
||||
WRITE(p, " vec4 v = vec4(t.rgb * p.rgb, p.a)%s;\n", secondary); break;
|
||||
case GE_TEXFUNC_DECAL:
|
||||
WRITE(p, " vec4 v = vec4(t.rgb, p.a)%s;\n", secondary); break;
|
||||
WRITE(p, " vec4 v = vec4(t.rgb, p.a)%s;\n", secondary); break;
|
||||
case GE_TEXFUNC_BLEND:
|
||||
WRITE(p, " vec4 v = vec4(1.0 - t.rgb) * p.rgb + t.rgb * u_texenv.rgb, p.a)%s;\n", secondary); break;
|
||||
WRITE(p, " vec4 v = vec4(1.0 - t.rgb) * p.rgb + t.rgb * u_texenv.rgb, p.a)%s;\n", secondary); break;
|
||||
case GE_TEXFUNC_REPLACE:
|
||||
WRITE(p, " vec4 v = vec4(t.rgb, p.a)%s;\n", secondary); break;
|
||||
WRITE(p, " vec4 v = vec4(t.rgb, p.a)%s;\n", secondary); break;
|
||||
case GE_TEXFUNC_ADD:
|
||||
WRITE(p, " vec4 v = vec4(t.rgb + p.rgb, p.a)%s;\n", secondary); break;
|
||||
WRITE(p, " vec4 v = vec4(t.rgb + p.rgb, p.a)%s;\n", secondary); break;
|
||||
default:
|
||||
WRITE(p, " vec4 v = p;\n"); break;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ void GenerateVertexShader(int prim, char *buffer) {
|
||||
if (hasColor) {
|
||||
WRITE(p, " lowp vec3 unlitColor = a_color0.rgb;\n");
|
||||
} else {
|
||||
WRITE(p, " lowp vec3 unlitColor = vec3(1.0);\n");
|
||||
WRITE(p, " lowp vec3 unlitColor = u_matambientalpha;\n");
|
||||
}
|
||||
// TODO: Declare variables for dots for shade mapping if needed.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user