[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:
Jeffery Myers 2026-08-08 07:58:39 -07:00 • committed by GitHub
commit 388806f24d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);