emil28092005 2e73a0b52c feat: shadow mapping via rlgl depth FBO (official raylib approach)
- Depth-only FBO via Rlgl.LoadFramebuffer + Rlgl.LoadTextureDepth (2048x2048)
- Shadow pass: BeginMode3D with orthographic light camera, grab
  ModelView/Projection matrices via Rlgl.GetMatrixModelview/Projection
- Main pass: Rlgl.ActiveTextureSlot(1) + Rlgl.EnableTexture(depth) +
  SetShaderValue(shadowMapLoc, 1) to bind shadow map on texture unit 1
- Main shader: uniform mat4 lightViewProj + uniform sampler2D shadowMap
  with PCF 3x3 soft shadows, bias 0.005
- Shadow factor applied to first directional light only
- Shadow shader: empty fragment (depth written automatically)
- 66/66 tests, all shaders compile, 145 FPS
2026-06-17 18:03:45 +03:00
S
Description
AI powered Game Engine
23 MiB
Languages
C# 97.8%
GLSL 1.8%
Shell 0.2%
PowerShell 0.2%