# Quick Q on transform feedback shaders (ParticleSphereGPU sample)

**URL:** https://discourse.libcinder.org/t/quick-q-on-transform-feedback-shaders-particlespheregpu-sample/418
**Category:** Using Cinder
**Created:** [November 28, 2016, 4:54am UTC](https://discourse.libcinder.org/t/quick-q-on-transform-feedback-shaders-particlespheregpu-sample/418 "2016-11-28T04:54:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![julapy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/julapy/32/231_2.png) [@julapy](https://discourse.libcinder.org/u/julapy)
#### Post date: [November 28, 2016, 4:54am UTC](https://discourse.libcinder.org/t/quick-q-on-transform-feedback-shaders-particlespheregpu-sample/418/1 "2016-11-28T04:54:02Z")

</div>

hi there,

its not entirely clear to me how i can pass per-vertex data between the transform feedback shader and the vertex shader.

this seems to be done behind the scenes for ciPosition and ciColor, but how do i create my own in from the transform feedback shader?

basically im calculating the gl\_pointSize in my transform feedback shader and i need to set it in the vertex shader. any suggestions?

cheers.

---

<div class="post-metadata">

### Author: ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)
#### Post date: [November 28, 2016, 10:03am UTC](https://discourse.libcinder.org/t/quick-q-on-transform-feedback-shaders-particlespheregpu-sample/418/2 "2016-11-28T10:03:39Z")

</div>

Have you looked at the TransformFeedbackSmokeParticles sample that comes with cinder? It shows how to setup varyings to a transform feedback shader.

---

<div class="post-metadata">

### Author: ![julapy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/julapy/32/231_2.png) [@julapy](https://discourse.libcinder.org/u/julapy)
#### Post date: [November 28, 2016, 11:31am UTC](https://discourse.libcinder.org/t/quick-q-on-transform-feedback-shaders-particlespheregpu-sample/418/3 "2016-11-28T11:31:44Z")

</div>

wow, thats exactly what i needed… no idea how i missed that!  
thanks again @lithium for your help.
