@@ -342,7 +342,7 @@ static void RenderSkySlice(float top, float bottom, float atop, float abottom, f
342
342
sg_color topcol = {1 .0f , 1 .0f , 1 .0f , atop};
343
343
sg_color bottomcol = {1 .0f , 1 .0f , 1 .0f , abottom};
344
344
345
- RendererVertex *glvert = BeginRenderUnit (GL_QUADS, 128 , GL_MODULATE, sky_tex_id, (GLuint)kTextureEnvironmentDisable , 0 , 0 , blend| kBlendingAlpha , fc_to_use, fd_to_use);
345
+ RendererVertex *glvert = BeginRenderUnit (GL_QUADS, 128 , GL_MODULATE, sky_tex_id, (GLuint)kTextureEnvironmentDisable , 0 , 0 , blend, fc_to_use, fd_to_use);
346
346
347
347
// Go through circular points
348
348
for (unsigned a = 0 ; a < 31 ; a++)
@@ -432,6 +432,10 @@ static void RenderSkyCylinder(void)
432
432
fd_to_use = 0 .0f ;
433
433
blend = (BlendingMode)(blend|kBlendingNoFog );
434
434
}
435
+ else if (fc_to_use != kRGBANoValue )
436
+ {
437
+ fd_to_use *= 0 .005f ;
438
+ }
435
439
436
440
// Render top cap
437
441
RendererVertex *glvert = BeginRenderUnit (GL_QUADS, 4 , GL_MODULATE, 0 , (GLuint)kTextureEnvironmentDisable , 0 , 0 , blend, fc_to_use, fd_to_use);
@@ -469,6 +473,8 @@ static void RenderSkyCylinder(void)
469
473
470
474
// Render skybox sides
471
475
476
+ blend = (BlendingMode)(blend|kBlendingAlpha );
477
+
472
478
// Check for odd sky sizes
473
479
float tx = 0 .125f ;
474
480
float ty = 2 .0f ;
@@ -756,7 +762,7 @@ void FinishSky(void)
756
762
global_render_state->Disable (GL_DEPTH_TEST);
757
763
758
764
if (!renderer_dumb_sky.d_ )
759
- global_render_state->DepthFunction (GL_GREATER );
765
+ global_render_state->DepthFunction (GL_ALWAYS );
760
766
else
761
767
global_render_state->DepthMask (false );
762
768
0 commit comments