mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-23 11:51:26 +00:00
Fix gles2 fogboundary.fp
This commit is contained in:
parent
0ca27c18d8
commit
f1f446d985
1 changed files with 3 additions and 2 deletions
|
@ -14,14 +14,15 @@ void main()
|
|||
//
|
||||
// calculate fog factor
|
||||
//
|
||||
if (uFogEnabled == -1)
|
||||
#if (DEF_FOG_ENABLED == 1) && (DEF_FOG_RADIAL == 0) && (DEF_FOG_COLOURED == 1) // This was uFogEnabled = -1,, TODO check this
|
||||
{
|
||||
fogdist = pixelpos.w;
|
||||
}
|
||||
else
|
||||
#else
|
||||
{
|
||||
fogdist = max(16.0, distance(pixelpos.xyz, uCameraPos.xyz));
|
||||
}
|
||||
#endif
|
||||
fogfactor = exp2 (uFogDensity * fogdist);
|
||||
|
||||
gl_FragColor = vec4(uFogColor.rgb, 1.0 - fogfactor);
|
||||
|
|
Loading…
Reference in a new issue