add directional light component and skylight component, add PCSS and hard shadow

This commit is contained in:
2026-01-02 22:46:29 +08:00
parent abf0a65bd6
commit 9e1474e643
55 changed files with 3032 additions and 1121 deletions

View File

@ -24,10 +24,13 @@ layout(location = 0) out vec4 finalColor;
uniform samplerCube u_Texture;
uniform float u_TextureLod;
uniform float u_SkyIntensity;
in vec3 v_Position;
void main()
{
finalColor = textureLod(u_Texture, v_Position, u_TextureLod);
vec3 color = textureLod(u_Texture, v_Position, u_TextureLod).rgb * u_SkyIntensity;
finalColor = vec4(color, 1.0);
}