Sign in to follow this  

Per Pixel Spotlights Over Long Distances

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

Good Morning, I'm trying to model a spotlight (or spotlights) illuminating a runway. The lights are located about 10 feet above the runway; the runway polygons are currently modelled such that they are 1000 feet "long". I'm attempting to do this on a per pixel basis, passing to a ps the vertex normal and the vertex-to-light vector as texcoords and interpolating across the polygon surface. I am also simulating a "bright" light, so emulated by having the source light intensity be r=50.0, g=50.0, b=50.0. My problem is that I'm experiencing significant "banding"; a non-smooth transition in lighting as I look down the runway. The granularity of the banding (intensity value) is not even at the granularity of intensity in the source intensity texture (see approach below). In trying to iron this out, I've basically taken my spotlight and converted it to a point light (no attenuation either), with the same banding effects still being present. For my debug environment, there are no other lights included. In the ps, the pixel intensity is computed by dot'ing L and N and using the result as a texcoord into a clamped linear light texture (256x1, D3DTEXF_LINEAR, D3DFMT_A8R8G8B8) for retrieving pixel intensity. The result of the texture lookup is multiplied by the light source intensity (50, 50, 50). I'm making the assumption that I can get an "accurate" inter-pixel float interpolation into the intensity texture even though the texture width is only 256, and thusly I'm confused by the banding. Is this a poor assumption considering the size of my geometry? Thanks in advance for all help and have a good day, Brad

Share this post


Link to post
Share on other sites

This topic is 4812 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this