This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
practice)
- Handle transparent materials properly, keeping the
transparency working.
Fix#123284
Pull Request: https://projects.blender.org/blender/blender/pulls/123315
Texture update ignored layered based offsets and extents. This was
an oversight due to misintepreting the API. This fixes uploading the
utility texture of EEVEE and enables correct material shading.
Pull Request: https://projects.blender.org/blender/blender/pulls/123371
This happened in the following render test:
`render/light/all_light_types_in_volume.blend`
Unfortunately it seems non-deterministic.
To fix this, we change the heuristic to jump
out of the shadow update loop. Also introduce
a upper bound to the number of iteration.
On top of this, add a flush for every loop
to avoid huge command buffer submission.
Thanks @pragma37 for the fix.
In the animation filtering code, avoid passing `bDopesheet *ads` as a
separate parameter. Instead, pass `bAnimContext *ac`. This already
contains the same pointer. Some carefully placed asserts help to
verify that these pointers were indeed the same.
Not only do I think this approach is cleaner, it is a necessary step
for upcoming PRs #123187 and #122672. Those will need a `Main *bmain`
pointer, which is already available in the `bAnimContext` struct.
Mostly this is just dumb search & replace.
- `ads` → `ac->ads`
- `bDopeSheet *ads` parameter → remove, and add `bAnimContext *ac`
parameter if necessary. That parameter should be the first parameter
of the function.
- Unused `ads` parameter translates to unused `ac` parameter. Chances
are, that parameter will be necessary for the `Main *bmain` anyway.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/123305
This PR modifies the check for visibility when selected in the outliner.
With the change the visibility check only affects the selection state, not the active state.
The check has also been swapped with a function call to `ANIM_bone_is_visible_editbone`,
so now correctly works with collection visibility.
This PR also fixes the same issue for `Bone` and `bPoseChannel`
Co-authored-by: Cedric-Hutchings
Pull Request: https://projects.blender.org/blender/blender/pulls/123237
At high light count, this missing barriers would
produce invalid, non-unique `prefix_sum` indices.
This then resulted in some slots inside `out_light_buf`
never written to, leaving undefined data inside them.
If the buffer was cleared to zero, these undefined light
slots would be interpreted as sun lights and the
shadow setup compute pass would critically fail because
of out of bound memory.
Fix#123195
Toggling the layer onion skinning toggle would affect the opacity
of strokes on the current frame.
This was caused by the `get_visible_frames_for_layer` function. It computes
a `frame_id` for all the keyframes that are not the currenty visible
keyframe. To skip over the currently visible keyframe on the layer,
it just compared the start frame of the keyframe with the current
scene frame. This only works if the current frame is over the keyframe,
but not for any frames after (even if the same keyframe is still visible).
The fix computes the start frame of the keyframe under the current frame
first, and then uses that to compare to the start frame during the iteration
over all keyframes. This makes sure that we skip over the currently visible
keyframe in that layer.
Pull Request: https://projects.blender.org/blender/blender/pulls/123358
EEVEE Film accumulation workaround for Metal/Intel iGPUs.
On Metal the Intel iGPUs do not support image read write
on array textures. However this limitation doesn't show
any artifacts when using the compute shader.
This PR is a work around that uses the film_comp shader
to process the film samples, but uses a separate film_copy_frag
shader to read the result and copy them to the frame buffer.
I deliberately didn't include the fix to the film_frag shader
as that would change the read/write resources and could lead
to performance issues for other platforms. Writable resources
are typically slower compared to read only resources.
Some code needed to be duplicated (and not added to `*_lib.glsl`)
as compilers would still raise compilation errors due to imageStore/Load
on incompatible resource access.
The Metal/Intel iGPU is also marked to have limited support as
raytracing and probes still produces big artifacts.
This workaround can be tested on any platform just by setting
`use_compute_ = true` in `Film::sync`
Related to #122361
Pull Request: https://projects.blender.org/blender/blender/pulls/123330
The current temperature unit adjusts to Celsius or Fahrenheit based on
unit system, but specifically for color temperatures the convention is
to display them in Kelvin, and it'd be strange to e.g. see 11240°F when
opening the white balance panel.
Therefore, this adds a dedicated Color Temperature unit, and uses it
for the two existing blackbody temperature inputs in shader nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/123337
The previous code was using matrix multiplication to
get the local thickness to world thickness.
The correct way is to multiply the local thickness
by the scale of the object (length of each columns
of the object_to_world matrix).
This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
practice)
- Handle transparent materials properly, keeping the
transparency working.
Fix#123284
Pull Request: https://projects.blender.org/blender/blender/pulls/123315
When copying a local ID into a library, or a linked ID into a different
library, the 'linked' tags would not be properly preserved or set, and
the relative file paths would not be properly remapped.
These issues were not currently exposed (no existing code could trigger
them), but some of these fixes are needed for upcoming refactor of the
partial write code.
NOTE: not very happy with the split in library handling between
`BKE_id_copy_in_lib` and `BKE_libblock_copy_in_lib`, this will have to
be solved at some point.
Pull Request: https://projects.blender.org/blender/blender/pulls/123247
Adds the ability to change the curve type of selected strokes.
First steps toward #121574.
Note: Currently there is no way to visually notice any change. This
will be added in subsequent commits.
Pull Request: https://projects.blender.org/blender/blender/pulls/122964
When using particle system the generated coordinates where not set.
The reason is that a loose resource handle was created for particle
system that didn't contain enough information to calculate orcos.
This PR will create the object info from its parent object.
Pull Request: https://projects.blender.org/blender/blender/pulls/123307
This bias was added when the pixel radius estimation
computation was still broken. This resulted in a shadow
bias way too big in general.
Also fix shadow pixel size being clampped to the wrong
LOD level.
Fix#123295
A strip was wrongly deemed to be opaque (and thus strips below it
were skipped from rendering), if the strip content was opaque, but
it gained transparency via presence of a Mask modifier.
While at it, I also noticed that a strip could have been wrongly deemed
opaque when it had a Multiplier < 1.0 with "multiply alpha" option
checked under strip Color settings. So fixed that too.
The whole logic of that factored out into is_opaque_alpha_over function
to make the call site clearer.
Pull Request: https://projects.blender.org/blender/blender/pulls/123303
For very low frequency sounds (the ones where waveform drawing goes into
"line mode"), either of min or max can go outside of -1..+1 range.
The code was assuming that only max could be above +1, and only min
could be below -1. Fix that, and also make "line mode" also apply
red "clipped" color when clipping happens.
Pull Request: https://projects.blender.org/blender/blender/pulls/123246