1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Pass the specular texture to the reflection pass for better reflections

This commit is contained in:
KillzXGaming 2019-06-03 20:59:54 -04:00
parent 537da9866b
commit e40c081560
2 changed files with 2 additions and 12 deletions

Binary file not shown.

View File

@ -258,23 +258,13 @@ void main()
vec3 normal = texture(NormalMap, f_texcoord0).rgb;
vec3 specular = texture(SpecularMap, f_texcoord0).rgb;
float SpecularAmount = 0;
if (HasSpecularMap == 1)
{
SpecularAmount = texture(SpecularMap, f_texcoord0).r;
}
vec3 tintColor = vec3(1);
// Render Passes
if (HasEmissionMap == 1 || enable_emission == 1) //Can be without texture map
fragColor.rgb += EmissionPass(EmissionMap, emission_intensity, vert, 0, emission_color);
vec3 SpecularPassOutput = SpecularPass(I, N, HasSpecularMap, SpecularMap, specular_color, vert, 0, UseSpecularColor);
fragColor.rgb += SpecularPassOutput;
fragColor.rgb += ReflectionPass(N, I, diffuseMapColor,SpecularPassOutput, AoPass, tintColor, vert);
fragColor.rgb += SpecularPass(I, N, HasSpecularMap, SpecularMap, specular_color, vert, 0, UseSpecularColor);
fragColor.rgb += ReflectionPass(N, I, diffuseMapColor, specular, AoPass, tintColor, vert);
fragColor.rgb *= pickingColor.rgb;