- some finetuning of subtractive effect.

This commit is contained in:
Christoph Oelckers 2013-12-05 15:39:46 +01:00
parent 8d08624f97
commit d46315c44b
2 changed files with 2 additions and 1 deletions

View file

@ -310,6 +310,7 @@ void GLSprite::Draw(int pass)
gl_SetFog(foglevel, rel, &Colormap, additivefog);
gl_RenderState.SetFixedColormap(CM_FOGLAYER);
gl_RenderState.BlendEquation(GL_FUNC_ADD);
gl_RenderState.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
gl_RenderState.Apply();
glBegin(GL_TRIANGLE_STRIP);

View file

@ -54,6 +54,6 @@ void main()
fogfactor = exp2 (fogparm.z * fogdist);
vec4 frag = Process(vec4(1.0,1.0,1.0,1.0));
gl_FragColor = vec4(fogcolor.rgb, (1.0 - fogfactor) * frag.a * 0.75);
gl_FragColor = vec4(fogcolor.rgb, (1.0 - fogfactor) * frag.a * 0.75 * glColor.a);
}