> For the complete documentation index, see [llms.txt](https://dynamics.solsarratea.world/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dynamics.solsarratea.world/content/day-1/opcustomshader.md).

# OpCustomShader

```
#ifdef GL_ES
precision highp float;
#endif

IN vec2 texCoord;

// Incoming texture: we tried video and webcam
uniform sampler2D uTexture0;

// Incoming number values
uniform float uTime;
uniform float uNoseX;
uniform float uNoseY;


{{MODULES_HEAD}}

void main()
{
  
   // 1. We read the incoming texture as a vector 4
   vec4 color = texture2D(uTexture0, texCoord); // [ r, g, b, a] 
   
   
   // 2. We use the coordinates given from the operator to place the particles 
   // in the world space
   vec4 positions = vec4(
       (texCoord.x + uNoseX)*20.-10.,           
       (texCoord.y +uNoseY)*20.-10.,          
       color.r*2.,               
       1.);
  
   
   //3. We write 2 textures
   outColor0 = positions; // Has information of the position of the particles
   outColor1= color;      // Will colorize the particles
   
   outColor2 = vec4(0.);
   outColor3 = vec4(0.);
}
```
