Implements the epipolar light scattering post-process effect. More...
#include <EpipolarLightScattering.hpp>
Classes | |
| struct | FrameAttribs |
| Frame attributes that are passed to the effect at the beginning of each frame. More... | |
| struct | CreateInfo |
| Create info. More... | |
Public Member Functions | |
| EpipolarLightScattering (const CreateInfo &CI) | |
| Creates a new instance of the EpipolarLightScattering class. | |
| void | PrepareForNewFrame (FrameAttribs &FrameAttribs, EpipolarLightScatteringAttribs &PPAttribs) |
| void | ComputeSunColor (const float3 &vDirectionOnSun, const float4 &f4ExtraterrestrialSunColor, float4 &f4SunColorAtGround, float4 &f4AmbientLight) |
| Computes the sun color and ambient light color based on the given direction on the sun and extraterrestrial sun color. | |
| void | RenderSun (TEXTURE_FORMAT RTVFormat, TEXTURE_FORMAT DSVFormat, Uint8 SampleCount) |
| Renders the sun. | |
| void | PerformPostProcessing () |
| Runs the post-processing effect. | |
| IBuffer * | GetMediaAttribsCB () |
| Returns the media attributes buffer. | |
| ITextureView * | GetPrecomputedNetDensitySRV () |
| Returns the precomputed net density look-up texture. | |
| ITextureView * | GetAmbientSkyLightSRV (IRenderDevice *pDevice, IRenderStateCache *pStateCache, IDeviceContext *pContext) |
| Returns the ambient sky light texture. | |
Implements the epipolar light scattering post-process effect.

This post-processing effect renders realistic high-quality light scattering effects and is based on this sample from Intel. The effect works by smartly placing expensive ray-marching samples along the epipolar lines that start at the light source and interpolating the radiance between these samples.

EpipolarLightScatteringAttribs structure The following parameters control the effect
The effect requires the following data:
The code snippet below shows how to use the epipolar light scattering post-processing effect. For the full source code, see Atmospheric scattering sample.
| void Diligent::EpipolarLightScattering::PrepareForNewFrame | ( | FrameAttribs & | FrameAttribs, |
| EpipolarLightScatteringAttribs & | PPAttribs ) |
The method prepares internal resources and states for processing the next frame. It must be called at the beginning of every frame before any other rendering method (RenderSun, PerformPostProcessing) can be called.