# Point sprites inverted top down

**URL:** https://discourse.libcinder.org/t/point-sprites-inverted-top-down/2012
**Category:** Uncategorized
**Created:** [June 6, 2022, 1:01pm UTC](https://discourse.libcinder.org/t/point-sprites-inverted-top-down/2012 "2022-06-06T13:01:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![azerty69](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@azerty69](https://discourse.libcinder.org/u/azerty69)
#### Post date: [June 6, 2022, 1:01pm UTC](https://discourse.libcinder.org/t/point-sprites-inverted-top-down/2012/1 "2022-06-06T13:01:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)
#### Post date: [June 6, 2022, 1:48pm UTC](https://discourse.libcinder.org/t/point-sprites-inverted-top-down/2012/2 "2022-06-06T13:48:55Z")

</div>

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

> <https://github.com/cinder/Cinder/blob/master/samples/_opengl/NormalMapping/src/NormalMappingApp.cpp#L165>

---

<div class="post-metadata">

### Author: ![azerty69](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@azerty69](https://discourse.libcinder.org/u/azerty69)
#### Post date: [June 7, 2022, 4:57am UTC](https://discourse.libcinder.org/t/point-sprites-inverted-top-down/2012/3 "2022-06-07T04:57:06Z")

</div>

Hello gabor\_papp,

> [@gabor\_papp](#):
>
> `auto texFormat = gl::Texture2d::Format().loadTopDown();`

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

azerty69
