Skip to main content
gamedev.net
🔒 Locked

Per-pixel spotlight problems

Started by Eleventy Jul 12, 2004 at 10:55 AM 0 replies 450+ views
Original Post
Eleventy
Eleventy
In my game, I finally was able to get per-pixel spotlights to work (by using projected textures), but for some reason all the spotlights in the game also have a reverse projection (opposite of the line-of-sight) as well as this ugly line of light that goes out perpendicular to every light on both sides. I was able to get rid of the reverse projection by keeping the 'y' coordinate of the projected texture positive in the vertex shader, but the ugly "line of light" (or lines) is still there. Here is a screenshot of what I am talking about: The spotlight is going off to the right, and you can see the ugly "lines of light" going off to the end of the map and coming back towards you. Does anyone know how to get rid of this?
Eleventy
Eleventy
Eleventy
Ahh.. I just fixed it! I simply turned off the D3DSAMP_MIPFILTER texture stage on the projected texture and viola! No more ugly lines.

When in doubt, just try playing around with a few settings, eventually you should get it right [wink].

This is about the third thread I've posted in here that I have managed to solve myself [totally].
Eleventy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.