# How to create glsl inputs

**URL:** <https://discourse.processing.org/t/how-to-create-glsl-inputs/6855>\
**Category:** Coding Questions\
**Created:** [December 23, 2018, 5:55pm UTC](https://discourse.processing.org/t/how-to-create-glsl-inputs/6855 "2018-12-23T17:55:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vjjv](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@vjjv](https://discourse.processing.org/u/vjjv)\
**Post date:** [December 23, 2018, 5:55pm UTC](https://discourse.processing.org/t/how-to-create-glsl-inputs/6855/1 "2018-12-23T17:55:18Z")

</div>

hello! i want to create some vertex shaders input, to send data per vertex. I dont know exactly how can i do it. im sure that some of you have this information. Actually my shaders inputs are texCoord, Color, position, normal… but i need to send more information (actually now im using the fill() method to send data color but not with that propose, just to get the number, i want to create a separe input)

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [December 23, 2018, 8:21pm UTC](https://discourse.processing.org/t/how-to-create-glsl-inputs/6855/2 "2018-12-23T20:21:50Z")

</div>

Hi! What you are looking for is called “custom attributes”. texCoord, color, position and normal are the attributes that Processing sets using methods like `fill()`. You can do that definitely with low level opengl, but I don’t know if it’s possible otherwise.  
In [https://processing.github.io/processing-javadocs/core/](https://processing.github.io/processing-javadocs/core/) you can see a bunch of methods dealing with attributes. Maybe you can find examples online or in the previous forum? Here a similar question but without answer: [https://forum.processing.org/two/discussion/18688/how-does-the-point-shader-work-with-custom-attributes](https://forum.processing.org/two/discussion/18688/how-does-the-point-shader-work-with-custom-attributes)

Update: maybe the [PShape.attrib()](https://processing.github.io/processing-javadocs/core/processing/core/PShape.html#attrib-java.lang.String-float...-) method does the trick? There’s no examples, but you can try…

BTW. In my last project I did your same trick: send unrelated data in the normals attribute. I had no time to figure out if there was a better way.
