Week 218 : 15th - 21st March

4 EEVEE 293 soft shadows.png
  • Info

Going through the list of patches pending reviews for EEVEE I noticed an old feature request to add volume light contribution slider. The patch was simple but I wondered if it was worth it. I've picked it up and added a diffuse slider for the sake of completeness.

This change made me go through over the volumetric lighting evaluation code and made some improvements notably the addition of area light shape support and soft volumetric shadows.

  • General development
    • Fix T86660 EEVEE: Undefined behaviour in specular_occlusion 9ca67c47a1.
    • EEVEE: Volumetrics: Add back support for light clamp b96acd0663.
    • EEVEE: Volumetrics: Add support for soft volumetric shadows 89ef0da551.
    • EEVEE: Volumetrics: Add Area light shape support 355f884b2f.
    • EEVEE: Volumetrics: Add special attenuation volume for lights 0a0f737f91.
    • EEVEE: Volumetrics: Fix sun volumetric shadow 54f52cac7c.
    • EEVEE: Lights: Add Volume and diffuse light power slider 884f934a85.
    • Fix T86448 EEVEE: SSRefraction Depth regression b1150fa1f5.
    • Fix T86612 EEVEE: Wrong AmbientOcclusion on refractive materials 6b6bcbe60c.
  • Next week

I'll take a look at the needed changes for arbitrary Geometry attributes support from geometry nodes.

Week 217 : 8th - 14th March

  • Info

Fixed some bugs in EEVEE and did many cleanups commits. My main focus was ScreenSpaceReflections which has been improved to be less noisy overall and have less self intersection issues. The reflections also now have less chances to pass through geometry, this is mostly noticeable if camera is near a reflective floor.

I updated the Vulkan branch to master and added the VulkanMemoryAllocator to the external libraries.

  • General development
    • Cleanup: EEVEE: Make bsdf_sampling_lib.glsl more tidy 5fee9dae5d.
    • Cleanup: EEVEE: Remove hammersley texture and split hammersley code 6a7f6f2867.
    • Cleanup: EEVEE: Remove SSR shader variations 83b7f7dfb7.
    • Cleanup: EEVEE: Remove the horizon search layered shader 75fc6e3b2b.
    • Cleanup: EEVEE: Remove unused mipmapping on main color buffer 8041b1dd1c.
    • Cleanup: EEVEE: Split effect_ssr.glsl 40d579b69f.
    • Cleanup: EEVEE: Use correct prefix for view space vectors 793335f3e2.
    • EEVEE: SubsurfaceScattering: Fix wrong sss component being affected by alpha 165a2da753.
    • EEVEE: GGX: Use distribution of visible normal for sampling d89fb77d89.
    • EEVEE: Planar reflections: Fix ambient occlusion broken in reflections 00baf875ef.
    • EEVEE: RenderPass: Fix Ambient Occlusion pass e30315ba95.
    • EEVEE: ScreenSpaceReflections: Add back multi ray-hitpoint reuse 267a9e14f5.
    • EEVEE: ScreenSpaceReflections: Add back support for planar reflections 56bf4f3fb3.
    • EEVEE: ScreenSpaceReflections: Avoid outputing NaNs 03490618a2.
    • EEVEE: ScreenSpaceReflections: Improve hit quality 9957096f35.
    • EEVEE: ScreenSpaceReflections: Improve minimal hit threshold 4cd9a1164b.
    • EEVEE: ScreenSpaceReflections: Increase depth threshold b79f209041.
    • EEVEE: ScreenSpaceReflections: Jitter starting texel bbc5e26051.
    • EEVEE: Specular Occlusion: Avoid overdarkening on smooth surfaces 8936550269.
    • Fix T86429 EEVEE: Ambient occlusion broken on some platform 5ab2252a66.
    • Fix T86476 EEVEE: SSS material with variable radius can produce NaNs 09e77d2c89.
  • Vulkan
    • Vulkan: First part of VKTexture af2bc8be40.
    • Vulkan: Bypass BGL when running with the vulkan backend 72bce1be8e.
    • Vulkan: Fix crash because of null active framebuffer d390f01e48.
    • Vulkan: Add allocator and command pool to VKContext 0956a5134a.
    • GPUContext: Pass GHOST context handle for GPUContext creation 9a08daae92.
    • GHOST: Window: Add drawing context handle getter dd4405121c.
    • GHOST: Vulkan: Add compile time option to bypass required features b996cc6440.
    • Vulkan: Add basic implementation of textures 0bcd24c0c4.
    • Vulkan: Fix compilation after merging 12e88ee722.
    • VulkanMemoryAllocator: Add new extern library b908c3fa0a.
  • Next week

