History

Switched to split sum model for ambient (as Unreal)

Olivier Prat committed 7 years ago

Commit b71a8f71 parent 57de55c13 files · +209 −49Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 13 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+2−0
@@ -365,6 +365,7 @@ void PrepareDeferred::run(const RenderContextPointer& renderContext, const Input · 364 unmodified lines
365365
366366 // For the rest of the rendering, bind the lighting model
367367 batch.setUniformBuffer(ru::Buffer::LightModel, lightingModel->getParametersBuffer());
368+ batch.setResourceTexture(ru::Texture::AmbientFresnel, lightingModel->getAmbientFresnelLUT());
368369 });
369370 }
370371
@@ -416,6 +417,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, · 45 unmodified lines
416417
417418 // THe lighting model
418419 batch.setUniformBuffer(ru::Buffer::LightModel, lightingModel->getParametersBuffer());
420+ batch.setResourceTexture(ru::Texture::AmbientFresnel, lightingModel->getAmbientFresnelLUT());
419421
420422 // Subsurface scattering specific
421423 if (surfaceGeometryFramebuffer) {