For me it sounds like, that a CustomLayer should't change the position via the vertex-shader, but in the example it totally does exactly that:
// Optionally Define a vertex shader!
// Same rules as fragment shaders, except no blend modes.
// Return a non-transformed vec3 position.
static vertexShader = `
// Varyings must be prefixed by "v_"
varying vec3 v_Position;
void main() {
v_Position = position;
return position * 2.;
}
So Return a non-transformed vec3 position. sounds to me that return position * 2.; shouldn't be done (I mean of course you can do that, but as a best practise it shouldn't right?).
When I copied the example I was surprised that my mesh had increased in size.
Am I the only one that thinks that the implementation of https://github.com/pmndrs/lamina/blob/main/README.md?plain=1#L205-L216 is confusing when looking at the comment?
For me it sounds like, that a CustomLayer should't change the position via the vertex-shader, but in the example it totally does exactly that:
So
Return a non-transformed vec3 position.
sounds to me thatreturn position * 2.;
shouldn't be done (I mean of course you can do that, but as a best practise it shouldn't right?).When I copied the example I was surprised that my mesh had increased in size.