My vertex shader line w = position.x*position.x always gives me a constant value

Yes this would work !!! vertex to move around and Fragment to shade or paint :slight_smile:

This is expected as -5 * -5 would be 25 and you need to keep the sign to create a triangle.

Basically your vertices data needs to represent a triangle to be drawn but by squaring x, you end up with a point or rather a line which is not visible, so you simply need to keep the sign in https://playground.babylonjs.com/#7DRA7M#1

1 Like