Added a define to toggle indirect lighting on or off, depending if there is a light probe in the light list or not.
However, this is not ideal, as this code will trigger a recompilation of the shader on each pass, in case there is more than 1 lighting pass. Another way could be to multiply the indirect lighting contribution by the Ambient light color in the shader, and always perform the indirect lighting code (even without light probe). As in the second pass ambient light is forced to 0, the indirect lighting contribution would be nullified. However we'd have to force ambient light to 0 if there are no light probe. This would also have the nice side effect of having a way to dim or boost indirect lighting with the ambient light color.define_list_fix
parent
39fe8326ba
commit
ab981b76fc
Loading…
Reference in new issue