-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Left a few comments inline but they are mostly nits.
return BlendHardLight(dst, src); | ||
} | ||
|
||
#include "advanced_blend.glsl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Newline at EOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
#include "advanced_blend_utils.glsl" | ||
|
||
vec3 Blend(vec3 dst, vec3 src) { | ||
vec3 D = MixComponents(((16 * dst - 12) * dst + 4) * dst, // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to look up which variant you'd used on Wikipedia. I think it'd be good to document this is W3C variant here. Adding documentation for all blend modes either inline here or in a new doc in the docs/
folder would be great (in a separate patch is fine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, all of these come from https://www.w3.org/TR/compositing-1/#blendingseparable. Added comments to each of these shaders linking the relevant sections. Documenting this along with the blend situation in general seems like a good idea -- I'll start working on a doc add it in a later patch.
2c26386
to
ae5cb9d
Compare
That is the question... and the answer is yes.
Adds all the remaining "separable" blend modes. I plan to land the 4 remaining ("non-separable") blends (Hue, Saturation, Color, and Luminosity) in a separate patch.
Screen.Recording.2022-06-03.at.5.01.56.PM.mov