Spoke icon indicating copy to clipboard operation
Spoke copied to clipboard

No mipmapping with HDR lightmaps

Open colinfizgig opened this issue 2 years ago • 0 comments

Describe the bug When using HDR lightmaps, mipmapping gets turned off on the material (probably lack of Pemrem support?) This causes flicker in VR and rough crunchy textures at a distance on desktop.

To Reproduce Steps to reproduce the behavior: You can go into this scene which has samples of both types of lightmaps labelled and see the difference. If you look at the HDR versions from a distance you should see noisy textures on PC and flickering on VR. If you look at the 8 bit lightmaps from the HDR side you'll notice bleeding of the color swatches as mipmaps show up. You won't see this on the HDR side. https://hubs.mozilla.com/cFQbjE5/twin-tattered-outing

Expected behavior Assuming it is possible to setup mipmaps for the HDR texture those should be generated at runtime so that flickering in VR does not occur. Here is an example of how that is done in Three.js. https://threejs.org/examples/webgl_materials_envmaps_hdr.html

Screenshots image image image

Desktop (please complete the following information):

  • OS: PC and Meta Quest 2
  • Browser Chrome, Quest2 browser
  • Version chrome Version 106.0.5249.119 and latest Meta Quest2 Browser

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context You can see that three.js can support generating Mipmaps for HDR by checking out this example... https://threejs.org/examples/webgl_materials_envmaps_hdr.html

colinfizgig avatar Oct 15 '22 18:10 colinfizgig