Skip to main content
gamedev.net
🔒 Locked

Shadow Point Algorithm

Started by AndyEsser 0 replies 350+ views
Original Post
AndyEsser
AndyEsser
Hey all, I guess this isn't strictly an OGL problem but I guess many of you will have experience of similar problems. Right now I've got an array of all the vertices within a given model. Now what I want to do is run an algorithm that will go thru the array and find any vertices that appear more than 3 times (with 3 different normals) and therefore will be required in drawing the correct shadow for the object. Right now the idea I was having was when the object data is being read is that each time it reads Vertex data it checks the current array to see if it features. But this requires looping thru every element of the array, for every vertex. This is extremely slow. Can anyone suggest a better way? Andy
smitty1276
smitty1276
You could rearrange your data to keep a list of unique vertices and a list of faces (which index into the vertex list). That would probably simplify things significantly.

Topic Locked

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

Sign in to reply to this topic.