Hello everyone,
I am trying to create a “heat-map” effect along the axis of a custom extrusion in Babylon.js and was hoping to get some guidance on how to achieve this. Specifically, I am trying to create a gradient effect where one end of the extrusion is one color and the other end is a separate color with blending in-between.
I have tried controlling UV coordinates with a gradient texture and have played with the gradient material, but unfortunately, neither approach has worked. I believe a custom shader will be needed to achieve the desired effect, but I don’t have experience with shader language. I was hoping someone could suggest the best way to approach this.
Ideally, I would like to pass a concentration value for each point in the extruded shape to the shader, which would then handle the coloring based on this value. It would be even better if I could configure multiple color stops.
I have created a basic playground which should provide a more tangible example of what I am trying to achieve: https://playground.babylonjs.com/#1R3NGA#2.
If anyone has any suggestions or examples of how to achieve this, I would be very grateful.
Thank you in advance for your help!