Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to Get Alpha Value in a Custom Shader
#1
I created a Shader Graph as shown in the attached image, but even when I assign a color with an alpha value to the particle, the alpha always ends up being 1.
Is there anything I might be doing wrong?
Any help would be greatly appreciated. Thank you in advance!


Attached Files Thumbnail(s)
           
Reply
#2
(26-05-2025, 03:01 PM)nonnamed Wrote: I created a Shader Graph as shown in the attached image, but even when I assign a color with an alpha value to the particle, the alpha always ends up being 1.
Is there anything I might be doing wrong?
Any help would be greatly appreciated. Thank you in advance!

Hi!

Particles' alpha channel is not transferred to mesh vertices. The reason is that fluids of varying transparency are not currently supported: the entire mesh is either transparent or opaque, this is controlled by the FluidRendererPass' Material Type.

For this reason the alpha value of vertices is internally used to store intermediate weights during meshing, and the final value accessible from the shader is 1.

kind regards,
Reply
#3
Thank you for your response.
I wanted to express fluid density by varying the concentration based on density—rendering the denser areas and leaving the lighter areas unrendered.
By setting Bevel to 0, Alpha to 0, and Index of Refraction to 1, I was able to successfully use white as a substitute for transparent.


Attached Files Thumbnail(s)
   
Reply