You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, you cull faces based on n*light_dir. But what if the light is behind the object and the background is white?
That criterion is not sufficient to call the triangle.
Indeed, in OpenGL the culling is not based on the normal, but rather on the vertex winding (cross product in 2D).
This way culling also works without lights and normals.
Also the culling code did not make it into the current master.
The text was updated successfully, but these errors were encountered:
https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling#flat-shading-render
Here, you cull faces based on
n*light_dir
. But what if the light is behind the object and the background is white?That criterion is not sufficient to call the triangle.
Indeed, in OpenGL the culling is not based on the normal, but rather on the vertex winding (cross product in 2D).
This way culling also works without lights and normals.
Also the culling code did not make it into the current master.
The text was updated successfully, but these errors were encountered: