A more consistent fix would be to split the 2D view and 3D view
overlay. Unfortunately, this is more difficult than it should
with the current legacy codebase expecting a base class
in various places with reinterpret cast.
The goal is to reduce the startup time cost of
all of these parsing and string replacement.
All comments are now stripped at compile time.
This comment check added noticeable slowdown at
startup in debug builds and during preprocessing.
Put all metadatas between start and end token.
Use very simple parsing using `StringRef` and
hash all identifiers.
Move all the complexity to the preprocessor that
massagess the metadata into a well expected input
to the runtime parser.
All identifiers are compile time hashed so that no string
comparison is made at runtime.
Speed up the source loading:
- from 10ms to 1.6ms (6.25x speedup) in release
- from 194ms to 6ms (32.3x speedup) in debug
Follow up #129009
Pull Request: https://projects.blender.org/blender/blender/pulls/128927
Caused by 364d62e59b.
In draw mode, we want to make sure to show vertex colors by default
because users can draw with them. Otherwise this can lead to unexpected
behavior in solid shading mode when vertex colors used to not be
rendered in draw mode.
The previous fix tried to do this by enforcing the `V3D_SHADING_VERTEX_COLOR`
mode in draw mode. But this has the side effect that the material
stroke and fill color are overriden with pure white.
To fix the issue correctly, simply ensure that `vert_col_opacity` in
`grease_pencil_layer_cache_add` is set to 1.0f. This means that
vertex colors and material colors are shown just like in the render.
Also resolves#128680.
Pull Request: https://projects.blender.org/blender/blender/pulls/129054
If a `DrawGroup` contained both inverted and non-inverted scale
the command generate shader would output the `resource_id`
content at conflicting indices. This is because the number of
instances stored inside the `DrawGroup` are the original
count before multiview. Actually, only `start` was taking the
multi-view count into account.
We cannot modify the value on CPU otherwise it would increase
the instance count for each submission. So the fix is to
pass the view count to the command generate shader and
multiply the instance count where needed.
Fix#128085
Pull Request: https://projects.blender.org/blender/blender/pulls/128854
This is likely caused by local_ray_up being degenerate with
very small radii. This is a temporary fix and should be revisited
later.
The issue is that the real fix is likely to have a higher
performance cost.
Fix#124636
When using OpenGL on Intel ARC the driver reports a max 3d allowed size
of 2048. The volume probe will create a texture that doesn't fit in this
dimension when selecting a probe size of 512 or 1024 MB.
This PR will reshape the volume pool atlas texture until it found a shape
that is optimal and fit on the device. When reshaping selects a different
pool size a warning message will be displayed as it might change the
visual quality.
When reshaping the smallest row size will be selected in order
to improve the occupancy. Reshaping will only happens when a
different setting is set in the `Performance->Memory->Light Probes Volume Pool`.
NOTE: Needs to be backported to 4.2
Pull Request: https://projects.blender.org/blender/blender/pulls/128877
The error message related to shadow updates in `eevee_shadow.cc`
currently contains a typo:
`"Error: Too many shadow updates, some shadow might be incorrect."`
This sentence should use the plural form of "shadows" to correctly
describe the context.
Fixing this typo ensures clarity and correctness in the error message,
providing developers and users with the appropriate feedback when
encountering shadow update issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/128865
Object without lightprobe visibility should still
cast shadows during baking. They should only not
bounce indirect lighting.
This is more visible now that shadow linking is supported.
Fix#128812
Fixes:
1. Mixed use of `sample_reflection` and `sample_refraction`.
`sample_reflection` is intended for when only reflection is required.
For refraction, `sample_vndf` or `sample_refraction` should be used.
2. Wrong weight when accumulating the contribution. Previously
`brdf * NV / (fresnel * pdf)` always evaluates to `GL`, but with the new
technique of bounded VNDF sampling this is not true anymore. Fixed by
adding a field `weight` in the struct `BsdfEval`.
3. Schlick's approximation of the fresnel factor is
`F + (1 - F) * (1 - cos(theta))^5`, but BSDF LUT was using
`cos^2(theta)`, which was incorrect.
When using OpenGL on Intel ARC the driver reports a max 3d allowed size
of 2048. The volume probe will create a texture that doesn't fit in this
dimension when selecting a probe size of 512 or 1024 MB.
This PR will reshape the volume pool atlas texture until it found a shape
that is optimal and fit on the device. When reshaping selects a different
pool size a warning message will be displayed as it might change the
visual quality.
When reshaping the smallest row size will be selected in order
to improve the occupancy. Reshaping will only happens when a
different setting is set in the `Performance->Memory->Light Probes Volume Pool`.
Pull Request: https://projects.blender.org/blender/blender/pulls/128518
Removes unused GPv2 functions in blenkernel.
Notes:
- Functions for layer masks are still in use, but annotations never
have layer masks in the first place. Would be good to remove the data
structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
should also be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/128709
`LH` was computed using `dot(-L, H)`, so there needs to be a negative
sign when computing `Ht2`.
`pdf` is only used for denoising, the change oesn't seem to affect the
regression test.