https://www.babylonjs-playground.com/#4ETD1M#1
I know I’m missing something. Can’t figure out what.
Best regards,
Chris
https://www.babylonjs-playground.com/#4ETD1M#1
I know I’m missing something. Can’t figure out what.
Best regards,
Chris
Hi and welcome @Butterwell!
I’m a shader newbie myself but have been playing a bit with them lately.
How about this: https://www.babylonjs-playground.com/#4ETD1M#2
i.e. use vec3 colors and blend with alpha before returning. I guess it depends what effect you’re going for though.
EDIT: I see now this isn’t working . Most of what I’ve been doing lately is procedural texture shaders and this technique works. Not sure what else needs to happen to use alpha with ShaderMaterial so am curious to hear from the shader experts here.
@inteja Thank you for that. Glad you could figure out my question. For everyone else, and to be a bit more explicit: how do you make the “default” white color of the octagon mesh be transparent instead?
The following makes transparent colors work:
shaderMaterial.alpha = 0.99999;
You need to add needAlphaBlending
https://www.babylonjs-playground.com/#4ETD1M#4
@MarianG Thank you!