Fixed buildings being too dark at night

This commit is contained in:
Silent 2014-06-16 15:38:24 +02:00
parent af90448047
commit 134521530a
2 changed files with 15 additions and 16 deletions

View file

@ -24,7 +24,7 @@ VS_OUTPUT NVC_vertex_shader( in VS_INPUT In )
Out.Position = mul(In.Position, viewProjMatrix); Out.Position = mul(In.Position, viewProjMatrix);
Out.Texture = In.Texture; Out.Texture = In.Texture;
Out.Color.rgb = (In.DayColor.rgb * (1.0-fEnvVars[0]) + In.NightColor.rgb * fEnvVars[0]) + (AmbientLight.rgb * AmbientLight.a); Out.Color.rgb = (In.DayColor.rgb * (1.0-fEnvVars[0]) + In.NightColor.rgb * fEnvVars[0]) + AmbientLight.rgb;
Out.Color.a = fEnvVars[1]; Out.Color.a = fEnvVars[1];
Out.Color = saturate(Out.Color); Out.Color = saturate(Out.Color);

View file

@ -36,7 +36,7 @@
add r0.x, r0.x, -c4.x add r0.x, r0.x, -c4.x
mul r1.xyz, v2, c4.x mul r1.xyz, v2, c4.x
mad r0.xzw, v3.xyyz, r0.x, r1.xyyz mad r0.xzw, v3.xyyz, r0.x, r1.xyyz
mad r0.xzw, c5.xyyz, c5.w, r0 add r0.xzw, r0, c5.xyyz
max r1.xyz, r0.xzww, c6.y max r1.xyz, r0.xzww, c6.y
max r1.w, r0.y, c4.y max r1.w, r0.y, c4.y
min oD0, r1, c6.x min oD0, r1, c6.x
@ -121,19 +121,18 @@ const BYTE g_vs20_NVC_vertex_shader[] =
0, 160, 4, 0, 0, 4, 0, 160, 4, 0, 0, 4,
0, 0, 13, 128, 3, 0, 0, 0, 13, 128, 3, 0,
148, 144, 0, 0, 0, 128, 148, 144, 0, 0, 0, 128,
1, 0, 148, 128, 4, 0, 1, 0, 148, 128, 2, 0,
0, 4, 0, 0, 13, 128, 0, 3, 0, 0, 13, 128,
5, 0, 148, 160, 5, 0, 0, 0, 228, 128, 5, 0,
255, 160, 0, 0, 228, 128, 148, 160, 11, 0, 0, 3,
1, 0, 7, 128, 0, 0,
248, 128, 6, 0, 85, 160,
11, 0, 0, 3, 1, 0, 11, 0, 0, 3, 1, 0,
7, 128, 0, 0, 248, 128, 8, 128, 0, 0, 85, 128,
6, 0, 85, 160, 11, 0, 4, 0, 85, 160, 10, 0,
0, 3, 1, 0, 8, 128, 0, 3, 0, 0, 15, 208,
0, 0, 85, 128, 4, 0, 1, 0, 228, 128, 6, 0,
85, 160, 10, 0, 0, 3, 0, 160, 1, 0, 0, 2,
0, 0, 15, 208, 1, 0, 0, 0, 3, 224, 1, 0,
228, 128, 6, 0, 0, 160, 228, 144, 255, 255, 0, 0
1, 0, 0, 2, 0, 0,
3, 224, 1, 0, 228, 144,
255, 255, 0, 0
}; };