Commit 50e3c912 authored by Florian Oetke's avatar Florian Oetke
Browse files

finally (mostly) fixed halo GI artefacts

parent 6e7fea7b
......@@ -39,7 +39,7 @@ namespace mirrage::renderer {
bool gi_shadows = false;
int gi_diffuse_mip_level = 1;
int gi_min_mip_level = 0;
int gi_samples = 32;
int gi_samples = 64;
int gi_lowres_samples = 128;
int gi_low_quality_mip_levels = 0;
......
......@@ -74,7 +74,7 @@ float pixel_intensity(vec3 c) {
}
void main() {
// read diffuse color, modulate with modulo if equal to min/max of neighborhood => noise
// read diffuse color, modulate with median if equal to min/max of neighborhood => noise
ivec2 result_sampler_size = textureSize(result_sampler, 0).xy;
ivec2 uv = ivec2(result_sampler_size * vertex_out.tex_coords);
......
......@@ -9,7 +9,7 @@ layout(set=0, binding = 0) uniform Global_uniforms {
mat4 inv_proj_mat;
vec4 eye_pos;
vec4 proj_planes; //< near, far, fov horizontal, fov vertical
vec4 time; //< time, sin(time), delta_time, frame-number % 100.000
vec4 time; //< time, sin(time), delta_time, frame-number % 20
vec4 proj_info;
} global_uniforms;
......
......@@ -41,10 +41,10 @@ float calc_upsampled_weights(sampler2D highres_depth_sampler, sampler2D highres_
uv_01 = tex_coords + vec2(-1, 1) / tex_size;
// initialize the per-pixel weights with gaussian weights
weight_00 = vec4(1,2,1,1)/20.0;//vec4(0.125794409230998, 0.132980760133811, 0.125794409230998, 0.118996412547595);
weight_10 = vec4(2,1,1,1)/20.0;//vec4(0.125794409230998, 0.106482668507451, 0.100728288549083, 0.118996412547595);
weight_11 = vec4(1,1,1,2)/20.0;//vec4(0.100728288549083, 0.085264655436308, 0.100728288549083, 0.118996412547595);
weight_01 = vec4(1,1,2,1)/20.0;//vec4(0.100728288549083, 0.106482668507451, 0.125794409230998, 0.118996412547595);
weight_00 = vec4(1,2,1,1)/20.0;
weight_10 = vec4(2,1,1,1)/20.0;
weight_11 = vec4(1,1,1,2)/20.0;
weight_01 = vec4(1,1,2,1)/20.0;
// calculate the maximum depth deviation based on the distance, to reduce bluring
// near the camera where it's most noticable
......
......@@ -296,7 +296,7 @@ namespace mirrage::renderer {
{
_time_acc += dt.value();
_delta_time = dt.value();
_frame_counter = (_frame_counter + 1) % 1000000;
_frame_counter = (_frame_counter + 1) % 10;
for(auto& pass : _passes) {
if(pass)
......
......@@ -92,7 +92,7 @@ namespace mirrage::renderer {
}
constexpr auto offsets = build_halton_2_3<32>();
constexpr auto offset_factor = 0.25f;
constexpr auto offset_factor = 0.05f;
} // namespace
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment