Home

White background color for AO and shadow passes
OpenPublic

Description
For "subtractive" passes, such as AO and shadows, it makes compositing much easier when the default background color is white instead of black (no additional masking required). This was a request by Sebastian Koenig.

This patch initializes AO and shadow background color as white and then treats ao and shad values in render result as negative influences on full lighting:

result -= 1 - color
<=> result += color - 1

i.e. OSA filtering uses the (shr->ao - 1) values.

Currently that light transformation happens at final pass filtering, but Ton suggested to move this further down "to the shader level".

Compatibility code has been added in the form of a new render layer flag "black background", which is off by default and enabled by do_versions for old files, to avoid breaking old compositor setups with compensation masks. Brecht suggested moving such compatibility switches into a separate UI section to avoid clutter.
lukastoenne (Lukas Toenne) added a comment.Via Old WorldNov 25 2011, 9:29 AM
Added two images to demonstrate the effect
letterrip (Tom Musgrove) added a comment.Via Old WorldMar 6 2012, 1:47 AM
Hopefully brecht can look
brecht (Brecht Van Lommel) placed this task up for grabs.Via WebNov 9 2014, 3:19 PM
sergey (Sergey Sharybin) claimed this task.Via WebThu, Feb 26, 10:50 AM

Add Comment