mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 10:29:13 +01:00
Merge pull request #170 from MaSzyna-EU07/fix/reflections-and-burned-colors
Fix relfections on default shader and tonemapping
This commit is contained in:
@@ -38,10 +38,10 @@ void main()
|
|||||||
vec3 fragcolor = ambient;
|
vec3 fragcolor = ambient;
|
||||||
vec3 fragnormal = normalize(f_normal);
|
vec3 fragnormal = normalize(f_normal);
|
||||||
float reflectivity = param[1].z;
|
float reflectivity = param[1].z;
|
||||||
float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
|
//float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
|
||||||
glossiness = abs(param[1].w);
|
glossiness = abs(param[1].w);
|
||||||
|
|
||||||
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone);
|
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, 0, shadow_tone);
|
||||||
vec4 color = vec4(apply_fog(fragcolor), tex_color.a * alpha_mult);
|
vec4 color = vec4(apply_fog(fragcolor), tex_color.a * alpha_mult);
|
||||||
/*
|
/*
|
||||||
float distance = dot(f_pos.xyz, f_pos.xyz);
|
float distance = dot(f_pos.xyz, f_pos.xyz);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ void main()
|
|||||||
float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
|
float specularity = (tex_color.r + tex_color.g + tex_color.b) * 0.5;
|
||||||
glossiness = abs(param[1].w);
|
glossiness = abs(param[1].w);
|
||||||
|
|
||||||
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone);
|
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, 0, shadow_tone);
|
||||||
|
|
||||||
if(alphatestfail)
|
if(alphatestfail)
|
||||||
fragcolor.r = 1.0;
|
fragcolor.r = 1.0;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ vec3 filmic(vec3 x)
|
|||||||
// AgX tonemapping based on nxrighthere / Missing Deadlines implementation.
|
// AgX tonemapping based on nxrighthere / Missing Deadlines implementation.
|
||||||
// 0: Default, 1: Golden, 2: Punchy
|
// 0: Default, 1: Golden, 2: Punchy
|
||||||
#ifndef AGX_LOOK
|
#ifndef AGX_LOOK
|
||||||
#define AGX_LOOK 2
|
#define AGX_LOOK 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec3 AgxDefaultContrastApprox(vec3 x)
|
vec3 AgxDefaultContrastApprox(vec3 x)
|
||||||
@@ -109,8 +109,8 @@ vec3 AgxLook(vec3 val)
|
|||||||
|
|
||||||
vec3 offset = vec3(0.0);
|
vec3 offset = vec3(0.0);
|
||||||
vec3 slope = vec3(1.0);
|
vec3 slope = vec3(1.0);
|
||||||
vec3 power = vec3(1.0);
|
vec3 power = vec3(1.6);
|
||||||
float sat = 1.0;
|
float sat = 0.9;
|
||||||
|
|
||||||
#if AGX_LOOK == 1
|
#if AGX_LOOK == 1
|
||||||
// Golden
|
// Golden
|
||||||
|
|||||||
Reference in New Issue
Block a user