diff --git a/app-proto/inversive-display/src/inversive.frag b/app-proto/inversive-display/src/inversive.frag index 2fcd86e..9913b40 100644 --- a/app-proto/inversive-display/src/inversive.frag +++ b/app-proto/inversive-display/src/inversive.frag @@ -46,6 +46,7 @@ uniform bool debug_mode; const float focal_slope = 0.3; const vec3 light_dir = normalize(vec3(2., 2., 1.)); const float ixn_threshold = 0.005; +const float INTERIOR_DIMMING = 0.7; // --- sRGB --- @@ -143,6 +144,7 @@ void main() { vec2 hit_depths = sphere_cast(sphere_list[id], dir); // insertion-sort the fragments we hit into the fragment list + float dimming = 1.; for (int side = 0; side < 2; ++side) { float hit_z = -hit_depths[side]; if (0. > hit_z) { @@ -154,7 +156,7 @@ void main() { frags[layer] = sphere_shading( sphere_list[id], hit_depths[side] * dir, - color_list[id], + dimming * color_list[id], id ); } @@ -167,6 +169,7 @@ void main() { } } layer_cnt = min(layer_cnt + 1, LAYER_MAX); + dimming = INTERIOR_DIMMING; } } }