From BlenderWiki

Jump to: navigation, search

Week 3: 1st - 8th January

  • General development
    • Added 2d texture arrays to draw multiple matcaps with less texture bindings.
    • Got matcap to work without proper mesh normal (using dfdy to derive normal) as a quick test waiting for proper VBO request.
    • Refactored the GPU_texture module to allow more internal image format and use consistent function names. D2452

Week 4: 9th - 15th January

  • General development
    • Ported SSAO to the new matcap shaders.
    • Added an inverted AO effect to Matcap shader using the same loop as the AO "cavity" effect, highlighting edges.
    • Added parameters to control Hue Saturation Value and Rotation of the Matcap texture.
    • Found a problem in the fragment shader of SSAO and fixed it in master. 0507b3e4c41f
    • Started investigating Ground Truth AO as replacement of Alchemy AO.

Week 5: 16th - 22nd January

Ground truth ambiant occlusion Work in Progress
  • General development
    • Posted a proposal about a cache system to accelerate viewport redrawing. Document
    • Made an early implementation of Ground Truth AO.
    • Added support for Uniform Buffer Object in the GPU module.

Week 6: 23rd - 29th January

  • General development
    • Cleanup Clay Engine to support new MBC functions.
    • Started Work on object mode overlay an non-meshes object.
    • Introduce Dynamic VBOs that are created from a list of objects matrices (giving line or points).
    • Use the aformentionned technique to batch object center and relationship lines giving huge performance gain.
    • Changes to DNA/RNA for the RenderEngineSetings.

Week 7: 30th - 5th Febuary

  • General development
    • Added support for instancing. This leads to a new performance gain.
    • Ported mostly Empties and Lamps drawing to the new drawing methods.
    • Benchmarked the performance gain of non-meshes drawing with instancing and batching. Test files are available here
    • Worked on getting object mode display (wires, outlines).
    • Rewrote some bits of the clay engine to not relly on a custom runtime data struct. 0ee52a5741a1

Week 8: 6th - 12th Febuary

Collection render settings in action : multiple matcap materials
  • Info

Monday we merged clay-engine/render-layers branch to blender2.8. A large portion of my time was dedicated to OGL refactoring tasks.

  • General development
    • Opengl Refactoring :
      • Finished interface_draw.c
      • Nearly finished drawarmature.c
      • Added replacement for gluSphere, gluCylinder, glaDrawPixelsTex*
    • Clay Engine :
  • Next week

I still need to finish the drawarmature refactoring, that will be done by monday. Since I spent a bit of time on the ogl refactoring, I'll try to catch up and do more work on clay engine. Specially on having everything from old viewport tightly integreted in the new DRW module (cursor, transform tools). Then I will implement the Edit mode Collection settings as planned.

Week 9: 13th - 19th Febuary

New SSAO without artifacts
  • Info

Last week was more focused on OGL refactor so I focus back on CLAY. Some work was done not following planning order but overall progress is still on time.

  • General development
    • Opengl Refactoring :
      • Finished drawarmature.c, transform_manipulator.c
    • Clay Engine :
      • Added support for geometry normals. Now clay is better than master matcap+ao because ambient occlusion does not use derived normals (see screenshot).
      • Added back some object/edit mode collection settings, namely "Wire (overlay display)", "Backface culling", and "Hidden Wire"
      • Added back transform manipulator and info drawing.
      • Separated "modes" drawing code into sub-engines. (commit)
      • Added debug variable (Shortcut Ctrl+Alt+D) 666 (no instance caching, non meshes position are recomputed each frame) and 667 (full cache, scene is frozen until you exit this mode) to test viewport cache performance.
  • Next week

