Implement GTAO (Ground Truth Ambient Occlusion) which is a special case of Horizon Based Ambient Occlusion that is more physically accurate.
Also add a bent normal option to sample indirect irradiance (diffuse lighting) with the least occluded direction.
This commit introduce the computation of a depth pyramid containing min and max depth values of the original depth buffer.
This is useful for Clustered Light Culling but also for raytracing on the depth buffer (SSR).
It's also usefull to have to fetch higher mips in order to improve texture cache usage.
As of now, 1st mip (highest res) is half the resolution of the depth buffer, but everything is already done to be able to make a fullres copy of the depth buffer in the 1st mip instead of downsampling.
Also, the texture used is RG_32F which is a too much but enough to cover the 24bits of the depth buffer. Reducing the texture size would make things quite faster.
Maybe not very useful but it's here for feature parity with the other probes.
The fragment shader clipping is here because I'm lazy and don't want to creating a proper quad Batch.
Early implementation. Slow and still has quality
3 ways of storing irradiance:
- Spherical Harmonics: Have problem with directionnal lighting.
- HL2 diffuse cube: Very low resolution but smooth transitions.
- Diffuse cube: High storage requirement.
Also include some name change.
Separate material handling inside another file.
Make use of enums to identify shader variations.
Group all 64*64 LUTs into one array texture.
Only update world probe if world changes.
We render linear distance to the light in a R32 texture and store it into an octahedron projection inside a 2D texture array.
This render the sampling function much more simpler and without edge artifacts.
This still has a couple of issues:
* Instancing is not working when multiple particle systems use the same
primitive. Only the last particle system to be drawn with a particular
primitive shows up.
* Because of colors being passed as uniforms with static variables, the
color of the collection of the last object to be evauluated is used for
all particles being displayed.
Also, note that while this is being drawn in the clay engine, this might
be moved to the object mode later intead.
Part of T51378
Disabled by default. Set ENABLE_EFFECT_MOTION_BLUR to 1 to enable.
No fancy motion blur. Use depth and camera matrix to get the motion vectors. Then blur in this direction.
Only available in camera view.
Only Camera animation is supported, does not take into account the parents motion
We can now use object and other modes on top of Cycles.
Since we are now always on "render_to_view" (old Rendered mode), the
pause button is always visible.
- use DRW_engine prefix for engine types.
- use engine suffix for files that define a draw engine.
- remove engines from include path (they're only referenced once)
- Use uniform color world for the world probe.
- Refactored the Fresnel expression to be better with Area Lights.
- Squared the roughness for default materials.
- Added New Batch cache routine to get the split mesh for each material. (optimization needed)
- Did some shader modifications to create default_frag and support a somwhat correct fresnel for lamps (to finish)
For now only compute GGX convolution. The GGX LUT used for the split sum approximation (UE4) is merged with the LTX mag LUT that uses the same parameters (theta and roughness)
Using Texture Arrays to store shadow maps so less texture slots are used when shading. This means a large amount of shadows can be supported.
Support Projection Shadow Map for sun like in old BI/BGE.
Support Cube Shadow Map for Point/Spot/Area lights. the benefit of using it for spot light is that the spot angle does not change shadow resolution (at the cost of more memory used). The implementation of the cubemap sampling is targeted for 3.3 core. We rely on 2D texture arrays to store cubemaps faces and sample the right one manualy. Significant performance improvement can be done using Cubemap Arrays on supported hardware.
Shadows are only hardware filtered. Prefiltered shadows and settings comming next.
Original code from @Severin with changes from @dfelinto & @hypersomniac.
This doesn't cause many functional changes
besides using new transform manipulators.
Submitted as D2604
Using Linear Transform Cosines to compute area lighting. This is far more accurate than other techniques but also slower.
We use rotating quad to mimic sphere area light. For a better approximation, we use a rotating octogon.