# Demo Doodle grupal

```
// Author: Sol Sarratea @solquemal
// Title: Shader jam

precision mediump float;

uniform float time;
uniform vec2 resolution;
uniform sampler2D doodle;
uniform sampler2D backbuffer;

vec2 uv(){
    /* Devuelve las posiciones del canvas en rango [-1.,1.]x[-1.,1.] */
    vec2 pos = gl_FragCoord.xy/resolution *2.- 1. ; 
  	pos.x *= resolution.x/resolution.y;
  	return pos;
}

vec2 uvN(){
    /* Devuelve las posiciones del canvas en rango [0.,1.]x[0.,1.] */
    vec2 pos = gl_FragCoord.xy/resolution; 
    return pos;
}

void main() {
    vec2 pos; vec4 color;
    pos = uv();
 		
  	color = texture2D(doodle,uvN());
  
  	color= mix(vec4(0.,0.,0.,1.), color, step(0.9,color.a));
  
  	vec4 backbuffer = texture2D(backbuffer, uvN()*vec2(0.99+sin(pos.y*20.+time)*0.1,1.1+cos(pos.x*10.+time)*0.01));
    
        gl_FragColor = max(backbuffer*0.99,color); 

}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lashaderwiki.solsarratea.world/charlas/shader-jam/vedajs/demo-doodle-grupal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
