# How to use Uniform in PixelFlow library

**URL:** <https://discourse.processing.org/t/how-to-use-uniform-in-pixelflow-library/31895>\
**Category:** Libraries\
**Tags:** homework\
**Created:** [August 24, 2021, 7:16pm UTC](https://discourse.processing.org/t/how-to-use-uniform-in-pixelflow-library/31895 "2021-08-24T19:16:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riemo](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Riemo](https://discourse.processing.org/u/Riemo)\
**Post date:** [August 24, 2021, 7:16pm UTC](https://discourse.processing.org/t/how-to-use-uniform-in-pixelflow-library/31895/1 "2021-08-24T19:16:53Z")

</div>

Hi I’m studying Processing library “PixelFlow”.  
I want send Int variable to fragment shader.

How to send variable from Processing to fragmet Shader.

I’m using “Fluid\_StreamLines\_CustomRender” example in “Processing Example → PixelFlow → Fluid2D” (\* This example have feature unlike other PixelFlow example. It load “vert shader” and “fragment shader”)

Thank you

```auto
DwPixelFlow context;
DwFluid2D fluid;
DwFluidStreamLines2D streamlines;

DwGLSLProgram customstreamlinerenderer;

public void setup() {

  String dir = "data/";
  customstreamlinerenderer = context.createShader(
    dir+"streamlineRender_Custom.vert", 
    dir+"streamlineRender_Custom.frag");
}

```
