I'm writing my funny graphic engine for Android with OpenGL 2.0 ES 2.0.
After managing a whole scene with several object meshes, I am trying to apply the shadow volume.
Logic (simplified): First, I create an artex buffer and attract the elements, after the object (with corners, faces, edges and all data) by a binary file.
So far, I used Transformations (Scale, Translation, Rotation) with OpenGL functions on model matrix (glototype, etc.).
But to use the shadow volume, I should change an object or light every time, calculate which face in front of light and silhouette, so I use a loop on my top array .
My question is: where is the change? Do I have to change the top array on each change and reload it in vertex buffer?
According to this, this is a bad thing:
So, what is the best practice?
Sorry for my poor English and thank you in advance;)
me Often remember the shadow volume, but if I miss it correctly, then you first set the face in front of you, the light of these faces is silhouette which spreads the quantity, is not it?
So you want to do something that is to be done for every general general and light sector:
Forward = (L. Dot M * N) Where M is the reversal of your top change matrix. Instead of multiplying with N with each general, you can not calculate a proper change for the publisher .. with the. Matrix mL: (mL * L dot n =) (l dot m * n) This would be my idea.
Comments
Post a Comment