I will work on the Vulkan implementation.

Week 216 : 1st - 7th March

  • Info

This week I rewrote the screen ray-trace code to be cleaner in order to share some of it with the ambient occlusion. I had to revert the thickness heuristic because it was very hard to make it scale independent and was not giving good results with the optimized sampling patern.

Also made a big change by using a fullscreen copy of the depth buffer for all screen space raytracing. This might increase the cost of it a bit but it fix many issues we had with the hard coded half-res.

  • General development
    • EEVEE: Reflections: Add ensure_valid_reflection to glossy closures 1c22b551d0.
    • EEVEE: Ambient Occlusion: Add sample parameter support for the AO node 30cb4326fe.
    • EEVEE: Ambient Occlusion: Use ScreenSpaceRay for iteration 0983e66e03.
    • EEVEE: RenderPass: Improve AO pass if screen space radius is small 1540f1df07.
    • EEVEE: Depth of field: Do not shrink highlights when using overblur 1e7d8a4ad5.
    • EEVEE: Volumetrics: Avoid old files with too many volume shadow sample being too slow b9bb69a114.
    • EEVEE: Volumetrics: Fix incorrect volumetric light shadowing 3a29c19b2b.
    • EEVEE: ScreenSpaceReflections: Check reflection ray against geometric normal f746b568f3.
    • EEVEE: ScreenSpaceRayTrace: Cleanup/Refactor 6842c549bb.
    • EEVEE: Use Fullscreen maxZBuffer instead of halfres ba75ea8012.
    • Fix T81741 EEVEE: Ambient Occlusion does not converge properly bf799cb12c.
    • Fix T86042 EEVEE: incorrect irradiance bake b450d2d148.
    • Fix T86138 EEVEE: Bake Indirect Lighting crash in 2.93 with older files b9e1cc931e 8d6a79ffc2.
  • Next week

There is still some improvements to the reflections I would like to commit before moving on.

Week 215 : 22nd - 28th February

  • Info

This week I was focused on planning the future of EEVEE and designing the realtime compositor. More about this next week.

I also wrote the documentation for the new Depth of field, but is still under review.

  • General development
    • Workbench: Fix samples taken outside of pixel footprint 32ca8e58a3.
    • Fix T85726 Workbench: Orthographic view is blurry bb2af40ec7.
    • Fix T85959 EEVEE: DOF with "Jitter Camera" broken 400f2e4be6.
    • Fix T85609 EEVEE: Viewport "vibrates" when mouse input is active d45a89ee44.
    • Fix T85720 EEVEE: Contact shadows do not appear when enabling SSR cd1a083984.
  • Next week

I would like to finish one cleanup for 2.93 about tracing buffer management and address the issue about AO not being as sharp any more.

Week 214 : 15th - 21st February

  • Info

While looking at the occlusion regression, it appeared to me that the result was wrong. The dark fresnel effect is not supposed to be present. It took me some times but I rewrote it to be faster (less samples taken) and more robust (Specular occlusion and diffuse occlusion is now applied separately for each Closure) without any darkening effect. Also implemented a hardcoded thickness heuristic that will reduce over-darkening of thin objects like poles.

Planar reflections is now also masked correctly but only one reflection will be used per surfaces.

  • General development
    • Fix T85714 Crash when Viewport Rending an image using EEVEE. 4dd782a1a3.
    • Fix T85603 EEVEE: Baking Indirect lighting crashes Blender 48167644b7.
    • GPU: Add define to ouput more context lines for GLSL errors 764082676b.
    • GPU: Add RGB10_A2 format support 6fa984a1af.
    • EEVEE: Planar Reflections: Fix regression 1a9fe57a9f.
    • EEVEE: Ambient Occlusion Node: Support inverted and distance parameters dee94afd03.
    • EEVEE: Ambient Occlusion: Refactor 64d96f68d6.
  • Next week

