Revert FLAR Lightning Shader
This commit is contained in:
@@ -466,10 +466,7 @@ vec3 ApplyClusteredLights(const vec3 mapNormal, const vec3 eyeV, const vec3 F0,
|
|||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
float fogFactor = 0;
|
float fogFactor = 0;
|
||||||
bool enableFog = false;
|
|
||||||
if (enableFog && fogMode > 0)
|
if (enableFog && fogMode > 0)
|
||||||
{
|
{
|
||||||
//Radial fog
|
//Radial fog
|
||||||
@@ -545,21 +542,14 @@ void main(void)
|
|||||||
vec3 mapNormal;
|
vec3 mapNormal;
|
||||||
if (enableNormalMaps)
|
if (enableNormalMaps)
|
||||||
{
|
{
|
||||||
vec3 textureNormal = texture2D(normalMap, texCoordsProcessed).rgb;
|
vec3 textureNormal = texture2D(normalMap, texCoordsProcessed).rgb;
|
||||||
textureNormal.g = 1.0 - textureNormal.g; // Invertiere den grünen Kanal für OpenGL
|
textureNormal.xy = (textureNormal.rg * 2.0 - 1.0);
|
||||||
|
textureNormal.z = sqrt(1.0-dot(textureNormal.xy,textureNormal.xy));
|
||||||
// Verstärkung der Normal Map Intensität
|
mapNormal = normalize(textureNormal.xyz);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mapNormal = normal;
|
mapNormal = normal;
|
||||||
|
|
||||||
|
|
||||||
lightSum+=vec4(((matEmissiveColor.rgb))* firstTexture.rgb, alpha);
|
lightSum+=vec4(((matEmissiveColor.rgb))* firstTexture.rgb, alpha);
|
||||||
|
|
||||||
float metalness;
|
float metalness;
|
||||||
|
|||||||
Reference in New Issue
Block a user