Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Layer with Colour_Dodge is freaky


Just add a new layer fill, have it be color_dodge blend mode and voila.

Comments

  • odesodes Administrator
    Thanks for reporting. Seems like the alpha channel is affected by fill layer, which it shouldn't be. (Affecting alpha will affect alpha clipping, but only for externalities i.e. head, hands and feet.) Apparently, using COLOR_DODGE produces a result which will clip the mesh with this color combination. Solution is to not affect alpha channel for fill.

    Default color is gray (77,77,77,255).
    Previous layer color is (77,77,77,255)

    Color dodge is implemented as:
    b / (1 - a)

    Where b is background (previous layer), a is "active" (current layer).

    255 = 1.0 in float ( 255/255)

    1.0 / (1.0 - 1.0) <--- I'm guessing this is producing division by zero error.

    We later on saturate (clamp) the value in the shader, so maybe that's why it becomes zero.

    Either way, alpha shouldn't be affected for fill layer. Fixed for next release.
  • odesodes Administrator
    Actually, seems like we weren't saturating, which is risky. So good that you brought this up. When saturating, the result is more as expected.

    Still, alpha shouldn't be affected (which it isn't anymore), but result should definitely be saturated too (it is now).
  • Oh man, @Odes with the technical detail haha.
Sign In or Register to comment.