Page 1 of 1

Shader issue with alpha

Posted: 29 May 2020, 19:01
by Robert
Hi devs,

I think that we have a problem with alpha in HLSL shader.

The green circle should be totaly transparent in the second case. Look at the attached pictures and the shader code.

We would appreciate a quick fix if it's a real bug.

Thx

R

Re: Shader issue with alpha

Posted: 29 May 2020, 20:56
by lerou
The output is pre-multiplied. Apply your alpha to RGB before outputting it (multiply RGB * A)

Re: Shader issue with alpha

Posted: 29 May 2020, 21:30
by Robert
Ok man you are my master :oops:

Thank you lerou !

R

Re: Shader issue with alpha

Posted: 31 May 2020, 12:50
by remi_agi
Hello lerou,

Do you know the new semantic for this ?

Code: Select all

AlphaBlendEnable = TRUE;
...
AlphaBlendEnable
AlphaTestEnable
BlendOp
CullMode
DestBlend
SrcBlend
StencilEnable
StencilFail
StencilFunc
StencilMask
StencilPass
StencilRef
StencilWriteMask
StencilZFail
ZEnable
ZFunc
ZWriteEnable

Re: Shader issue with alpha

Posted: 31 May 2020, 15:39
by lerou
Those parameters can be set up using native Ventuz nodes.

Re: Shader issue with alpha

Posted: 01 Jun 2020, 06:23
by lerou
you can also set them up in the technique section of the Shader. See Ventuz doc for details.