mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #227 from Azaezel/alpha40_scatterskyCleanups
adress #116 and #179 (shaderside)
This commit is contained in:
commit
005f7f6fd2
|
|
@ -60,13 +60,9 @@ void main()
|
|||
vec4 nightSkyColor = texture(nightSky, -v3Direction);
|
||||
nightSkyColor = mix(nightColor, nightSkyColor, useCubemap);
|
||||
|
||||
float fac = dot( normalize( pos ), sunDir );
|
||||
fac = max( nightInterpAndExposure.y, pow( clamp( fac, 0.0, 1.0 ), 2 ) );
|
||||
OUT_col = mix( color, nightSkyColor, nightInterpAndExposure.y );
|
||||
|
||||
OUT_col.a = 1;
|
||||
|
||||
OUT_col = clamp(OUT_col, 0.0, 1.0);
|
||||
|
||||
|
||||
OUT_col = hdrEncode( OUT_col );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,12 +58,9 @@ float4 main( Conn In ) : TORQUE_TARGET0
|
|||
float4 nightSkyColor = TORQUE_TEXCUBE(nightSky, -In.v3Direction);
|
||||
nightSkyColor = lerp( nightColor, nightSkyColor, useCubemap );
|
||||
|
||||
float fac = dot( normalize( In.pos ), sunDir );
|
||||
fac = max( nightInterpAndExposure.y, pow( saturate( fac ), 2 ) );
|
||||
Out = lerp( color, nightSkyColor, nightInterpAndExposure.y );
|
||||
|
||||
Out.a = 1;
|
||||
Out = saturate(Out);
|
||||
|
||||
return hdrEncode( Out );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue