User:Hypersomniac/Foundation/2021

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 this 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.