# Newbie: How to pass 2 numbers down to fragementShader

**URL:** <https://discourse.threejs.org/t/newbie-how-to-pass-2-numbers-down-to-fragementshader/64105>\
**Category:** Questions\
**Tags:** shaders\
**Created:** [April 15, 2024, 10:36am UTC](https://discourse.threejs.org/t/newbie-how-to-pass-2-numbers-down-to-fragementshader/64105 "2024-04-15T10:36:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [April 15, 2024, 10:38am UTC](https://discourse.threejs.org/t/newbie-how-to-pass-2-numbers-down-to-fragementshader/64105/2 "2024-04-15T10:38:52Z")

</div>

```javascript
 attribute float aParticlesX;
 attribute float aParticlesY;

```

should be

```javascript
 uniform float aParticlesX;
 uniform float aParticlesY;

```

and you can reference the uniforms directly in the fragment shader… you don’t have to pass them as varyings since they aren’t going to change (“vary”) across the triangle… since they are coming from a uniform. (which is applied (“uniformly”) to the whole drawcall)

---

_[View the full topic](https://discourse.threejs.org/t/newbie-how-to-pass-2-numbers-down-to-fragementshader/64105)._
