Good to know you’ve implemented mixing 2 env maps within the object shader.
Depending on the final use case (or maybe replicating matterport), I would reccomend going beyond that:
- if you intend to “mix multiple env maps” (i.e. more than 2)
- if you are thinking in populating the scene with more than 1 object (you don’t want to redundantly perform this exact mix in every object shader)
- if you are considering in using the mixed env map for applying parallax-corrected cubemaps (and not only reflection but also refraction, illumination, and even shadows!)
For all that cases, the more efficient way to go is performing env blending in a dedicated second shader, taking advantage of hardware acceleration.
Sebastian Legarde nailed this approach (not to say that his paper lead him to a research position inside Unity Labs). During my master thesis I wrote a full implementation with three.js - a lot of wiring to and from frame buffer objects. I am afraid currently is veery dated (rev 100 or so) but if you need I can give you more insights from my.own process