# \#mrt

**URL:** https://discourse.threejs.org/tag/mrt/800.md

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

---

## [Render 3D and texture arrays with MRT](https://discourse.threejs.org/t/render-3d-and-texture-arrays-with-mrt/76063)

<div class="topic-metadata">

**Author:** [@wizgrav](https://discourse.threejs.org/u/wizgrav)\
**Replies:** 0\
**Last updated:** [January 6, 2025, 9:33am UTC](https://discourse.threejs.org/t/render-3d-and-texture-arrays-with-mrt/76063 "2025-01-06T09:33:43Z")

</div>

Originally did a PR for it but turns out that we can render 3D and texture arrays with MRT without any modifications to the WebGLRenderer. I made a demo to showcase Demo - https://wizgrav.github.io/three-mrt/ Code snip…

---

## [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 …

---

## [WebGLMultipleRenderTargets with different texture format/types](https://discourse.threejs.org/t/webglmultiplerendertargets-with-different-texture-format-types/64938)

<div class="topic-metadata">

**Author:** [@Romulus2100](https://discourse.threejs.org/u/Romulus2100)\
**Replies:** 10\
**Last updated:** [May 2, 2024, 11:09pm UTC](https://discourse.threejs.org/t/webglmultiplerendertargets-with-different-texture-format-types/64938 "2024-05-02T23:09:56Z")

</div>

I am trying to create a WebGLMultipleRenderTargets (MRT) with three textures. My goal is for the textures of the MRT to have two textures be RGBA8 and one RG32F: // Create multipleRenderTarget var mrt = new THREE.WebGL…

---

## [MRT supports antialiasing](https://discourse.threejs.org/t/mrt-supports-antialiasing/33215)

<div class="topic-metadata">

**Author:** [@ligaofeng0901](https://discourse.threejs.org/u/ligaofeng0901)\
**Replies:** 3\
**Last updated:** [July 5, 2022, 12:55am UTC](https://discourse.threejs.org/t/mrt-supports-antialiasing/33215 "2022-07-05T00:55:54Z")

</div>

In this example three.js examples , MSAA is not supported. It seems we don’t have a AA solution for mrt. WebGLMultisampleRenderTarget is a way to handle AA in render target, the properties like .samples,.useRenderbuffer …

---

## [Is it possible to render depth buffer with WebGLMultipleRenderTargets?](https://discourse.threejs.org/t/is-it-possible-to-render-depth-buffer-with-webglmultiplerendertargets/34652)

<div class="topic-metadata">

**Author:** [@avseoul](https://discourse.threejs.org/u/avseoul)\
**Replies:** 1\
**Last updated:** [February 9, 2022, 12:10am UTC](https://discourse.threejs.org/t/is-it-possible-to-render-depth-buffer-with-webglmultiplerendertargets/34652 "2022-02-09T00:10:31Z")

</div>

Hi, I’m trying to write a custom deferred shading. I use WebGLMultipleRenderTargets to compose my gbuffer but it doesn’t seem like I could let it renders along with a depth texture unlike you can with a regular WebGLRend…

---

## [Will renderering a lot of instancedMeshes which every of them has a small count to MRT makes a performance problem?](https://discourse.threejs.org/t/will-renderering-a-lot-of-instancedmeshes-which-every-of-them-has-a-small-count-to-mrt-makes-a-performance-problem/29382)

<div class="topic-metadata">

**Author:** [@hanlijun123](https://discourse.threejs.org/u/hanlijun123)\
**Replies:** 1\
**Last updated:** [August 30, 2021, 5:10am UTC](https://discourse.threejs.org/t/will-renderering-a-lot-of-instancedmeshes-which-every-of-them-has-a-small-count-to-mrt-makes-a-performance-problem/29382 "2021-08-30T05:10:06Z")

</div>

Background: I was integrated MRT in my project recently, and I found that the frame rate drops down a lot mainly because of I used InstancedMesh for some objects, these objects have all kinds of different geometry data,…

---

## [WebGLMultipleRenderTargets and readRenderTargetPixels](https://discourse.threejs.org/t/webglmultiplerendertargets-and-readrendertargetpixels/28155)

<div class="topic-metadata">

**Author:** [@Dan\_Toloudis](https://discourse.threejs.org/u/Dan_Toloudis)\
**Replies:** 2\
**Last updated:** [July 19, 2021, 8:06pm UTC](https://discourse.threejs.org/t/webglmultiplerendertargets-and-readrendertargetpixels/28155 "2021-07-19T20:06:22Z")

</div>

I’ve ported some code to use the new WebGLMultipleRenderTargets but I still have one piece that was reading a pixel back from one of my texture buffers that was previously in a single WebGLRenderTarget using WebGLRendere…

---

## [WEBGL\_draw\_buffers in Three.js to draw to multiple textures simultaneously?](https://discourse.threejs.org/t/webgl-draw-buffers-in-three-js-to-draw-to-multiple-textures-simultaneously/16110)

<div class="topic-metadata">

**Author:** [@marquizzo](https://discourse.threejs.org/u/marquizzo)\
**Replies:** 2\
**Last updated:** [June 11, 2020, 7:57pm UTC](https://discourse.threejs.org/t/webgl-draw-buffers-in-three-js-to-draw-to-multiple-textures-simultaneously/16110 "2020-06-11T19:57:03Z")

</div>

Reading the WebGL API, I came across WEBGL\_draw\_buffers extension, which is defined as: The WEBGL\_draw\_buffers extension is part of the WebGL API and enables a fragment shader to write to several textures, which is use…
