2 Commits

Author SHA1 Message Date
202ba31d79 update glm to 1.0.0 2024-01-26 12:40:28 +01:00
df949a5afc add (very) fake halation to the bloom extraction shader 2023-10-31 17:17:59 +01:00
2 changed files with 14 additions and 2 deletions

2
external/glm vendored

View File

@@ -102,6 +102,9 @@ in vec2 _uv;
out vec3 _out_color;
// global config, keep it constant
const float fake_halation_strenth = 1.0;
void main() {
vec3 color = texture(color_tex, _uv).rgb;
@@ -114,7 +117,16 @@ void main() {
//step(vec3(0.0), color)
//);
_out_color = max(min(color, vec3(0.0)), color - vec3(1.0));
const vec3 fake_halation_base = vec3(0.03, 0.01, 0.0) * vec3(fake_halation_strenth);
const vec3 fake_halation_extraction_offset = vec3(1.0) - fake_halation_base;
const vec3 fake_halation_bloom_fact = vec3(1.0) + fake_halation_base;
if (fake_halation_strenth <= 0.001) {
_out_color = max(min(color, vec3(0.0)), color - vec3(1.0));
} else {
_out_color = max(min(color, vec3(0.0)), color - fake_halation_extraction_offset) * fake_halation_bloom_fact;
//_out_color = max(min(color, vec3(0.0)), color - vec3(0.95, 0.97, 1.0)) * vec3(1.10, 1.05, 1.0);
}
})")
}