mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-22 03:41:35 +00:00
Fix skyfog rendering with maps without any fog values
This commit is contained in:
parent
4ea173efc5
commit
bbb4628670
1 changed files with 13 additions and 1 deletions
|
@ -1300,7 +1300,19 @@ void Fog_SetColorForSkyE (void);
|
|||
|
||||
void DrawSkyFogBlend (float skydepth) {
|
||||
float skyfogblend = r_skyfogblend.value;
|
||||
if (skyfogblend <= 0) return;
|
||||
|
||||
// Don't do anything if the map doesnt have fog
|
||||
if ((skyfogblend <= 0) || (r_refdef.fog_start <= 0 && r_refdef.fog_end <= 0)) {
|
||||
sceGuEnable(GU_TEXTURE_2D);
|
||||
sceGuDisable(GU_BLEND);
|
||||
//sceGuDepthRange(0, 65535);
|
||||
Fog_SetColorForSkyE(); //setup for Sky
|
||||
Fog_EnableGFog(); //setup for Sky
|
||||
|
||||
sceGuDepthMask(false);
|
||||
sceGuEnable(GU_DEPTH_TEST);
|
||||
return;
|
||||
}
|
||||
|
||||
float endheight = skydepth * skyfogblend;
|
||||
float startheight = MIN(skydepth * 0.075f, endheight * 0.3f);
|
||||
|
|
Loading…
Reference in a new issue