[examples] shaders shadowmap rendering camera fix (#6041)
* Update the camera before sending it to the shader * tabs to spaces (oops)
This commit is contained in:
parent
b0005129c7
commit
388806f24d
1 changed files with 30 additions and 28 deletions
|
|
@ -111,9 +111,11 @@ int main(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
float deltaTime = GetFrameTime();
|
||||
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
// send the updated camera position to the shader so that it can calculate the correct lighting for the scene
|
||||
Vector3 cameraPos = camera.position;
|
||||
SetShaderValue(shadowShader, shadowShader.locs[SHADER_LOC_VECTOR_VIEW], &cameraPos, SHADER_UNIFORM_VEC3);
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
frameCounter++;
|
||||
frameCounter %= (anims[0].keyframeCount);
|
||||
|
|
|
|||
Loading…
Reference in a new issue