Hello fellow PC-coders,
I’m currently learning GLSL-Shaders with the great Course by SimonDev.
Currently I’m stuck at “Custom Attributes”, where he is creating a simple 16 entry float array, passing it as custom color attributes for a 4 vertices plane (for creating a simple color transition between the vertices)
I’ve tried my best to map this three.js tutorial to playcanvas, but I can’t get it to work.
I get no errors, but my test cube stays black.
For the vertex colors of a non-instanced mesh, you could use Mesh API. Here is an example of a procedural plane mesh with each vertex having own color:
Although not an attribute, but you could also pass it as a uniform to be used by shader. You probably have read Custom Shaders manual. We should probably add an example with an array there as well, but you could pass it like this:
Thank you very much, both examples are extremely usefull.
Could you make the Mesh API project public? I wanted to open it again this evening and got a 404 PC Ghost