GarageGames / Torque3D

MIT Licensed Open Source version of Torque 3D from GarageGames
http://torque3d.org
MIT License
3.35k stars 1.2k forks source link

Possible redundant code in scatterSkyP.hlsl #1039

Open RichardsGameStudio opened 9 years ago

RichardsGameStudio commented 9 years ago

In shaders/common/scatterSkyP.hlsl there are 2 lines of code which don't do anything.

float4 nightSkyColor = texCUBE( nightSky, -In.v3Direction ); nightSkyColor = lerp( nightColor, nightSkyColor, useCubemap );

float fac = dot( normalize( In.pos ), sunDir );//<== REDUNDANT? fac = max( nightInterpAndExposure.y, pow( saturate( fac ), 2 ) );//<== REDUNDANT? Out = lerp( color, nightSkyColor, nightInterpAndExposure.y );

Out.a = 1;

As far as I can see they can be removed, because fac isn't used anywhere.

crabmusket commented 9 years ago

Sounds good! Thanks for the tip.