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:
Erwin Coumans
2017-04-23 07:35:13 -07:00
parent e8c1602232
commit 4759e5a590
10 changed files with 99 additions and 55 deletions

View File

@@ -39,7 +39,9 @@ void main(void)
float visibility = texture(shadowMap, vec3(ShadowCoord.xy,(ShadowCoord.z)/ShadowCoord.w));
if (intensity<0.5)
visibility = 0;
intensity = 0.7*intensity + 0.3*intensity*visibility;
cf = intensity*(vec3(1.0,1.0,1.0)-ambient)+ambient;