Okay, this got somewhat derailed by unforseen complications, but since I have the impression we're back on track... If you want to experiment with a simple test-bed for a shader based solution please open
Shaders/filters-ALS.frag
and insert the following function
- Code: Select all
vec3 g_force (in vec3 color) {
vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.5);
float greyout_band_width = 0.2;
float blackout_band_width = 0.3;
float greyout = smoothstep( brightness * display_ysize, (brightness + greyout_band_width) * display_ysize, length(gl_FragCoord.xy -center));
float tgt_brightness = (1.0 - 0.3 * greyout);
color = mix(color, vec3 (1.0, 1.0, 1.0) * mix(length(color), tgt_brightness, greyout) , greyout);
color *= (1.0 - 0.3 * greyout);
float blackout = 1.0 - smoothstep( gamma * display_ysize, (gamma + blackout_band_width) * display_ysize, length(gl_FragCoord.xy -center));
color *= blackout;
return color;
}
above vec3 filter_combined (in vec3 color) {
and then modify the start of the latter function by inserting a call to g_force
- Code: Select all
vec3 filter_combined (in vec3 color) {
return g_force(color);
if (use_filtering == false)
{
return color;
}
...
This disables the normal functioning of the filters and allows you to drive the blackout and greyout terminators via
/sim/rendering/als-filters/brightness
/sim/rendering/als-filters/gamma
(the defaults will of course be wrong so you'll see strong effects on the runway at startup unless you drive these to reasonable values - it's just a setup for you to play with and give feedback for refinement).