mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-10 18:20:49 +00:00
Update hw_main.c
This commit is contained in:
parent
df789e1d67
commit
a0ff5c6b25
1 changed files with 28 additions and 19 deletions
|
@ -199,6 +199,10 @@ void HWR_NoColormapLighting(FSurfaceInfo *Surface, INT32 light_level, UINT32 mix
|
|||
mix_color.rgba = mixcolor;
|
||||
fog_color.rgba = fadecolor;
|
||||
|
||||
// if shaders are off, or shaders are on, but fog is off:
|
||||
// modulate colors by light here
|
||||
if (!cv_grshaders.value || (cv_grshaders.value && !cv_grfog.value))
|
||||
{
|
||||
mix = (mix_color.s.alpha*255)/25;
|
||||
fogmix = (fog_color.s.alpha*255)/25;
|
||||
|
||||
|
@ -222,6 +226,11 @@ void HWR_NoColormapLighting(FSurfaceInfo *Surface, INT32 light_level, UINT32 mix
|
|||
final_color.s.green = final_color.s.green+((UINT8)(CALCLIGHT((0xFF-fogmix),(0xFF-lightmix))+CALCLIGHT(fog_color.s.green,(0xFF-lightmix))));
|
||||
final_color.s.blue = final_color.s.blue+((UINT8)(CALCLIGHT((0xFF-fogmix),(0xFF-lightmix))+CALCLIGHT(fog_color.s.blue,(0xFF-lightmix))));
|
||||
final_color.s.alpha = 0xFF;
|
||||
}
|
||||
// if shaders are on:
|
||||
// modulate colors by light on the shader
|
||||
else
|
||||
final_color.rgba = 0xFFFFFFFF;
|
||||
|
||||
// Fog.
|
||||
fog_color.rgba = fadecolor;
|
||||
|
|
Loading…
Reference in a new issue