mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Changed reflection value to normalmaps alfa.
Fixed order in color conversion in stars shader.
This commit is contained in:
@@ -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++)
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user