Jump to content
  • Advertisement
Sign in to follow this  
wmonash

Light_Shaft

This topic is 4289 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

Hi, guys, I read Jason Mitchell's paper [Light Shafts], and something i misunderstood. first, in the vertex shader, the pos is cal like this float4 pos = vMinBounds * vPosition + vMaxBounds * (1-vPosition); so, here i assume vMinBouns & vMaxBounds are light frustum's near plane dis & far plane dis. second, in the pixel shader, cookie = tex2Dproj(CookieSampler, tcproj); here: tcproj, is it in the light view space, and float atten = 0.25f + 20000.0f / dot(lsPos_depth.xyz, lsPos_depth.xyz); how can i get the lsPos_depth ? thx for any help! [Edited by - wmonash on October 21, 2006 10:30:26 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sorry for that, i have modified. :)

Why there is no answer, because my poor english? i will try to explain it in more detail.

1. i create a series planes facing to the viewer in dedifferent depth,
2. trilerp these vertex within view-space-AABB of light's frustum.
3. in pixel shader i sampler texture using tex2D
float2 vProj = (In.proj.xy/In.proj.w);( In.proj is cal in the vertex shader, which is perspective by light_view_proj )
cookie = tex2D(CookieSampler, vProj);
4. calculate atten base on the paper, but i don't really know what is lsPos_depht stand for? Is light position? or something else?




[Edited by - wmonash on October 21, 2006 11:26:43 PM]

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!