Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #4997; close #224 and #225
  • Loading branch information
rtri committed Nov 17, 2015
1 parent 5b94f25 commit 323ab5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cont/base/springcontent/shaders/GLSL/ModelFragProg.glsl
Expand Up @@ -55,7 +55,7 @@ void main(void)
vec3 reflection = textureCube(reflectTex, reflectDir).rgb;

#if (USE_SHADOWS == 1)
float shadow = shadow2DProj(shadowTex, gl_TexCoord[1]).r;
float shadow = shadow2DProj(shadowTex, gl_TexCoord[1] + vec4(0.0, 0.0, -0.00005, 0.0)).r;
shadow = 1.0 - (1.0 - shadow) * shadowDensity;
vec3 shade = mix(sunAmbient, light, shadow);
reflection = mix(shade, reflection, extraColor.g); // reflection
Expand Down Expand Up @@ -105,7 +105,7 @@ void main(void)
#endif

#if (DEFERRED_MODE == 1)
gl_FragData[GBUFFER_NORMTEX_IDX] = vec4(normal, 1.0);
gl_FragData[GBUFFER_NORMTEX_IDX] = vec4((normal + vec3(1.0, 1.0, 1.0)) * 0.5, 1.0);
gl_FragData[GBUFFER_DIFFTEX_IDX] = vec4(mix(diffuse.rgb, teamColor.rgb, diffuse.a), extraColor.a * teamColor.a);
// do not premultiply reflection, leave it to the deferred lighting pass
// gl_FragData[GBUFFER_DIFFTEX_IDX] = vec4(mix(diffuse.rgb, teamColor.rgb, diffuse.a) * reflection, extraColor.a * teamColor.a);
Expand Down

0 comments on commit 323ab5a

Please sign in to comment.