If you see any red inside the model…
… disable blending or set the 4.th parameter of the output fragment to 1. If that helps, check your alpha values of the model and the resulting alpha values of all involved transformations. if that does not help…
… disable face culling. If that helps, your triangles have different winding orders and you need to fix it. If it does not help
… you are probably not drawing all triangles correctly, which can have different reasons
If you DON’t see any red in the model…
… enable depth testing. If that does not help…
… disable face culling. If that helps, your triangles have different winding orders and you need to fix it. If that does not help…
… you are probably not drawing all triangles correctly, which can have different reasons.
My bet is that you didn’t enable depth testing since as far as I noticed the “transparency” disappears when there are no overlapping geometries.
Depth testing was the problem for the transparent thing, I had forgotten it after setting up a layer stack. However, the lighting problem still persists, it doesn’t change as the bunny moves. What’s wrong with my shader code?