Lighting still looks horrible, but whatever for now

This commit is contained in:
Dynamitos
2024-05-04 09:25:13 +02:00
parent 247d6a54fb
commit f0fd9a7ae7
24 changed files with 563 additions and 386 deletions
+4 -1
View File
@@ -31,5 +31,8 @@ float4 fragmentMain(in FragmentParameter params) : SV_Target
uint lightIndex = pLightCullingData.lightIndexList[startOffset + i];
result += pLightEnv.pointLights[lightIndex].illuminate(lightingParams, brdf);
}
return float4(result, 1.0f);
result += brdf.evaluateAmbient();
result = result / (result + float3(1.0));
float3 gammaCorrected = pow(result, float3(1.0/2.2));
return float4(gammaCorrected, 1.0f);
}