# HdStorm DomeLight loading performance

**URL:** <https://forum.aousd.org/t/hdstorm-domelight-loading-performance/1884>\
**Category:** Hydra\
**Created:** [September 27, 2024, 9:11pm UTC](https://forum.aousd.org/t/hdstorm-domelight-loading-performance/1884 "2024-09-27T21:11:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keli-Li](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Keli-Li](https://forum.aousd.org/u/Keli-Li)\
**Post date:** [September 27, 2024, 9:11pm UTC](https://forum.aousd.org/t/hdstorm-domelight-loading-performance/1884/1 "2024-09-27T21:11:07Z")

</div>

Hi,

In HdStorm, seems there are two major factors affecting the performance of loading a domeLight with a large environment map:

1.The output size of pre-processed maps from environment map  
[https://git.autodesk.com/autodesk-forks/USD/blob/release/pxr/imaging/hdSt/domeLightComputations.cpp#L171](https://git.autodesk.com/autodesk-forks/USD/blob/release/pxr/imaging/hdSt/domeLightComputations.cpp#L171)

2.The sample count used to sample from environment map  
[https://git.autodesk.com/autodesk-forks/USD/blob/release/pxr/imaging/hdSt/shaders/domeLight.glslfx#L168](https://git.autodesk.com/autodesk-forks/USD/blob/release/pxr/imaging/hdSt/shaders/domeLight.glslfx#L168)

Any idea to expose these two parameters for user adjustment?

Keli

---

<div class="post-metadata">

**Author:** ![Keli-Li](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Keli-Li](https://forum.aousd.org/u/Keli-Li)\
**Post date:** [September 30, 2024, 10:31pm UTC](https://forum.aousd.org/t/hdstorm-domelight-loading-performance/1884/2 "2024-09-30T22:31:14Z")

</div>

Seems the more important one is the fisrt, Storm use half of source envrionment map as the default downsize. Test shows the loading time can be reduced from 10 sec to 5 sec for an envrionment map (8,234\*4,117 pixels, 100M) if the downsize is reduced from half to 1/16.

Meanwhile, seems the generation of Prefilter map from source env map is a multi-runs with compute shader to generate Prefilter map for each mip level.

> <https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/imaging/hdSt/simpleLightingShader.cpp#L624>

Any optimization here, is it possible to run compute shader once for all levels or run compute shader once for level 0 and let GL to generate mipmaps automatically for us?

---

<div class="post-metadata">

**Author:** ![Keli-Li](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Keli-Li](https://forum.aousd.org/u/Keli-Li)\
**Post date:** [October 2, 2024, 11:03pm UTC](https://forum.aousd.org/t/hdstorm-domelight-loading-performance/1884/3 "2024-10-02T23:03:30Z")

</div>

Hi, I created a request here: [Request to expose the downsize to balance between quality and performance for Storm DomeLight · Issue #3342 · PixarAnimationStudios/OpenUSD · GitHub](https://github.com/PixarAnimationStudios/OpenUSD/issues/3342)
