I have a unique art piece made up of particles that are currently squares. I would like to transform them into rectangles. I am aware that non-uniform scaling is not supported for points, but I am seeking advice on how to achieve this desired effect.
Below is the custom fragment shader I am currently using:
vec2 pUv = gl_PointCoord;
pUv.y = 1. - pUv.y;
vec2 uv = vUv + vSize * pUv;
vec4 texColor = texture2D( texture, uv );
outgoingLight *= texColor.xyz;
gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );
Is it possible to make each square appear as a rectangle with a size ratio of x: 0.7, y: 1 by introducing partial transparency? I have not been able to find any existing examples of this technique.
Here is the current example of my artwork: https://jsfiddle.net/7jtvkh0x/