|
I kept getting errors about some of my procedural meshes not having normals, despite the "shader wanting them". So I just manually used BindChannels to not deal with the normals. For meshes that are 2D GUI elements, I think that's dandy. However, what if not? Does a "real 3D" mesh require the vertex normals to be bound, for backface culling to happen?
(comments are locked)
|
|
Normals are required by most shaders in order to determine which color to give to each pixel of the triangle. Most shaders do this by comparing the interpolated normal of the three vertices with the direction of the light. For backface culling, you do not need normals. the "face winding" of the triangle is used. If your triangles happen to be culled "the wrong way around", change the triangle indices from 1,2,3 to 1,3,2 Fantastic. I'm not using lights on anything these days, in order to squeeze performance out on the iPhone. Do you know if it will give me any performance gains on everything, if I don't bind the normals? As in, just use BindChannels {"vertex" = vertex; "texcoord" = texcoord} ?
Apr 04 '10 at 02:29 AM
Jessy
Try it :). I suspect not having any normals in your meshdata would help. Then again, the only way is to try.
Apr 04 '10 at 10:25 AM
Lucas Meijer 1 ♦♦
(comments are locked)
|
