# \#render-target

**URL:** https://discourse.threejs.org/tag/render-target/100.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [I’m getting a flipped texture when rendering to a render target using the WebGPU version of Three.js, even with flipY disabled](https://discourse.threejs.org/t/i-m-getting-a-flipped-texture-when-rendering-to-a-render-target-using-the-webgpu-version-of-three-js-even-with-flipy-disabled/81152)

<div class="topic-metadata">

**Author:** [@prizemlenie](https://discourse.threejs.org/u/prizemlenie)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 10:59am UTC](https://discourse.threejs.org/t/i-m-getting-a-flipped-texture-when-rendering-to-a-render-target-using-the-webgpu-version-of-three-js-even-with-flipy-disabled/81152 "2026-02-20T10:59:34Z")

</div>

Hi everyone! I’m trying to apply some effects to a texture using shaders. To do this, I use a full screen quad, and in its shader, for each fragment, I get its UV coordinates, sample the texture using these coordinates,…

---

## [Struggling to recreate WebGL ping-pong buffers with WebGPU and TSL](https://discourse.threejs.org/t/struggling-to-recreate-webgl-ping-pong-buffers-with-webgpu-and-tsl/87462)

<div class="topic-metadata">

**Author:** [@qtnrtnd](https://discourse.threejs.org/u/qtnrtnd)\
**Replies:** 6\
**Last updated:** [November 3, 2025, 1:59pm UTC](https://discourse.threejs.org/t/struggling-to-recreate-webgl-ping-pong-buffers-with-webgpu-and-tsl/87462 "2025-11-03T13:59:06Z")

</div>

Hi, I try to translate this code: ogl/src/extras/Flowmap.js at master · oframe/ogl · GitHub ogl/examples/mouse-flowmap.html at master · oframe/ogl to WebGPU and TSL on my sveltekit + threlte project When outputting …

---

## [Getting realistic light colours from three sky shader](https://discourse.threejs.org/t/getting-realistic-light-colours-from-three-sky-shader/86365)

<div class="topic-metadata">

**Author:** [@Tamsin](https://discourse.threejs.org/u/Tamsin)\
**Replies:** 0\
**Last updated:** [August 19, 2025, 10:08am UTC](https://discourse.threejs.org/t/getting-realistic-light-colours-from-three-sky-shader/86365 "2025-08-19T10:08:03Z")

</div>

I’m trying to use the sky shader from the three examples to get realistic and dynamic lighting for my scenes. I’m pointing some orthographic cameras at the sun position, directly up, and directly down, and using the .re…

---

## [WebGLArrayRenderTarget FloatType problem](https://discourse.threejs.org/t/webglarrayrendertarget-floattype-problem/82529)

<div class="topic-metadata">

**Author:** [@null-none-nix](https://discourse.threejs.org/u/null-none-nix)\
**Replies:** 5\
**Last updated:** [May 15, 2025, 1:52pm UTC](https://discourse.threejs.org/t/webglarrayrendertarget-floattype-problem/82529 "2025-05-15T13:52:21Z")

</div>

Please help. I tried to create a three.WebGLArrayRenderTarget with three.FloatType but found the texture type is still three.UnsignedByteType. I thought my device didn’t support float textures, just to verify that, I c…

---

## [How to apply webGlRenderTarget texture properly?](https://discourse.threejs.org/t/how-to-apply-webglrendertarget-texture-properly/82455)

<div class="topic-metadata">

**Author:** [@qwothex](https://discourse.threejs.org/u/qwothex)\
**Replies:** 3\
**Last updated:** [May 13, 2025, 6:15pm UTC](https://discourse.threejs.org/t/how-to-apply-webglrendertarget-texture-properly/82455 "2025-05-13T18:15:32Z")

</div>

i’m trying to make interactive screen of TV by using webGlRenderTarget as a screen texture, i created the second scene and camera, but nothing works properly. Despite it actually rendering on the screen, it doesn’t behav…

---

## [Dynamic textures (WebGLRenderTarget) stops updating when switching to VR](https://discourse.threejs.org/t/dynamic-textures-webglrendertarget-stops-updating-when-switching-to-vr/79264)

<div class="topic-metadata">

**Author:** [@matra774](https://discourse.threejs.org/u/matra774)\
**Replies:** 3\
**Last updated:** [March 10, 2025, 11:53am UTC](https://discourse.threejs.org/t/dynamic-textures-webglrendertarget-stops-updating-when-switching-to-vr/79264 "2025-03-10T11:53:28Z")

</div>

Hi, I have a VR scene that uses textures that are dynamically created through WebGLRenderTarget. Everything works OK when working in normal mode, but when I switch to VR, the dynamic texture update does not seem to wo…

---

## [Health Card Portal \[TSL\]](https://discourse.threejs.org/t/health-card-portal-tsl/77631)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [February 14, 2025, 12:34am UTC](https://discourse.threejs.org/t/health-card-portal-tsl/77631 "2025-02-14T00:34:08Z")

</div>

Hi community! Video: Demo: https://codepen.io/prisoner849/full/PwYrZvR Looking at another demo: How to draw a sine wave of changing wavelength? - #5 by prisoner849, I had a feeling, that that dodecahedron has to…

---

## [Postprocessing SSR with renderTarget (R3F)](https://discourse.threejs.org/t/postprocessing-ssr-with-rendertarget-r3f/76743)

<div class="topic-metadata">

**Author:** [@aronanol45](https://discourse.threejs.org/u/aronanol45)\
**Replies:** 2\
**Last updated:** [January 20, 2025, 7:38am UTC](https://discourse.threejs.org/t/postprocessing-ssr-with-rendertarget-r3f/76743 "2025-01-20T07:38:08Z")

</div>

Hello guys, Actually trying to implement SSR ( https://codesandbox.io/p/sandbox/8pbw1f ) on my project. To be clear I use two camera to renderTarget, at the end i retrieve the two textures from the renderTargets, pass …

---

## [How to get multiple render target pixel value by readRenderTargetPixels](https://discourse.threejs.org/t/how-to-get-multiple-render-target-pixel-value-by-readrendertargetpixels/75889)

<div class="topic-metadata">

**Author:** [@johnhuang](https://discourse.threejs.org/u/johnhuang)\
**Replies:** 0\
**Last updated:** [January 2, 2025, 1:08am UTC](https://discourse.threejs.org/t/how-to-get-multiple-render-target-pixel-value-by-readrendertargetpixels/75889 "2025-01-02T01:08:03Z")

</div>

I have such vertex shader attribute int id; attribute int group; flat varying int vid; flat varying int vgroup; void main() { vid = id; vgroup = group; gl\_Position = projectionMatrix \* modelViewMatrix \* vec4( position…

---

## [How do you get multiple outputs from a fragment shader in a Shader Material?](https://discourse.threejs.org/t/how-do-you-get-multiple-outputs-from-a-fragment-shader-in-a-shader-material/74959)

<div class="topic-metadata">

**Author:** [@solk](https://discourse.threejs.org/u/solk)\
**Replies:** 4\
**Last updated:** [December 14, 2024, 11:27am UTC](https://discourse.threejs.org/t/how-do-you-get-multiple-outputs-from-a-fragment-shader-in-a-shader-material/74959 "2024-12-14T11:27:25Z")

</div>

I am currently trying to implement a Lattice-Boltzmann Implementation of fluid simulation in threeJS. This requires each point in the grid to hold 9 values representing distribution functions for the fluid. Since all of …

---

## [Click on mesh trough rendered](https://discourse.threejs.org/t/click-on-mesh-trough-rendered/75116)

<div class="topic-metadata">

**Author:** [@aronanol45](https://discourse.threejs.org/u/aronanol45)\
**Replies:** 7\
**Last updated:** [December 12, 2024, 7:00pm UTC](https://discourse.threejs.org/t/click-on-mesh-trough-rendered/75116 "2024-12-12T19:00:12Z")

</div>

Hello guys, As you can see here I achieved to got two cameras rendering their textures, and apply these two textures on planes. I a trying to click on the mesh ( cube) on these 2 planes and their rendered-textures to r…

---

## [How to share meshs between renderTarges](https://discourse.threejs.org/t/how-to-share-meshs-between-rendertarges/75054)

<div class="topic-metadata">

**Author:** [@aronanol45](https://discourse.threejs.org/u/aronanol45)\
**Replies:** 3\
**Last updated:** [December 11, 2024, 6:47pm UTC](https://discourse.threejs.org/t/how-to-share-meshs-between-rendertarges/75054 "2024-12-11T18:47:35Z")

</div>

Hi guys, hope you’re doing well. Got a question about how to deal to share some meshes between 2-3 renderTargets. Tried to figure out with r3f, but the tools provided by Drei ( like portals) , wrap the meshs and it see…

---

## [Portal clipping shader in VR](https://discourse.threejs.org/t/portal-clipping-shader-in-vr/30896)

<div class="topic-metadata">

**Author:** [@yelouafi](https://discourse.threejs.org/u/yelouafi)\
**Replies:** 3\
**Last updated:** [November 21, 2024, 6:00am UTC](https://discourse.threejs.org/t/portal-clipping-shader-in-vr/30896 "2024-11-21T06:00:25Z")

</div>

I was trying to recreate a portal demo by adapting the code from Coding Adventure: Portals - YouTube I use a render target with a custom shader to clip the target scene to the portal mesh. const vertexShader = \` va…

---

## [glDrawElements: Source and destination textures of the draw are the same?](https://discourse.threejs.org/t/gldrawelements-source-and-destination-textures-of-the-draw-are-the-same/8411)

<div class="topic-metadata">

**Author:** [@Aerion](https://discourse.threejs.org/u/Aerion)\
**Replies:** 5\
**Last updated:** [October 8, 2024, 10:43pm UTC](https://discourse.threejs.org/t/gldrawelements-source-and-destination-textures-of-the-draw-are-the-same/8411 "2024-10-08T22:43:20Z")

</div>

Can someone please explain why I’m getting error: “256\[.WebGL-0000020D0387DAA0\]GL ERROR :GL\_INVALID\_OPERATION : glDrawElements: Source and destination textures of the draw are the same.” & how to fix? Thank you!

---

## [Advanced, multi Pass renderTarget mix shader with unexpected opacity](https://discourse.threejs.org/t/advanced-multi-pass-rendertarget-mix-shader-with-unexpected-opacity/72527)

<div class="topic-metadata">

**Author:** [@FuzzyWobble](https://discourse.threejs.org/u/FuzzyWobble)\
**Replies:** 5\
**Last updated:** [October 8, 2024, 7:45am UTC](https://discourse.threejs.org/t/advanced-multi-pass-rendertarget-mix-shader-with-unexpected-opacity/72527 "2024-10-08T07:45:19Z")

</div>

When I mix the two off screen renderers with this shader, result has unusual mix and opacity. I am using the two render passes to create different pixelations for the board and the pieces. setup: //Shader pass…

---

## [Depth Texture position height](https://discourse.threejs.org/t/depth-texture-position-height/70617)

<div class="topic-metadata">

**Author:** [@Gaelle\_Berton](https://discourse.threejs.org/u/Gaelle_Berton)\
**Replies:** 0\
**Last updated:** [September 11, 2024, 10:19pm UTC](https://discourse.threejs.org/t/depth-texture-position-height/70617 "2024-09-11T22:19:35Z")

</div>

I have a shaderMaterial, i want to use the scene’s Depth Texture to displace it vertically, so far the examples return a ‘Z’ val ue only, could i access the vec3 position, or the Y Here is the example code : float read…

---

## [Saving out high-resolution screenshot of scene with react-three/fiber](https://discourse.threejs.org/t/saving-out-high-resolution-screenshot-of-scene-with-react-three-fiber/69477)

<div class="topic-metadata">

**Author:** [@Yellow](https://discourse.threejs.org/u/Yellow)\
**Replies:** 1\
**Last updated:** [August 19, 2024, 7:07pm UTC](https://discourse.threejs.org/t/saving-out-high-resolution-screenshot-of-scene-with-react-three-fiber/69477 "2024-08-19T19:07:47Z")

</div>

I have a 3D scene running on a Canvas at whatever resolution the user’s current browser dimensions are, and I want the user to be able to take a screenshot that will render and save a high-resolution version (at a fixed …

---

## [Copy RenderTarget result to texture](https://discourse.threejs.org/t/copy-rendertarget-result-to-texture/68166)

<div class="topic-metadata">

**Author:** [@serk](https://discourse.threejs.org/u/serk)\
**Replies:** 3\
**Last updated:** [July 16, 2024, 10:02am UTC](https://discourse.threejs.org/t/copy-rendertarget-result-to-texture/68166 "2024-07-16T10:02:11Z")

</div>

I need to safe multiple frames to an array of textures and I’m getting a threejs error that I’m not sure. const rt\_texture = this.\_render\_target.texture; const result = new Texture(); this.\_rende…

---

## [How to create RenderTarget transition using Shaders?](https://discourse.threejs.org/t/how-to-create-rendertarget-transition-using-shaders/66324)

<div class="topic-metadata">

**Author:** [@iHast](https://discourse.threejs.org/u/iHast)\
**Replies:** 5\
**Last updated:** [June 24, 2024, 8:09pm UTC](https://discourse.threejs.org/t/how-to-create-rendertarget-transition-using-shaders/66324 "2024-06-24T20:09:37Z")

</div>

Hello, everyone! I’m studying Three.js, specifically WebGLRenderTarget, to create a website with impressive transitions between scenes. I’ve reached a point where I can switch between scenes, but now I’m facing a new c…

---

## [Feedback loop formed between Framebuffer and active Texture](https://discourse.threejs.org/t/feedback-loop-formed-between-framebuffer-and-active-texture/54472)

<div class="topic-metadata">

**Author:** [@schwyzl](https://discourse.threejs.org/u/schwyzl)\
**Replies:** 4\
**Last updated:** [August 1, 2023, 1:46pm UTC](https://discourse.threejs.org/t/feedback-loop-formed-between-framebuffer-and-active-texture/54472 "2023-08-01T13:46:24Z")

</div>

Hi, I use a custom pass to apply gamma correction to the foreground content and not to the background. I have used the same pattern for some time but a recent update (chrome? or three?) has introduced a warning: \[.WebGL…

---

## [Error in creating multi render target textures using WebGLRenderTarget](https://discourse.threejs.org/t/error-in-creating-multi-render-target-textures-using-webglrendertarget/66260)

<div class="topic-metadata">

**Author:** [@Steve\_KX](https://discourse.threejs.org/u/Steve_KX)\
**Replies:** 2\
**Last updated:** [June 5, 2024, 12:55am UTC](https://discourse.threejs.org/t/error-in-creating-multi-render-target-textures-using-webglrendertarget/66260 "2024-06-05T00:55:50Z")

</div>

Hello, I’m attempting to use WebGLRenderTarget to re-create the effects in the Multiple RenderTargets example. Here’s my code snippet to set this up: // renderer renderer = new THREE.WebGLRenderer({ antiali…

---

## [Why the scene don't update?](https://discourse.threejs.org/t/why-the-scene-dont-update/66385)

<div class="topic-metadata">

**Author:** [@iHast](https://discourse.threejs.org/u/iHast)\
**Replies:** 2\
**Last updated:** [June 4, 2024, 12:00pm UTC](https://discourse.threejs.org/t/why-the-scene-dont-update/66385 "2024-06-04T12:00:55Z")

</div>

I’m learning Three.js and I want to know how to create scene transition using click events as a trigger. Like in this project: https://ohzi.io/ I used this project made by Mr. Robot as a base to create something close t…

---

## [Why render target texture is wrong](https://discourse.threejs.org/t/why-render-target-texture-is-wrong/29475)

<div class="topic-metadata">

**Author:** [@HenryZeroBug](https://discourse.threejs.org/u/HenryZeroBug)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 1:34pm UTC](https://discourse.threejs.org/t/why-render-target-texture-is-wrong/29475 "2024-05-23T13:34:39Z")

</div>

Hello. When I render to target I change model color to red. Model material is MeshPhongMaterial. I have one scene and one PerspectiveCamera. Why render target texture is bad? renderTarget = new THREE.WebGLRenderTarge…

---

## [Error from copyTextureToTexture (Overload resolution)](https://discourse.threejs.org/t/error-from-copytexturetotexture-overload-resolution/65836)

<div class="topic-metadata">

**Author:** [@RichFWebb](https://discourse.threejs.org/u/RichFWebb)\
**Replies:** 5\
**Last updated:** [May 23, 2024, 12:18am UTC](https://discourse.threejs.org/t/error-from-copytexturetotexture-overload-resolution/65836 "2024-05-23T00:18:18Z")

</div>

I want to use copyTextureToTexture, but get this error: TypeError: Failed to execute ‘texSubImage2D’ on ‘WebGL2RenderingContext’: Overload resolution failed." I’m using a render target as the source, on r160. Full exa…

---

## [Clear WebGLMultipleRenderTargets textures with different colors](https://discourse.threejs.org/t/clear-webglmultiplerendertargets-textures-with-different-colors/48375)

<div class="topic-metadata">

**Author:** [@Bernd](https://discourse.threejs.org/u/Bernd)\
**Replies:** 1\
**Last updated:** [February 24, 2023, 9:33am UTC](https://discourse.threejs.org/t/clear-webglmultiplerendertargets-textures-with-different-colors/48375 "2023-02-24T09:33:29Z")

</div>

Hi guys, is it somehow possible to clear the textures bound to WebGLMultipleRenderTargets separately? I want to clear texture\[0\] to (1,1,1,1) and texture\[1\] to (0,0,0,0) before rendering anything to them. The only way …

---

## [Coordinate Alignment of Render Target and/or Shader is off after canvas/renderer resize](https://discourse.threejs.org/t/coordinate-alignment-of-render-target-and-or-shader-is-off-after-canvas-renderer-resize/65045)

<div class="topic-metadata">

**Author:** [@mbaycura](https://discourse.threejs.org/u/mbaycura)\
**Replies:** 4\
**Last updated:** [May 6, 2024, 2:03pm UTC](https://discourse.threejs.org/t/coordinate-alignment-of-render-target-and-or-shader-is-off-after-canvas-renderer-resize/65045 "2024-05-06T14:03:18Z")

</div>

I found an example for code for creating a magnifying glass effect which I have adapted for my own project. I have successfully rebuilt the effect and have it working properly when the page is first loaded. However, if t…

---

## [Blue plasma \[render target\]](https://discourse.threejs.org/t/blue-plasma-render-target/65036)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [May 4, 2024, 7:50pm UTC](https://discourse.threejs.org/t/blue-plasma-render-target/65036 "2024-05-04T19:50:26Z")

</div>

Hi community! Here is an approach of how to keep things in sync, sharing the same data source between them. Variations of the same composition. Blue plasma: Demo: https://codepen.io/prisoner849/full/MWRdode Bl…

---

## [Color Space seems to be inconsistent with reflection after r152](https://discourse.threejs.org/t/color-space-seems-to-be-inconsistent-with-reflection-after-r152/63919)

<div class="topic-metadata">

**Author:** [@Sidney\_Dev](https://discourse.threejs.org/u/Sidney_Dev)\
**Replies:** 5\
**Last updated:** [April 11, 2024, 9:33pm UTC](https://discourse.threejs.org/t/color-space-seems-to-be-inconsistent-with-reflection-after-r152/63919 "2024-04-11T21:33:59Z")

</div>

I have created a simple demo to show what im talking about: In version 0.163.0 of three js: https://codesandbox.io/p/sandbox/ocean-forked-ksd8hz?file=%2Fsrc%2Findex.js%3A120%2C5 VS version 0.150.0 (Correct and expe…

---

## [ThreeJS - Reading pixel from renderTarget](https://discourse.threejs.org/t/threejs-reading-pixel-from-rendertarget/63602)

<div class="topic-metadata">

**Author:** [@Cam1](https://discourse.threejs.org/u/Cam1)\
**Replies:** 0\
**Last updated:** [April 3, 2024, 11:53am UTC](https://discourse.threejs.org/t/threejs-reading-pixel-from-rendertarget/63602 "2024-04-03T11:53:47Z")

</div>

Hi there, I’m having trouble optimising readRenderTargetPixels() on mousemove to read pixel information. When reading pixels from a renderTarget that is full width / height of screen the pixel it works, example below; …

---

## [RenderTexture gets distorted when resizing the window](https://discourse.threejs.org/t/rendertexture-gets-distorted-when-resizing-the-window/62641)

<div class="topic-metadata">

**Author:** [@maumruiz](https://discourse.threejs.org/u/maumruiz)\
**Replies:** 1\
**Last updated:** [March 12, 2024, 4:41pm UTC](https://discourse.threejs.org/t/rendertexture-gets-distorted-when-resizing-the-window/62641 "2024-03-12T16:41:24Z")

</div>

Hi! I’m trying to create a ripple effect when moving the mouse. I’m currently using a RenderTexture (from react three drei) to create this ripples to send it as a texture to the main scene, and display it in a plane wit…

[Next page](https://discourse.threejs.org/tag/render-target/100.md?match_all_tags=true&page=1&tags%5B%5D=render-target)
