Changed reflection value to normalmaps alfa.

Fixed order in color conversion in stars shader.
This commit is contained in:
stele
2018-12-22 16:44:22 +01:00
parent 45ffc56802
commit 89231426e3
3 changed files with 5 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ layout(location = 1) out vec4 out_motion;
#texture (diffuse, 0, sRGB_A)
uniform sampler2D diffuse;
#texture (normalmap, 1, RGB)
#texture (normalmap, 1, RGBA)
uniform sampler2D normalmap;
#if SHADOWMAP_ENABLED
@@ -58,7 +58,7 @@ void main()
{
vec2 part = calc_dir_light(lights[0]);
vec3 c = (part.x * param[1].x + part.y * param[1].y) * calc_shadow() * lights[0].color;
result += mix(c, envcolor, param[1].z);
result += mix(c, envcolor, param[1].z * texture(normalmap, f_coord).a);
}
for (uint i = 1U; i < lights_count; i++)

View File

@@ -21,7 +21,7 @@ layout(location = 1) out vec4 out_motion;
#texture (diffuse, 0, sRGB_A)
uniform sampler2D diffuse;
#texture (reflmap, 1, R)
#texture (reflmap, 1, RGBA)
uniform sampler2D reflmap;
#if SHADOWMAP_ENABLED
@@ -56,7 +56,7 @@ void main()
{
vec2 part = calc_dir_light(lights[0]);
vec3 c = (part.x * param[1].x + part.y * param[1].y) * calc_shadow() * lights[0].color;
result += mix(c, envcolor, param[1].z * texture(reflmap, f_coord).r);
result += mix(c, envcolor, param[1].z * texture(reflmap, f_coord).a);
}
for (uint i = 1U; i < lights_count; i++)

View File

@@ -17,7 +17,7 @@ void main()
discard;
// color data space is shared with normals, ugh
vec4 color = vec4(pow(f_normal_raw.bgr, vec3(2.2)), 1.0f);
vec4 color = vec4(pow(f_normal_raw.rgb, vec3(2.2)), 1.0f);
#if POSTFX_ENABLED
out_color = color;
#else