Cleanup and simplification of GPUMaterial and GPUPass compilation.
See #133674 for details/goals.
- Remove the `draw_manage_shader` thread.
Deferred compilation is now handled by the gpu::ShaderCompiler
through the batch compilation API.
Batch management is handled by the `GPUPassCache`.
- Simplify `GPUMaterial` status tracking so it just queries the
`GPUPass` status.
- Split the `GPUPass` and the `GPUCodegen` code.
- Replaced the (broken) `GPU_material_recalc_flag_get` with the new
`GPU_pass_compilation_timestamp`.
- Add the `GPU_pass_cache_wait_for_all` and
`GPU_shader_batch_wait_for_all`, and remove the busy waits from
EEVEE.
- Remove many unused functions, properties, includes...
Pull Request: https://projects.blender.org/blender/blender/pulls/135637
This makes it possible to restore previous Blender 4.3 behavior of bump
mapping, where the large filter width was sometimes (ab)used to get a bevel
like effect on stepwise textures.
For bump from the displacement socket, filter width remains fixed at 0.1.
Ref #133991, #135841
Pull Request: https://projects.blender.org/blender/blender/pulls/136465
Attribute name could be a path built from multiple object/property names
while each of them can be 64 symbols long.
This was fixed by cff53fdb53, so Cycles
can handle this. But eevee need additional change.
Pull Request: https://projects.blender.org/blender/blender/pulls/131183
Request one separate compilation batch for each GPUPass so users can
get a better sense of the compilation progress, and to better distribute
texture loading over time.
Pull Request: https://projects.blender.org/blender/blender/pulls/125012
With the new closure approach, the code can be simplified and cleaned up quite
a bit.
This also removes four parameters, which is helpful for future additions (!123616)
since the parameter limit appears to be reached.
Pull Request: https://projects.blender.org/blender/blender/pulls/123643
The goal of this task is to remove noise in the most common material
layering configuration.
Subsequently, this also split the evaluation of different closure to
their own buffer to avoid discontinuity when denoising them.
This commit does a few things:
- [x] Removes use of global for closure random number.
- [x] Refactor the forward evaluation to be closure type agnostic.
- [x] Refactor the gbuffer lib to be closure type agnostic.
- [x] Reduces the number of picked closure to 3 maximum or less.
- [x] Use GPU_MATFLAG_COAT to tag the use of multiple usage of glossy BSDF.
- [x] Use two closure bin for Glossy when more than one.
- [x] Set closure bin per type for best noise level for most materials.
- [x] Change the gbuffer header to put the closure at their bin index.
- [x] Add a method to get a closure from the gbuffer from a specific bin.
- [x] Split lighting passes per Closure.
Pull Request: https://projects.blender.org/blender/blender/pulls/118079
The benefits are removing unnecessary reallocations of the string data
and unnecessary recalculations of the size, better type safety, and more
automatic memory management.
Pull Request: https://projects.blender.org/blender/blender/pulls/118045