Hi,

I’m trying to do some basic billboarding with the billboards coming out at a fixed size. But for some reason they are scaling with perspective.

Here’s my vertex shader:

```
attribute vec4 aCentrePosition;
attribute vec2 aCorner;
uniform float uLeafSize;
uniform mat4 uModelWorldMatrix;
uniform mat4 uViewProjectionMatrix;
varying vec2 vLoc;
varying float distance;
void main(){
vec4 TransformedCentre=uViewProjectionMatrix*uModelWorldMatrix *aCentrePosition;
vec2 offset = aCorner*vec2(uLeafSize);
vec4 newPos = TransformedCentre+vec4(offset,0,0);
distance=TransformedCentre.z;
vLoc=aCorner.xy;
gl_Position = newPos;
}
```

As I understand it - TransformedCentre should be in clip space, so I would expect adding offset to consistently add the same amount of screen no matter the z position of the billboard, but the circles I’m getting recede into the distance as you can see here:

What am I missing?

For completeness here’s my fragment shader:

```
precision mediump float;
varying vec2 vLoc;
varying float distance;
float draw_circle(vec2 coord, float radius) {
return step(length(coord), radius);
}
void main() {
float green = 0.6*distance/100.0;
float red = 0.2*distance/100.0;
float blue= 0.2*distance/100.0;
red=clamp(red, 0.0, 0.3);
blue=clamp(blue, 0.0, 0.3);
green=clamp(green, 0.6, 1.0);
float circle=draw_circle(vLoc, 1.0);
if (circle == 0.0)
discard;
vec4 color=vec4(red,green,blue,circle);
gl_FragColor = vec4(color);
}
```

Thanks!