Point sprites inverted top down

Hello community,

When I render point sprites, they are inverted. How to fix the origin?
Here is the shader I use:

ps = gl::GlslProg::create(gl::GlslProg::Format().vertex(CI_GLSL(150,

	uniform mat4 ciModelViewProjection;
	in vec4 ciPosition;
	in vec4 ciColor;
	in float vSize;

	out vec4 color;

	void main(void)
	{
		gl_Position = ciModelViewProjection * ciPosition;
		gl_PointSize = vSize;
		color = ciColor;
	}

	)).fragment(CI_GLSL(150,

	uniform sampler2D uTexture;
	in vec4 color;

	out vec4 oColor;

	void main(void)
	{
		oColor = color * texture(uTexture, gl_PointCoord);
	}
)));

Any help appreciated,
azerty69

Use loadTopDown() when loading your texture. Something like this:

Hello gabor_papp,

This solved my problem. Thank you! Libcinder is really a great library!

azerty69

1 Like