Game Development Community

CloudLayer - possible problems

by Ivan Mandzhukov · in Torque 3D Professional · 05/14/2011 (11:36 am) · 0 replies

Hi there,
I have found possible problems with the clouds - on some configurations they render always black.On others they render just fine.
I am working with PIX for a whole day,but I don't get problems with wrong colors,bad constant register values,etc...
This is not a problem related to directX versions.
I have lost a lot of time to track the problem.
Actually this bug does not happen all the time and is hard to be reproduced.

cloudLayerP.hlsl

Removing this code from ComputeIllumination() eliminates the problem.
// Use a simple RayleighPhase function to simulate single scattering towards
// the camera.
float angle = dot( vLightTS, vViewTS );
lightTerm *= getRayleighPhase( angle );