The approach i’m trying is having a game object (sprite) with another game object behind it (no sprite, shader using that texture, but just for the alpha).
For the game object using this shader, the one i’m trying to make into a drop shadow, im using the “multiply” blend mode. The part that i’m stuck on is if it’s possible to control the transparency of the alpha mask? And if so how do i do it?
The attached images are the baseline setup and the use case
Unless I’m missing something about your question, you should be able to control the transparency of the shadow by multiplying this value you’re setting in the Fragment’s Alpha input by a scalar between 0 and 1.
I tried that, but sadly it only works when you have the blend mode set to “alpha”. If the blend mode is set to “multiply” it doesn’t. I’m assuming it’s because of this and or the alpha clip?
Not cheaper, as the blend mode is still standard architecture on the GPU
Source*(something) + Destination*(something)
Nothing about this changed/changes. A ‘Multiply’ blend mode preset just doesn’t use alpha, but that will not affect performance; It’s still a blend mode operation as above.
— It’s setup to use the Multiply preset that is standard in Shadergraph… (you’d have to write the .Shader file yourself to make blend modes different from those four default options)
for this to work intuitively for artists it needed the x2 Invert nodes, a computation increase; Though TBF , those two extra nodes are a negligible cost for an easy to use Multiply sprite.
Thanks for the examples Torbach, I don’t usually work with multiply blending so I didn’t even know the alpha channel is ignored. I just checked and in UE4 the Opacity input is actually greyed out when selecting the “Modulate” blend mode.