Set light to uniforms
This commit is contained in:
1 parent
f346e55819
commit
75cadf21cc
2 files changed
+10
No files matched your search
@@ -37,6 +37,7 @@ protected:
|
||||
float FogEndDistance;
|
||||
vec4 FogColor;
|
||||
|
||||
vec3 lightPos;
|
||||
|
||||
void CalcCamPosVec();
|
||||
|
||||
@@ -101,6 +102,8 @@ public:
|
||||
void SetFogBeginDistance(float distance);
|
||||
void SetFogEndDistance(float distance);
|
||||
|
||||
void SetLightPos(vec3 newLightPos);
|
||||
|
||||
};
|
||||
|
||||
} //namespace SE
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user