blender/scripts
Clément Foucault f79b86553a EEVEE-Next: Add mesh volume bounds estimation
This adds correct object bounds estimation.

This works by creating an occupancy texture where one
bit represents one froxel. A geometry pre-pass fill this
occupancy texture and doesn't do any shading. Each bit
set to 0 will not be considered occupied by the object
volume and will discard the material compute shader for
this froxel.

There is 2 method of computing the occupancy map:
- Atomic XOR: For each fragment we compute the amount of
  froxels **center** in-front of it. We then convert that
  into occupancy bitmask that we apply to the occupancy
  texture using `imageAtomicXor`. This is straight forward
  and works well for any manifold geometry.
- Hit List: For each fragment we write the fragment depth
  in a list (contained in one array texture). This list
  is then processed by a fullscreen pass (see
  `eevee_occupancy_convert_frag.glsl`) that sorts and
  converts all the hits to the occupancy bits. This
  emulate Cycles behavior by considering only back-face
  hits as exit events and front-face hits as entry events.
  The result stores it to the occupancy texture using
  bit-wise `OR` operation to compose it with other non-hit
  list objects. This also decouple the hit-list evaluation
  complexity from the material evaluation shader.

## Limitations
### Fast
- Non-manifolds geometry objects are rendered incorrectly.
- Non-manifolds geometry objects will affect other objects
  in front of them.
### Accurate
- Limited to 16 hits per layer for now.
- Non-manifolds geometry objects will affect other objects
  in front of them.

Pull Request: https://projects.blender.org/blender/blender/pulls/113731
2023-10-19 19:22:14 +02:00
..
freestyle Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
modules Merge branch 'blender-v4.0-release' 2023-10-16 11:36:47 +02:00
presets GPv3: Expose insert keyframe in menu 2023-10-13 14:07:21 +02:00
site Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
startup EEVEE-Next: Add mesh volume bounds estimation 2023-10-19 19:22:14 +02:00
templates_osl License headers: remove GPL header from OSL template script 2023-08-04 13:24:15 +10:00
templates_py Asset shelf: Use asset representation for asset shelf BPY methods 2023-09-15 16:17:44 +02:00