Am Lightning System gearbeitet

This commit is contained in:
2026-07-17 11:23:44 +02:00
parent cdaaba3841
commit 5ed7b4017c
23 changed files with 928 additions and 164 deletions

View File

@@ -16,14 +16,9 @@ uniform sampler2D m_AlphaMap_2;
uniform sampler2DArray m_NormalArray;
#endif
#ifdef HAS_LIGHTDIR
uniform vec3 m_LightDir;
#endif
#ifdef HAS_SCENE_LIGHT
uniform vec3 m_SunColor;
uniform vec3 m_AmbientColor;
#endif
in vec2 vSplatUV;
in vec3 vWorldPos;
@@ -111,18 +106,9 @@ void main() {
N = normalize(pertN);
#endif
#ifdef HAS_LIGHTDIR
vec3 lightDir = normalize(m_LightDir);
#else
vec3 lightDir = normalize(vec3(0.6, 1.0, 0.4));
#endif
float diff = max(dot(N, lightDir), 0.0);
#ifdef HAS_SCENE_LIGHT
vec3 light = m_AmbientColor + m_SunColor * diff;
#else
vec3 light = vec3(diff * 0.65 + 0.35);
#endif
const float BRIGHTNESS = 0.80;
#ifdef DEBUG_NO_LIGHT