• Advertisement
Sign in to follow this  

nvidia atmospheric scattering

This topic is 962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to use the algorithm explained in this nvidia page

In the vertex shader code there is a function "scale()", I don't understand what it does. 

what does it do?


There is another part where there is this...

scale(fLightAngle) ? scale(fCameraAngle))

what does the ? mean?

Share this post

Link to post
Share on other sites

found it!

I dowloaded the code form here which is in hlsl

 and it has this in scale()...

float scale(float fCos)
	float x = 1.0 - fCos;
	return ScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));

and for the ?... it is a minus...

scale(fLightAngle) - scale(fCameraAngle))


even better you can download any GPU gems files from here 


Edited by lomateron

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement