Set light to uniforms
This commit is contained in:
parent
f346e55819
commit
75cadf21cc
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user