# Ability to reuse the PMREM generated texture from scene.environment

**URL:** <https://discourse.threejs.org/t/ability-to-reuse-the-pmrem-generated-texture-from-scene-environment/37752>\
**Category:** Questions\
**Tags:** environment-map, textures, shaders\
**Created:** [May 3, 2022, 10:34am UTC](https://discourse.threejs.org/t/ability-to-reuse-the-pmrem-generated-texture-from-scene-environment/37752 "2022-05-03T10:34:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 3, 2022, 2:57pm UTC](https://discourse.threejs.org/t/ability-to-reuse-the-pmrem-generated-texture-from-scene-environment/37752/5 "2022-05-03T14:57:07Z")

</div>

Interesting. When the PMREM integration was discussed, it was stated that [PMREM is too blocky for background blurriness](https://github.com/mrdoob/three.js/issues/20115#issuecomment-701573019).

The implementation of my above PR is based on Daniel and Ben PRs which also use the mipmapping approach:

> <https://github.com/mrdoob/three.js/pull/9163>
>
> Just a quick experiment to promote the cube shader to a full material.
> 
> This all…ows one to blur the background, and use an HDR coded material and also match its tone mapping to the rest of the scene.
> 
> As I am unsure if this is desired, I have not updated all uses of the "cube" shader to the MeshCubeMaterial.
> 
> The results look like this - you can adjust the roughness (blur) of the background or its intensity and opacity, and switch between an LDR or HDR cubemap:
> 
> !\[image\](https://cloud.githubusercontent.com/assets/588541/16152730/3747c330-3471-11e6-81c5-1d7278981d7f.png)
> 
> (This is an expansion of this other PR: https://github.com/mrdoob/three.js/pull/9158 )

> <https://github.com/mrdoob/three.js/pull/16900>
>
> I also added the MeshCubeMaterial to the WebGLBackground so that it wouldn't hav…e to do that weird map injection (https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLBackground.js#L90)
> 
> Examples:
> webgl\_postprocessing\_backgrounds.html (for HDR CubeTexturePass)
> webgl\_materials\_envmaps\_hdr.html (for WebGLBackground)

It’s good that you have posted at #23712 so the difference between PMREM and normal mipmapping can be clarified.

---

_[View the full topic](https://discourse.threejs.org/t/ability-to-reuse-the-pmrem-generated-texture-from-scene-environment/37752)._
