# The results of one shader run are used as texture input for another shader

**URL:** <https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274>\
**Category:** Questions\
**Tags:** shader\
**Created:** [December 5, 2022, 3:07pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274 "2022-12-05T15:07:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecojust](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ecojust/32/12884_2.png) [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Post date:** [December 5, 2022, 3:07pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/1 "2022-12-05T15:07:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/c/6cc681e6c88f06f82d1bb680f79261fd2e409e08.jpeg)

Are there any supported apis for reference？  
Thanks

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [December 5, 2022, 3:12pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/2 "2022-12-05T15:12:26Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/1/f/1fca0b34be4ac1d80f13d61f2e1a8fa4a770b0c1.png)

> **[Playground search page | Babylon.js Documentation](https://doc.babylonjs.com/playground?q=Simulation&type=tags)**
>
> Playground earch page for Babylon.js documentation site

They might have to be updated due to system changes, but both of these do that.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 5, 2022, 3:18pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/3 "2022-12-05T15:18:33Z")

</div>

This is exactly what a render target is for and if it is a “full screen” or texture quad, it is similar to a Procedural Texture.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 5, 2022, 3:29pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/4 "2022-12-05T15:29:25Z")

</div>

[Render Target Texture With Multiple Passes | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/renderTargetTextureMultiPass)

---

<div class="post-metadata">

**Author:** ![ecojust](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ecojust/32/12884_2.png) [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Post date:** [December 5, 2022, 3:44pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/5 "2022-12-05T15:44:05Z")

</div>

That’s right. I forgot about rtt 😆

My head is not working well. Maybe I should have a good rest. It is almost 12 o 'clock at night here

---

<div class="post-metadata">

**Author:** ![ecojust](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ecojust/32/12884_2.png) [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Post date:** [December 5, 2022, 3:50pm UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/6 "2022-12-05T15:50:59Z")

</div>

```auto
    renderTarget.setMaterialForRendering(ground, causticMaterial);

```

nono, it looks a little different, I’m talking about bufferA without any mesh as a carrier

You could interpret that as adding it to the post-effects

---

<div class="post-metadata">

**Author:** ![ecojust](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ecojust/32/12884_2.png) [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Post date:** [December 6, 2022, 2:24am UTC](https://forum.babylonjs.com/t/the-results-of-one-shader-run-are-used-as-texture-input-for-another-shader/36274/7 "2022-12-06T02:24:39Z")

</div>

> [@ecojust](#):
>
> nono, it looks a little different, I’m talking about bufferA without any mesh as a carrier
> 
> You could interpret that as adding it to the post-effects

> **[Babylon.js Playground](https://playground.babylonjs.com/#TG2B18%2360)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

@carolhmj I clicked on this case yesterday, and I felt a little different, but I didn’t realize you didn’t know I was looking at this case  
As it turns out, take a break, or your brain can’t keep up 😄