Appart from OGL refactor duties, I will contentrate on edit mesh drawing and the overlay shader (with Mike Erwin's help) that will be used whenever we have to draw wire with shaded geometry.

Week 10: 20th - 26th Febuary

New solid wireframe
  • Info

I'm exhausted, I worked 7days full time...

  • General development
    • Opengl Refactoring :
      • Finished interface_panel.c, interface_widgets.c, uvedit_smart_stich.c, paint_stroke.c, gpu_framebuffer.c
      • Finished porting all glaDrawPixels function to imm equivalent.
      • Ported OCIO implementation to GL 3.3 core. (link)
    • Clay Engine :
      • Started Edit Armature sub-engine: Base is here so someone can finish it. Only Octahedral armatures are supported. (link)
      • Added Edit Mesh overlays: Based on the work started by Mike Erwin, I removed the artifacts due to cliped vertices following Nvidia's paper. I also added point drawing in the same pass and face drawing. Everything can be done in one rendering pass, except for face centers. There is still artifacts on the silhouette of the mesh, I plan to fix this but this would require 6x time more tris to rasterize. I think this will be a quality switch in the settings panel, or switch if off when rotating the view or anim playback. With this technique we are completely GPU bound when drawing edit mesh. However it need to upload a certain amount of data to the GPU that is still slow to regenerated on edits. This could be optimized later. (link)
  • Next week

This is a buffer week. Since I met pretty much all the requirement for this month, I can polish the work done and maybe start on the Eevee engine. I'll try to improve the solid wireframes to use theme color, fix edge artifacts. Maybe do a bit more of the armature drawing to refine the instance batching. I would love to try some temporal refinement too but I don't know if I would have time for this. I also need to create timing code to display render time informations.

Week 11: 27th - 5th March

New and Old transparent wires
  • Info

I left asside the OGL refactor tasks to focus on edit mesh overlays. I've worked on fixing the half edge problem as I found it to be a substancial problem (both verts and edges of faces viewed side-on disappearing, vertex being cut at the triangles boundaries). To fix this, I draw a triangle strip with constant width in viewspace, around every triangle using the geometry shader. But the fact all triangles must be in a strip force us to make degenerate triangles to draw the contour, thus we must output 23 vertices per triangle. It results in very poor performance (roughly 1/3) compared to the normal version. So I disabled the fix when navigating the 3D view. We still benefit from this technique though. We don't need 3 passes to render Verts/Edges/faces and we get no depth-fighting or poking through with underneath render (there is still artifact due to depth precision right in front of camera but it results mostly in noise on the edges).

We also discussed planning for the month of March. I also detailled the steps for the developpement of the Eevee engine. Document

  • General development
    • Edit Mode :
      • Fixed the overlay edges being half width at the silouhette. commit commit
      • Added support for loose edges, loose verts and face center. commit
      • Added support of the "Limit selection to visible" feature with an opacity slide option. This is an improvement over the old system that was loosing clarity with dense mesh. Now we have a proper depth sorted wires.
      • Support for Theme colors via UBO. commit
    • Object Mode :
      • Mostly Finished lamp drawing.
      • Added Camera drawing. This is a great reference for someone who want to help port other Non-meshes to the new system. commit
  • Next week

I will try to cleanup the draw manager and make template of things to do so others can work and help. Then I'll start Eevee.

Week 12: 6th - 12th March

Transparent occluded Normals
  • Info

A huge portion of the week was dedicated to drawobject.c. Eevee was postponed until we have a solid roadmap for it.

  • General development
    • Edit Mode :
      • Ported Normals (Verts/Loops/Face) display. commit
    • Draw Manager :
      • Restructured the overall design to be more modular and allow engine compositing. commit
      • Added templates for all practicle mode engines. commit
    • OpenGL Refactor :
      • Nearly finished drawobject.c only remaining legacy calls are for DerivedMesh usage.
  • Next week

Amsterdam Meetup and hopefully a bit of Eevee.

Week 13: 13th - 19th March

New selection outlines
  • Info

Amsterdam Meeting was really productive. Meeting notes are comming soon, but as a short overview we discussed Eevee planning, the current state of the new drawing code, and the OpenGL refactor tasks. I also spend a bit of time on selection outline refinement. For this I implemented stencil masking usage, but final implementation does not rely on it. If I don't find any other I'll remove it. I also started Eevee yay \o/.

  • General development
    • Object Mode :
      • New Outlines (see picture): First Implementation used Three passes and was very slow compared to the old one (two passes). Also, appart from modulating the occluded silouhette edges, it was not very different from what we have now. Final implementation is a bit more subtle with an outward gradient and a light fill color.
    • GPUTexture :
      • Implement Depth Stencil Textures. commit
    • Eevee :
      • Support for 256 scene lights via UBO (only diffuse for point lights), Limit can be highier and needs to be set depending on system capabilities. Old limit was 48 or was prone to shader compilation error (too much variables). commit
    • OpenGL Refactor :
      • Converted gpu_compositing.c. commit
  • Next week

I'll plan to write documentation about the Draw manager and the whole drawing flow with engines. Then I'll focus on a Memory Manager / Inspector in pair with a statistic tool for benchmarking viewport development.

Week 14: 20th - 26th March

Selection outlines reworked
New fading grid
  • Info

Documentation of the draw manager and code flow is up there. I've worked a bit off schedule and focused a bit on the outline and grid refactor. I've also written the ideal components of the mesh batch cache to have the maximum memory efficiency (smaller vbos) and data Independence (faster update) link.

  • General development
    • Object Mode :
      • New Outlines changes : Following plyczkowski mockups (T51021) I changed the outline algorithm to have the same appearance.
      • New Grid : Again, following plyczkowski mockups, I implemented a grid that fades away from the camera position. Grid subdivision become lower the further the distance to the camera. For now the fade-out starts at half the clip distance. It is anti-aliased and have constant performance cost (compared to the old grid). User feedback is needed.
    • Draw Manager :
      • Refactor Static var : Engines were relying on a static g_data var when generating the cache, eliminating any parallel executions. This improves code clarity and potential for multi-threading.
      • Debug Stats : Include detailed CPU and GPU timings when debug var is > 30 (CTRL+ALT+D). This will be useful for profiling and performance testing. (screeshot)
  • Next week

I'll plan to focus on the scene light support for eevee.

Week 15: 27th - 2nd April

Area Light Quality Comparison
  • Info

This week focus was area lights. We are on time following the planning. Quality settings are planned but not there yet.

  • General development
    • Eevee Area Lights : I implemented several techniques for area lighting. Only 2 brdfs are taken into account, lambert diffuse and GGX specular. From cheapest to the most expensive approximation we have :
      • Point light : If desired, for performance reason, area light can be turned off completely and converted to simple point lights.
      • Simple Approximation : Starting from this level Sphere area light diffuse contribution are calculated analiticaly (exact look). Rectangle Lamps are using structured sampling with 5 points as described in the Frosbite PBR notes. For specular surfaces, we use Brian Karis MRP method for sphere lamps and a custom MRP solution for Rectangle Lamps.
      • Expensive Approximation : If quality is needed, we use the LTC solution from Eric Heitz. This gives us perfect diffuse contribution of Rectangle Lamps and a fairly good approximation for GGX spec. For Sphere Lamps specular, we use the spinning quad technique described here. Unfortunatly energy preservation is not perfect and there is an artifact appearing in the light direction.
      • Accurate Approximation : To fix the last problem concerning sphere lamps (see just above), we compute the LTC integral for a whole octogone instead of just a quad. The clipping algorithm is made simpler but introduce a neglectible error. The octogone and the circle have less area difference and thus the approximation is better.
  • Next week

The plan is to focus on Eevee shadow support.

Week 16: 3rd - 9nd April

Eevee with point lamp shadow
  • Info

This week focus was shadows. I lost some day figuring out what was the right approach considering old hardware support first (being gl 3.3 only). I went from a complicated general shadow pool to a per shadow type pool for each viewport. Vram usage is not efficient for now because every viewport allocate their own shadows even if they display the same renderlayer. I did manage to create a point light shadowing system that does not rely on GL_ARB_texture_cube_map_array. Rendering is using Geometry shader and make the whole shadow refreshing very slow. I did not have the time to implement Cascaded Shadow maps and VSM as I would like so current shadow are only using hardware PCF.

  • General development
    • Object Mode :
      • Added grid fading based on the angle of view.
    • Eevee Shadows :
      • Implemented shadows with texture arrays. This gives the benefit to not rely on dynamic shader recompilation to use them and also spare a lot of texture binding slots. The downside for now is that we need to use layered rendering to render these shadowmaps.
  • Next week

I need to keep Eevee dev going and tackle the envmap rendering (will be pretty much similar to the shadow hopefully). We also need to tackle the transition to ogl 3.3 and I'm part of the dev force for it. Main focus will be to port features to new Draw Manager/Mode Engines.

Week 17: 10th - 16th April

World Probe prefiltered
  • Info

I've dedicated my week toward Envmap rendering and prefiltering. Rendering is optimized and is about 1ms (Render 0.25ms + prefilter 0.75ms) for 512px cubemap.

  • General development
    • Object Mode :
      • Ported Force field display to new Draw Manager commit
    • Eevee Probe :
      • Implemented World probe rendering and prefiltering. Following Unreal Engine split sum approximation, I generated a slittly different LUT to be merge with the LTC_mag LUT (they use the same parameters). Prefiltering is done by Filtered Importance Sampling with a variying amount of sample, minimizing the time spent for each cubemap. I have not heavily validated against Cycles as it's currently broken in 2.8.
  • Next week

I still need to make the spherical harmonics extraction to have diffuse radiance information from envmap. After that my main focus would go towards the GLSL PyNodes and how to support unreals shader input using PyNodes.

Week 18: 10th - 16th April

Cascaded shadow map
  • Info

This week was focus on wrapping up some features from past weeks. I still have not done VSM.

  • General development
    • Eevee :
      • Implemented L2 Spherical Harmonic computation for diffuse environment lighting. Optimized generation is roughly 1ms on my system (GTX 960).
      • Implemented Cascaded Shadow Map: There was a few trick to make them stable. This gives us scene scale shadows for sun lamps with increassing detail towards the camera.
      • Speedup shadow rendering using geometry shader and instancing. Biasing is perfectible and some parameters will need to be on lamps / scene settings.
  • Next week

I will take a bit of time to get the materials working with the new DrawManager. I expect this to be a bit difficult (making old nodes still work with new shaders) and it will surelly put me behind schedule.

Week 19: 17th - 23th April

Material Nodes with PBR output
  • Info

As I expected porting Materials was not an easy task. I have yet to create special output node for Eevee. At least old nodes works (I have not tested all of them)

  • General development
    • Mesh Batch Cache:
      • In order to have full attribute support in materials (UVs, Tangents, Vcols), I needed to add support for them in the MBC. Turns out this was not easy because all of this was mixed between binding time logic in Derived Mesh and shader compile time logic. I tried to come up with a simplest (and more efficient in the end) solution that involves naming the attribute by their layer name. See the [commit] for more details. Tangent support is still wonky.
    • Eevee :
      • Support for default shader parameters (no nodetree - no texture support). Parameters are not final and needs some design.
      • Support for nodetree and current shading nodes. Engines can now request a GPUMaterial with their own GLSL header / vertex code. Implementation is not perfect but it suits our basic needs for now.
  • Next week

I'm going to add Output nodes for both Specular and Metallic workflow. Then I'll follow planning with a bit of delay and work on postprocess effects.

Week 20: 24th - 30th April

  • Info

This week was spent entirely on getting the node system to work with the draw manager.

  • General development
    • Spent the whole week on modifying the codegen / attribute system to work with eevee. This enables materials generated from nodetree to be compatible with eevee. It's not using PyGLSL but it will greatly benefit from it latter.
    • Implemented Specular and Metallic workflow uber shaders.

Week 21: 1st - 7th May

  • Info

This week was focus on post processes right in the viewport.

  • General development
    • Camera Motion Blur: Use animated camera transform deltas to create motion vectors for static objects and create a blur using these vectors. The blur algorithm is simple and suffer from bleeding artifacts.
    • Bloom: Added bloom (a.k.a. glare) filter from kinobloom. There is still visual artefacts that may come from my bad implementation.
    • Display Background Shader for eevee. commit
    • Fix anoying Seam on Equirect Environment Map commit
    • Add memory usage in debug stats.
  • Next week

Finishing other key postprocesses.

Week 22: 8th - 14th May

Depth of field, Motion blur, Tonemapping, and subtile bloom
  • General development
    • Depth of field: Revisit the current Depth Of Field algorithm and port it to Eevee. It's using more a more efficient rendering method using generated triangles without any vbos. I also made the depth of field corespond to the actual field of view in camera view (that was not the case before). Algorithm is still slow and should be coupled with a gaussian blur for low brightness pixels.
    • Tonemapping: Added support for OCIO tonemapping for Eevee. Now eevee benefits from all OCIO features (dithering, color curve, looks, filmic ...) commit
    • Added UI for PostProcesses.
    • Started Mesh Batch Cache optimisation.
  • Next week

Performance is becoming a critical subject. Next week will be dedicated to solve this matter.

Week 23: 15th - 21th May

  • Info

This week was focused on optimisation. I lost a little bit of time trying to optimized normal drawing that revealed to be a dead end (half a day). The end of the week was used to prepare for the incommint probe implementation. Performance are way better but general editing workflow is still slow. Also it seems that animations are suffering from batch cache invalidation.

  • General development
    • MBC Optimisation : Deduplicate Vertex buffer and use aliases for material shaders to work. Try to use compressed format where we can. Can use further optimisation for users that wants (reduce precision, range ...).
    • ORCO is now derived from local positions inside the shader. It's only a MADD instruction so it's not really slowing things drastically. Also separate edit mode attributes from position / normals. Mesh memory usage went from 434 MB (94ms) to 163 MB (25ms) on my test scene. commit commit
    • Texture Optimisation : Share additionnal buffers across draw engines to use less different textures. No additionnal buffers are required edit mode wire transparency. Also use 11_11_10 hdr buffers for eevee to reduce bandwidth and storage.
    • Added support for instance particle buffer for Particle drawing.
    • Octahedron mapping : Simplier support of old hardware without cubemap array support. commit
    • Starting to implement soft shadows : Using the ESM method
  • Next week

We need to revisit the MBC to make it more efficient. This is the main bottleneck for mesh update. Also fix mesh update when not in edit mode (apply scale, set smooth ...). I want to fix the freeing of viewport data to be able to carefully handle freing whatever type of data we store in it. Only Passes needs to be in a separate List. This is needed because right now UBO's are leaking on the OGL side (handles are not free). Next week will be mainly focused on Probes and fixing remaining problems for daily production usage.

Week 24: 22nd - 28th May

  • Info

Was at the Blender Institute to plan next few months. Planning can be found

  • General development
    • I tried to make a better cheap area light model together with Luca Rood but we failed to find a competitive solution to LTC. I decided to get rid of lower quality lighting implementation assuming user with low-end hardware will prefer accurate point lights instead of really off area lights.
    • Minimized the precision issue with the grid drawing, better but still not enough. This problem seems to be worse on some AMD cards.
  • Next week
    • Focus on optimisations and add support for probes.

Week 25: 29th - 4th June

Ssao sampling improvement
  • Info

Didn't had time to finish probes. I focused on what would make the probes faster when they will be introduced.

  • General development
    • Ported probe rendering to Octahedron env-maps. This enables us to use 2D texture arrays for multiple probes (broader hardware support than cubemap arrays).
    • Some UI work on Eevee's World, Material and Light panels.
    • Optimized Refreshing of Cubemaps and Shadows by rendering them only when needed.
    • Polished ESM with a 32 tap poisson blur (still pretty fast since it's only done on one channel).
    • Move Spherical Harmonics to UBO along with probe data (that still need to be tackled).
    • Also broke Eevee into smaller files.
    • Improve Clay SSAO with blue noise.
    • Make use of a ghash to store Shgroups for eevee and not duplicate them. This greatly reduces the cache overhead on scene with lots of objects (by a factor of 4).
  • Next week
    • Finish probe and move on following the planning (skipping the indirect lighting part for now).

Week 26: 5th - 11th June

Probe object with proper parallax
  • Info

Probes are in working state. Started the Irradiance Volume implementation since I really felt it was needed.

  • General development
    • Probes : After much debate we decided to go for a dedicated datablock. They are not finished but are ready for testing.
      • It's sill missing data previsualisation (for debugging).
      • There is still some problems like update not triggering when moving objects near probes. But I'm hesitant to enable this as probes are slower to refresh than shadows.
      • Also probes are capturing specular reflection which is a bug and should not happen.
      • Blending is not optimal. If a probe is inside another probe they will be considered in their creation order instead of their distance.
      • Added proper parallax correction volume (Box and Sphere) and tried to make it easy to use.
    • Started Implementing a rather crude precomputed Irradiance volume solution. Needs some times to finish it.
  • Next week
    • Finish Irradiance volume and catch up with the planning (planar reflections and finish uber shader).

Week 27: 12th - 18th June

Sphere lit by indirect lighting captured by the Grid Probe
  • Info

Irradiance volumes (known as probe grid in the UI) are working. It's not finished : I want to add precomputed visibility, thus lowering the number of samples needed for the grid, but this can wait. Planar reflections are working but still unfinished (no normal deformation, no roughness blurring). Appart from finishing the uber shader we are somewhat following the planning.

  • General development
    • Finished Grid Probes: They are used to compute incomming diffuse light from several position inside a volume. They capture multiple light bounces and record directionnal lighting info (works with normal mapping).
    • Started Planar probes: They are usefull for large planar glossy surface and does not suffer from artifacts like SSR. But implementation is still incomplete.
    • Added options to view probe data inside the viewport.
  • Next week
    • Tackle GTAO, finish uber shader, finish planar reflection to a state they are usable.

Week 28: 19th - 25th June

From top to bottom: AO + Bent Normal, Bent Normal only, Original.
Left: without planar reflection, Right: with planar reflection. Planar delimitation is barely visible.
  • Info

This week was focus on the Ambient Occlusion. It's in good shape but not pixel perfect and still need more optimisation. I didn't had time to finish the uber shader.

  • General development
    • Planar reflection:
      • Fix zfighting issue. commit
      • Add normal distortion based on distance to reflection. commit
      • Add AO in planar reflection. commit
      • Started to implement planar reflection blurring but that seems to be an harder task than I expected.
    • AO:
      • Revisit GTAO and make is fast. Use higher LOD for further samples from the interest texels.
      • Make sample spacing exponential. This way near occlusion is always correct. However there is major artifacts if occluder is very far in screen space.
      • Introduce the concept of Bent Normals: This option compute the least occluded direction when computing the AO. This direction is then used to sample the diffuse lighting and mimic the effect of a bounce lighting. This bent normal could also be used for specular shadowing.
      • Added the creation of a minmax pyramid that will be usefull in the future.
    • Optimisation:
      • Dalai & I found and fixed the bottleneck causing the major slowdown when updating postprocess values. commit
    • GPencil:
      • Antonio Vasquez needed some help with rendering multiple grease pencil objects without Z fighting.
      • We found a solution to his problem by adding support for rendering depth without depth test commit
  • Next week

I still have to finish the uber shader and make it compatible with the principle bsdf. After that I'll fix the bloom and work on a simple fog system.

Week 29: 26th - 2nd July

Volumetrics with lamps and shadows
  • Info

This week focus was on smoothing the User Experience. Helping with some performance issue and some long standing bug like the clamped HDRI values.

  • General development
    • Implement fast and ugly Planar Probe roughness blurring: This works somewhat for low roughnes, but this need much more work, and I think this should be fused with the stochastic approach we will use for SSR to offer best quality result.
    • Principled BSDF: Added basic support in order to get rid of the metallic and specular eevee nodes. The plan is to simplify the workflow using only existing nodes. The specular workflow node should be merged with the Principled BSDF using an enum and hiding some inputs. Unfortunately a technical limitation is hitting us right now. Also Sheen parameter is still unsupported. 08310996645f e14fd191054c
    • Prepared support for anisotropic shading: waiting for TAA first because it's using a stocastic approach and generate a lot of noise. 95797336f5ab
    • Introduced new icons for each probe type.
    • Fixed bloom artifacts: clamped colors to avoid too bright or negative color to bleed all over the place.
    • Huge shader codebase changes for Principle BSDF, more modularity.
    • Unclamped HDRI textures. a1a40bfe7057
    • Fixed bug with probe shaders: was giving black reflection using AO or bent normals. T51922 cdb07ff30e86 790b15112b63
    • Worked on Physically based Participating media (aka. Volumetrics).
  • Next week
    • Finish volumetric basic support (only world nodetree), start transparency.

Week 30: 3rd - 9th July

  • Info

Working on Volumetrics put me behind schedule. I have to catch up on the transparency.

  • General development
    • Fixed several eevee bugs: T51979 6eea22b2b702 T51904
    • World Volumetrics are in a usable state. No Volume object support. World node tree is now supported.
    • One commit removed the possibility to connect "shader" sockets to "color" sockets. This may be adressed in the future. 2eef097831ca
    • Transparency, started implementation, needs 1 or 2 days to finish it. Complex transparency (absorption, refraction) may require much more work. Can have cheap approximation (one refraction event) while waiting.
  • Next week

Finish basic transparency, with sorting per object. Tackle the probe update tagging and see if there is time left for Screen Space Reflections.

Week 31: 10th - 16th July

  • Info

I finished blend modes. Unfortunately true transparency (refraction, transmission) is harder than I expected and share some code with SSR. So I focussed on SSR.

  • General development
    • Transparency: Added support for different blend modes. These can help simulate transparency.
      • The order dependant blended surfaces (Add / Multiply / Alpha Blend) are sorted based on their object origin local Z distance to the camera.
      • Added an option to limit transparency to the first "transmission" event. This fixes sorting problem inside the same mesh at the cost of loosing half the mesh.
      • A hashed alpha mode was added to support correct alpha blending when using anti-aliasing.
    • Screen Space Reflection: Spend some time to find how to render multiple specular lobe per surface. Conclusion is: only one lobe for now, and bruteforce for offline rendering. Found a solution to extract which lobe to use. Necessary data (normal, roughness, specular) are outputed to buffers. Theses have required some code changes.
  • Next week

Finish Screen Space Reflection and add one layer Refraction.

Week 32: 17th - 23rd July