mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-04 11:35:06 +03:00
Fixed inverted sky light direction & Volumetric
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Nuake {
|
||||
std::string u_light = "u_Lights[" + std::to_string(i) + "].";
|
||||
volumetricShader->SetUniformMat4f(u_light + "transform", light.mViewProjections[0]);
|
||||
volumetricShader->SetUniformVec3(u_light + "color", light.Color);
|
||||
volumetricShader->SetUniformVec3(u_light + "direction", -light.GetDirection());
|
||||
volumetricShader->SetUniformVec3(u_light + "direction", light.GetDirection());
|
||||
|
||||
volumetricShader->SetUniformTex(u_light + "shadowmap", light.m_Framebuffers[0]->GetTexture(GL_DEPTH_ATTACHMENT).get(), 5 + i);
|
||||
volumetricShader->SetUniform1f(u_light + "strength", light.Strength);
|
||||
|
||||
@@ -788,7 +788,7 @@ namespace Nuake
|
||||
|
||||
if (light.Type == Directional && light.SyncDirectionWithSky)
|
||||
{
|
||||
light.Direction = -env->ProceduralSkybox->GetSunDirection();
|
||||
light.Direction = env->ProceduralSkybox->GetSunDirection();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user