# Basic Feedback and buffer implementaion with glsl FOR android

**URL:** <https://discourse.threejs.org/t/basic-feedback-and-buffer-implementaion-with-glsl-for-android/13898>\
**Category:** Questions\
**Tags:** textures, materials, shaders\
**Created:** [March 28, 2020, 11:16pm UTC](https://discourse.threejs.org/t/basic-feedback-and-buffer-implementaion-with-glsl-for-android/13898 "2020-03-28T23:16:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jpuppper](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@Jpuppper](https://discourse.threejs.org/u/Jpuppper)\
**Post date:** [March 28, 2020, 11:16pm UTC](https://discourse.threejs.org/t/basic-feedback-and-buffer-implementaion-with-glsl-for-android/13898/1 "2020-03-28T23:16:33Z")

</div>

Hello everyone ! .

Im having a problem trying to pass a previously buffer to a fragment shader in Android.

My solution works in PC but not in android.  
The shader works in android but without seeing any feedback.

Also i´ve tried to pass it a sampler 2D image as a uniform to the shader in android wich works so makes me think that im not working well with buffers.

Here youll be able to see the running sketch :  
[http://mmtt.com.ar/effect2/](http://mmtt.com.ar/effect2/)

As you can see in PC you can see the feedback and in Android no.

i´ve adapted the code from this stackoverflow:

> <https://stackoverflow.com/questions/57508011/feedback-loop-three-js>

In wich the user claim it works for android but no for me.

Here is a link with the source code.

> **[effect2.rar](https://drive.google.com/file/d/1IdzxUJ_J-8fAXH4SckofbDwLaSIXAaes/view?usp=drive_open)**
>
> Google Drive file.

also i´ve tryed this implemantion wich comes from this post:

> [@Basic Feedback and Buffer Implementation with GLSL Shaders](https://discourse.threejs.org/t/basic-feedback-and-buffer-implementation-with-glsl-shaders/409):
>
> Hey! Have just started playing round with ThreeJS and I’m trying to set up a basic example of a ThreeJS project with GLSL shaders and a Frame Buffer so that I can start experimenting with Feedback effects. The basic idea is simple enough to me, render the shader to a texture and then pass that texture back into the shader. I did a shadertoy implementation of the minimal, feedback shader I’m trying to implement in ThreeJS: [https://www.shadertoy.com/view/MdlBDn](https://www.shadertoy.com/view/MdlBDn) And I’m trying to get it workin…

But is not working.

When I try the feedback from the three.js example :  
[https://threejs.org/examples/#webgl\_postprocessing\_afterimage](https://threejs.org/examples/#webgl_postprocessing_afterimage)  
it works in android BUT i need it to pass it like a texture in my shader and not using it inside the composer :

Any comment or things to try is greatly aprecciated.

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 29, 2020, 9:48am UTC](https://discourse.threejs.org/t/basic-feedback-and-buffer-implementaion-with-glsl-for-android/13898/2 "2020-03-29T09:48:27Z")

</div>

> [@Jpuppper](#):
>
> The shader works in android but without seeing any feedback.

In this case I suggest you check if there are warnings or errors logged in the browser console. You do this like so:

- Enable “USB Debugging” for your smartphone. You can do this in the “Developer Options” menu.
- Connect your smartphone with your computer via USB.
- Open (desktop) Chrome and use the following URL `chrome://inspect/#touch-devices`
- Wait until Chrome recognizes your smartphone. You can then inspect your app in a separate window which allows you access to the browser console and debugging features.

---

<div class="post-metadata">

**Author:** ![Jpuppper](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@Jpuppper](https://discourse.threejs.org/u/Jpuppper)\
**Post date:** [May 4, 2020, 7:58pm UTC](https://discourse.threejs.org/t/basic-feedback-and-buffer-implementaion-with-glsl-for-android/13898/3 "2020-05-04T19:58:53Z")

</div>

Finally I make it work !!!

I take the code from other site wich also does feedback shader :

i´ve uploaded a repo with the example

> **[jpupper/WebShaderGallery](https://github.com/jpupper/WebShaderGallery)**
>
> Contribute to jpupper/WebShaderGallery development by creating an account on GitHub.
