diff --git a/FLARDATA/Shader/lighting.fp b/FLARDATA/Shader/lighting.fp index 3fff8ef5..71a206c7 100644 --- a/FLARDATA/Shader/lighting.fp +++ b/FLARDATA/Shader/lighting.fp @@ -466,10 +466,7 @@ vec3 ApplyClusteredLights(const vec3 mapNormal, const vec3 eyeV, const vec3 F0, void main(void) { - - float fogFactor = 0; - bool enableFog = false; if (enableFog && fogMode > 0) { //Radial fog @@ -545,20 +542,13 @@ void main(void) vec3 mapNormal; if (enableNormalMaps) { - vec3 textureNormal = texture2D(normalMap, texCoordsProcessed).rgb; - textureNormal.g = 1.0 - textureNormal.g; // Invertiere den grünen Kanal für OpenGL - - // Verstärkung der Normal Map Intensität - float intensity = 2.0; // Faktor zur Verstärkung, passe diesen Wert nach Bedarf an - textureNormal.xy = (textureNormal.rg * 2.0 - 1.0) * intensity; - - // Rekalkuliere die Z-Komponente und normalisiere die Normal Map - textureNormal.z = sqrt(max(0.0, 1.0 - dot(textureNormal.xy, textureNormal.xy))); - mapNormal = normalize(textureNormal); + vec3 textureNormal = texture2D(normalMap, texCoordsProcessed).rgb; + textureNormal.xy = (textureNormal.rg * 2.0 - 1.0); + textureNormal.z = sqrt(1.0-dot(textureNormal.xy,textureNormal.xy)); + mapNormal = normalize(textureNormal.xyz); } else mapNormal = normal; - lightSum+=vec4(((matEmissiveColor.rgb))* firstTexture.rgb, alpha);