0beqz / realism-effects

SSGI, Motion Blur, TRAA - Effects to enhance your three.js scene's realism
https://realism-effects-obeqz.vercel.app/
MIT License
1.41k stars 63 forks source link

SSGI with Three Js Lights #9

Closed gnansai closed 1 year ago

gnansai commented 1 year ago

Hi @0beqz , Thanks for making the realism-effects. SSGI works great with HDRI images.

Does it support three js Lights? I tested it with three js Sunlamp, SSGI does not seems to work.

0beqz commented 1 year ago

Hey,

thanks and it does, at least for the directional light I've tested with. So you can also make SSGI use the lighting from the basic three.js scene:

  1. Add a directional light to your scene
  2. If you are using ambient lighting, remove it
  3. Make sure to use a RenderPass so that SSGI can use the lighting from the rendered three.js scene

Your basic three.js scene should be all black except for the areas illuminated by your light. SSGI will then use that lighting information for direct lighting.

gnansai commented 1 year ago

Thank you for the information, I will test it.