I'll be working on updating the documentation, the release notes, the render tests and do planning for the 3.0 release.

Week 213 : 8th - 14th February

  • Info

The new depth of field has been merged (see 000a340afa). I changed the sampling pattern of the camera jitter option to reduce noise as much as possible. But this sampling pattern needs a specific number of samples, so the actual number of samples for render is rounded up to the needed sample count for jittered DOF.

I also finished the fix / refactor of the closure library. A few regression are still here but should be tackled next week (AO and planar probe roughness masking when not using SSR).

While updating the Look Up Tables for the GGX BRDF and BTDF I improved their precision. Glass materials now have better precision around the critical angle.

  • General development
    • EEVEE: Fix glass with sharp distribution not ignoring roughness 9e81e1c33f.
    • EEVEE: Change cubemap roughness fit aaf1650b09.
    • EEVEE: Update Offline LUT e7f61685ed.
    • EEVEE: Update LUT GGX generation shader 83ac8628c4.
    • EEVEE: Fix incorrect fresnel function. 06492fd619.
    • EEVEE: Refactor closure_lit_lib.glsl 7f7e683099.
    • EEVEE: Depth of field: New implementation 000a340afa.
  • Next week

Focus on regressions introduced by the closure_lit_lib.glsl refactor.

Week 212 : 1st - 7th February

  • Info

Squashed a few high priority bugs. Then I started looking into cleaning EEVEE's Closure evaluation code for surfaces. This code is messy and not extensible easily and one of the reason I did not look into adding more feature.

This cleanup might affect performance a bit but will improve compatibility with Cycles and pave the way to new feature.

I also adressed some issues with the new Depth of field. It should be merged soon. I just want to check if a better sampling pattern is possible for jittered camera position.

  • General development
    • Fix T85314 GPU: Drawlist submit data overflows. 0fc456f091.
    • Fix T81843 Bones invisible using Weight Paint + Wireframe shading + Bone X-Ray d5d8655ca1.
    • Fix T81177 EEVEE: Missing shadow if last material has no shadow c02f2d7371.
    • DRW: Fix render wrong orthographic depth conversion d1ee8a0502.
    • GPU: Fix performance regression on AMD GPU 03c1c5f3a4.
    • Fix regression: Crash garbage collecting VBOs on never evaluated scenes 30ac21bf33.
  • Depth of field
    • EEVEE: Depth of field: Add slight defocus bokeh shape foreground flip c4c1b2addc.
    • EEVEE: Depth of field: Fix bokeh shape rotation inverted d447a5eab3.
    • EEVEE: Depth of field: Fix bokeh shape not inverted for scatter 376bffae03.
  • Closure Evaluation Cleanup
    • EEVEE: Fix missing shadowing factor 1df2f7a713.
    • EEVEE: Fix lightgrid accumulation not using diffuse_accum 36b066ee98.
    • EEVEE: Rewrite closure_lit_lib to reduce complexity fe00859202.
  • Next week

During testing after closure evaluation code rewriting, I found out that there was some rendering issues that I want to investigate. After that I want to focus on pushing the pyGPU addition for 2.93.

Week 214 : 25th - 31st February

Eevee new dof1.png
Eevee new dof2.png
  • Info

Used the week to really polish the implementation to make sure it meets our targets. Performance could be a bit better but we aim for quality and simplicity first.

I have also added a new jittered camera position option to have an extra layer of correctness. Since we needs at least 16 samples for anti-aliasing, why not improve Depth Of field at the same time? By jittering the camera position we come closer to the reference. This mitigate some issues we have with the post process DoF. We reduce the Circle Of Confusion in this case, just enough to fill the gaps between the jittered samples.

