Skip to main content
GameDev.net gamedev.net
🔒 Locked

Projective texturing problems

Started by yanuart Mar 1, 2003 at 2:22 AM 0 replies 250+ views
Original Post
yanuart
yanuart
I''m trying a simple spotlight effect using projective texturing in which there''s a spotlight shinning a certain object and move from left to right. Given a light''s position and look at direction I can create the new texture coordinates for the spotlight and it works fine but I can only change the lookAt direction of the light to animate the spotlight, I can''t change both position and direction so it''ll always paralell to the object. This is the equation to calculate texture coordinate : MatObjectLocal*Tranpose(MatrixLightView*MatLightProj)*(x,y,z,0) I think the culprit is how I create the LightView matrix given a position and lookat direction (I''m using D3DMatrixLookAtLH). Thx..
Ride the thrill of your life
Play Motorama

Topic Locked

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

Sign in to reply to this topic.