gainmap-js icon indicating copy to clipboard operation
gainmap-js copied to clipboard

Kudos to you - Readme suggestion

Open dghez opened this issue 2 months ago • 2 comments

Not really an issue, just wanted to say thanks for the library, i recently tried with three as envMap lighting and i was able to save like 2mb in filesize. Although I kinda suggest to maybe create and explicit a note on the fact you still need to use PMREMGenerator if you want to use that as environment, otherwise it won't work. I took me a while to realise that, was using directly as envmap eheh

  const pmremGenerator = new PMREMGenerator(gl)
  pmremGenerator.compileEquirectangularShader()

  const loader = new HDRJPGLoader(gl)
  loader.loadAsync('..../lighting.jpg').then(res => {
    const envMap = pmremGenerator.fromEquirectangular(res.renderTarget.texture).texture
    scene.value.environment = envMap
  })

Anyway, thanks again ❤️

dghez avatar Apr 23 '24 14:04 dghez