The patch is up for review D10238 and a new experimental branch is up for download.

  • Depth of field
    • EEVEE: Depth of field: Fix incorrect prediction for holefill tiles c96b1e4cda.
    • EEVEE: Depth of field: Improve slight defocus opacity estimation f12338f3ce.
    • EEVEE: Depth of field: Bleed more background over in-focus area e6d0a5be0e.
    • EEVEE: Depth of field: Fix tile prediction and fast gather threshold 7d6f58271b.
    • EEVEE: Depth Of Field: Fix jittered dof breaking screenspace effects 5db9a008b9.
    • EEVEE: Depth Of Field: Flip bokeh shape on foreground. 099788c3e8.
    • EEVEE: Depth Of Field: UI: Change Jitter option name & tooltip 9c4dbb592b.
    • EEVEE: Depth Of Field: Add minimal overblur radius 57fc9f6082.
    • EEVEE: Depth Of Field: Add new jittered Dof fc6b04d4e3.
    • EEVEE: Depth Of Field: Reintroduce the extra offset for convolution 4b04818d79.
    • EEVEE: Depth Of Field: Fix orthographic view Circle of confusion c8b324fe90.
    • EEVEE: Depth Of Field: Gather: Fix tiling artifact on foreground 3c84851142.
    • EEVEE: Depth Of Field: Gather: Fix polygonal dof radius being too big 1f14c0d20c.
    • EEVEE: Depth Of Field: Lower minimal CoC radius for scattering 24f09b8f55.
    • EEVEE: Depth Of Field: Tests: update shader tests ff74136da9.
    • EEVEE: Depth Of Field: Fix fast gather tiles bleeding color 61e5c665b7.
    • EEVEE: Depth Of Field: Add high quality slight defocus option e1f2db669c.
    • EEVEE: Depth Of Field: Fix jump in appearance when using bokeh texture a8e3293b81.
    • EEVEE: Depth Of Field: Fix apparent tiles on foreground limits cfa97fd7f7.
    • EEVEE: Depth Of Field: Add denoising pass to stabilize bokeh highlights f48adcca64.
    • EEVEE: Depth Of Field: Resolve: Fix slight focus gather radius too big 9457a0faf5.
    • EEVEE: Depth Of Field: Scatter Add UI options eedf6c6295.
    • EEVEE: Depth Of Field: Revert fix scatter power difference 6e32018499.
    • EEVEE: Depth Of Field: Fix neighborhood rejection 89d9f5983c.
    • EEVEE: Depth Of Field: Always use RGBA16F format 06e080c712.
    • EEVEE: Depth Of Field: Improve bokeh shape support b036baa60a.
    • EEVEE: Depth Of Field: Improve anamorphic bokeh support for gather 2c948ea405.
    • EEVEE: Depth Of Field: Support anamorphic bokeh on slight focus gather 874665d5e6.
    • EEVEE: Depth Of Field: Convolution output premultiplied color 556381c84a.
    • EEVEE: Depth Of Field: Scatter: Speedup: Reduce pixel shader complexity 64612d57e2 18ea15cf2d.
    • EEVEE: Depth Of Field: Resolve: Do not load layers that will not be used c9c79aad9e.
    • EEVEE: Depth Of Field: Resolve: Fix some issues 6fff85b2e4.
    • EEVEE: Depth Of Field: Scatter: Improve neighborhood rejection fea585ded4.
    • EEVEE: Depth Of Field: Fix issue with texture reuse e7e4b3c6af.
    • EEVEE: Depth Of Field: Use bilinear filtering during resolve 5841c1d819.
    • EEVEE: Depth Of Field: Filter weight buffer f91aeaedb1.
    • EEVEE: Depth Of Field: Tweak: Reduce fast gather random radius a bit d7365bfdd5.
    • EEVEE: Depth Of Field: Use bilinear filtering for fast gather 9135370633.
    • EEVEE: Depth Of Field: Use RGB only format when alpha isn't required 53ab14ffed.
    • EEVEE: Depth Of Field: Improve foreground gather pass performance 0b55a9f886.
    • EEVEE: Depth Of Field: Fix NaNs in going through resolve pass 55936c060b.
    • EEVEE: Depth Of Field: Improve scatter rejection masks 6c6431809d.
    • EEVEE: Depth Of Field: Fix compositing issues 3f0213d929.
    • EEVEE: Depth Of Field: Make max mipmap based on maximum CoC e137695436.
    • EEVEE: Depth Of Field: Improve slight focus gather patern 8d78831fbd.
    • EEVEE: Depth Of Field: Fix scatter anamorphic bokeh energy conservation 3203340168.
    • EEVEE: Depth Of Field: Improve Max size slider UI feel a9e12e50ae.
    • EEVEE: Depth Of Field: Separate scatter buffer e623e62d3e.
    • EEVEE: Depth Of Field: Resolve pass: Fix some bugs 928aee934f.
    • EEVEE: Depth Of Field: Add performance debugging defines f38479f9b4.
    • EEVEE: Depth Of Field: Tweak layer threshold for more watertighteness 440c348323.
    • EEVEE: Depth Of Field: Add back the resolve sample jitter 6650310844.
    • EEVEE: Depth Of Field: Fix output weight of the gather passes 6a655eb871.
    • EEVEE: Depth Of Field: Change foreground occlusion threshold c8067f798f.
    • EEVEE: Depth Of Field: Correct foreground occlusion weighting 371312cf2c.
  • Next week

