tinyrenderer: disable triangle backface culling (doesn't work well, cull triangles that should be visible)
GLInstancingRenderer: allow to set the light position
This commit is contained in:
@@ -426,14 +426,6 @@ static bool clipTriangleAgainstNearplane(const mat<4,3,float>& triangleIn, b3Ali
|
||||
{
|
||||
|
||||
|
||||
float orientation = (triangleIn[0][1] - triangleIn[0][0]) * (triangleIn[1][2] - triangleIn[1][0])
|
||||
- (triangleIn[1][1] - triangleIn[1][0]) * (triangleIn[0][2] - triangleIn[0][0]);
|
||||
|
||||
if (orientation < 0.0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//discard triangle if all vertices are behind near-plane
|
||||
if (triangleIn[3][0]<0 && triangleIn[3][1] <0 && triangleIn[3][2] <0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user