Trying to fix mesh culling

This commit is contained in:
Dynamitos
2024-05-04 13:25:19 +02:00
parent f0fd9a7ae7
commit 87b72dcd84
8 changed files with 53 additions and 51 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ struct BlinnPhong : IBRDF
float3 h = normalize(lightDir_TS + viewDir_TS);
float specular = saturate(dot(normal_TS, h));
return baseColor;//((baseColor * diffuse) + (specularColor * specular)) * lightColor;
return (baseColor * diffuse * lightColor) + (specularColor * specular) * lightColor;
}
float3 evaluateAmbient()
@@ -169,7 +169,7 @@ struct CookTorrance : IBRDF
float nDotL = max(dot(n, lightDir_TS), 0.0);
float3 result = (k_d * baseColor / PI + specular) * nDotL * lightColor;
return baseColor;//result * ambientOcclusion;
return result * ambientOcclusion;
}
float3 evaluateAmbient()
{