I'm working on a shader/renderer and I have these symptoms. When I render it, the back face is showing. I'm pretty sure the winding order is correct in the meshes I'm using. The other thing which I think is correlated is that I have to multiply in the reverse order in the vertex shader to get the positions on the screen. Something is backwards, but I'm not sure what. So instead of mul(mul(position, world), mul(view, projection)), I have to do mul(mul(projection, view), mul(world, position)) in the vertex shader. I'm using SharpDx and am using their Matrix library to set up the view and projection matrix and the world is identity. Any ideas?
🔒 Locked
[hlsl] VS transformations reversed and back face showing.
Advertisement
Advertisement