Skip to main content
gamedev.net
🔒 Locked

normals problem

Started by grovsnus May 31, 2003 at 7:39 PM 0 replies 300+ views
Original Post
grovsnus
grovsnus
Hi, Not sure if this really is a math problem or common knowledge, but it''s really bugging me :/ I have a vertex shader that uses a Perlin noise function which, based on user input, displaces each vertex along its normal (basically newPos = oldPos + normal*noiseVal). This, however, doesn''t change the direction of the vertex normals. When apply shading, the vertex normals are not transformed, and the lighting calculations won''t give me correct results. I somehow need to recalculate the directions of the vertex normals, but since the vertex shader operates on only one vertex at a time, I don''t know how this would be possible. Any takers?

Topic Locked

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

Sign in to reply to this topic.