Set light to uniforms

This commit is contained in:
Vladislav Khorev 2024-06-10 22:48:52 +03:00
parent f346e55819
commit 75cadf21cc
2 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,7 @@ protected:
float FogEndDistance;
vec4 FogColor;
vec3 lightPos;
void CalcCamPosVec();
@ -100,6 +101,8 @@ public:
void SetFogBeginDistance(float distance);
void SetFogEndDistance(float distance);
void SetLightPos(vec3 newLightPos);
};

View File

@ -64,6 +64,8 @@ void TSalmonRendererInterface::SetUniforms()
RenderUniform3fv(CONST_STRING_CAMPOS_UNIFORM, GetCamPos().v);
RenderUniform3fv("lightPos", lightPos.v);
ResourceManager->LightManager.SetLightUniforms();
}
@ -976,6 +978,11 @@ void TSalmonRendererInterface::SetFogEndDistance(float distance)
FogEndDistance = distance;
}
void TSalmonRendererInterface::SetLightPos(vec3 newLightPos)
{
lightPos = newLightPos;
}
} //namespace SE