This week should have been for bugfix so I will resume my bugfixing activities waiting for feedback about the new DoF.

Week 213 : 18th - 24th February

  • Info

Implemented the remaining passes. We have a median filter that reduces the noise output of the gather passes. Also added support for polygonal bokeh shapes.

  • Depth of field
    • EEVEE: Depth Of Field: Fix sample weighting for foreground ec909e5d0f.
    • EEVEE: Depth Of Field: Various improvement fee0c90127.
    • EEVEE: Depth Of Field: Fix slight out of focus tile dilation 42732568d5.
    • EEVEE: Depth Of Field: Speedup: Use linearstep in scatter pass b94f1a63f1.
    • EEVEE: Depth Of Field: Fix issue with slight focus filtering perf. 8f112af609.
    • EEVEE: Depth Of Field: Fix issue with neighborhood comparison 0c732382ae.
    • EEVEE: Depth Of Field: Add gather density change 643420186c.
    • EEVEE: Depth Of Field: Fix missing slight focus convolution 4f3fb67c43.
    • EEVEE: Depth Of Field: Fix early out on half res CoC e267afebf4.
    • EEVEE: Depth Of Field: Fix slight out of focus missing tile e69f8483ed.
    • EEVEE: Depth Of Field: Fix ring opacity issues 9f658822f9.
    • EEVEE: Depth Of Field: Disable filtering for foreground 4f6ce899d4.
    • EEVEE: Depth Of Field: Add Bokeh shape texture precomputation 63e898a0ff.
    • EEVEE: Depth Of Field: Dilate CoC Tiles based on max CoC radius 239229c390.
    • EEVEE: Depth Of Field: Gather median filter 14e6f2f4db.
  • Next week

Most of the new implementation is finished. But there are many areas that needs tweaking to achieve the quality we aim for.

Week 212 : 11th - 17th February

  • Info

The bulk of the new Depth Of Field pipeline is now implemented. We have the gather passes and some tile prepasses that are mandatory to have correct Circle of confusion spreading and for performance. We also now have scattering occlusion that will prevent scattered distant highlights bleeding into the closer foreground. A crude scattering selection is made using neighborhood to reject areas that are too bright and would kill performance.

  • Depth of field
    • EEVEE: Depth Of Field: Scatter optimization 34de342257.
    • EEVEE: Depth Of Field: Fix alpha resolve f071e41d63.
    • EEVEE: Depth Of Field: Scatter Occlusion dacce1d07f.
    • EEVEE: Depth Of Field: Fix Weighting 2b2e65855a.
    • EEVEE: Depth Of Field: Improvement part 3 ef2ed3d737.
    • EEVEE: Depth Of Field: Improvement part 2 3a62ab73a3.
    • EEVEE: Depth Of Field: Improvement part 1 69b667d14e.
  • Next week

There are still some additional passes to implement to get to the quality of the reference implementation.

Week 211 : 4th - 10th February

  • Info

This week has been mostly planning how to implement the new depth of field, and going over the detail of the reference implementation. For now I've only implemented the scattering optimization that reduce overdraws by 4 (improves color precision and performance).

  • Depth of field
    • EEVEE: Depth of field: Improve scatter pass 144d9b901e.
  • Next week

I now have a clear understanding of the techniques involved and I'll be able to start the new implementatiuon.