Add some of the changes from zesterer's patch including decreasing figure glow power, increasing glow of some particles, and fixing water normal normalization

This commit is contained in:
Imbris 2021-07-24 01:40:17 -04:00
parent 7da064fb23
commit bfdee903dd
4 changed files with 7 additions and 7 deletions

View File

@ -18,9 +18,9 @@ vec4 simplefetch(ivec2 uv) {
return texelFetch(sampler2D(t_src_color, s_src_color), uv, 0);
}
// check whether the texel color is higher than threshold, if so output as brightness color
// Check whether the texel color is higher than threshold, if so output as brightness color
vec4 filterDim(vec4 color) {
// TODO: note where this constant came from if we keep it
// constants from: https://learnopengl.com/Advanced-Lighting/Bloom
float brightness = dot(color.rgb, vec3(0.2126, 0.7152, 0.0722));
if(brightness > 1.00)
return vec4(color.rgb, 1.0);

View File

@ -198,7 +198,7 @@ void main() {
// For now, just make glowing material light be the same colour as the surface
// TODO: Add a way to control this better outside the shaders
if ((material & (1u << 0u)) > 0u) {
emitted_light += 1000 * surf_color;
emitted_light += 10 * surf_color;
}
float glow_mag = length(model_glow.xyz);

View File

@ -145,7 +145,7 @@ void main() {
nmap = mix(f_norm, normalize(nmap), min(1.0 / pow(frag_dist, 0.75), 1));
//float suppress_waves = max(dot(), 0);
vec3 norm = vec3(0, 0, 1) * nmap.z + b_norm * nmap.x + c_norm * nmap.y;
vec3 norm = normalize(vec3(0, 0, 1) * nmap.z + b_norm * nmap.x + c_norm * nmap.y);
// vec3 norm = f_norm;
vec3 water_color = (1.0 - MU_WATER) * MU_SCATTER;

View File

@ -355,7 +355,7 @@ void main() {
sin(lifetime * 2.0 + rand2) + sin(lifetime * 9.0 + rand5) * 0.3
),
vec3(raise),
vec4(vec3(5, 5, 1.1), 1),
vec4(vec3(10.3, 9, 1.5), 1),
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5)
);
break;
@ -386,7 +386,7 @@ void main() {
attr = Attr(
spiral_motion(vec3(0, 0, rand3 + 1), spiral_radius, lifetime, abs(rand0), rand1 * 2 * PI) + vec3(0, 0, rand2),
vec3(6 * abs(rand4) * (1 - slow_start(2)) * pow(spiral_radius / length(inst_dir), 0.5)),
vec4(vec3(0, 1.7, 0.7), 1),
vec4(vec3(0, 1.7, 0.7) * 3, 1),
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3)
);
break;
@ -397,7 +397,7 @@ void main() {
attr = Attr(
spiral_motion(inst_dir, 0.3 * (floor(2 * rand0 + 0.5) - 0.5) * min(linear_scale(10), 1), lifetime / inst_lifespan, 10.0, inst_time),
vec3((1.7 - 0.7 * abs(floor(2 * rand0 - 0.5) + 0.5)) * (1.5 + 0.5 * sin(tick.x * 10 - lifetime * 4))),
vec4(vec3(purple_col, green_col, 0.75 * purple_col), 1),
vec4(vec3(purple_col, green_col, 0.75 * purple_col) * 3, 1),
spin_in_axis(inst_dir, tick.z)
);
break;