Age | Commit message (Collapse) | Author |
|
Motivation is to disambiguate on the naming level what the matrix
actually means. It is very easy to understand the meaning backwards,
especially since in Python the name goes the opposite way (it is
called `world_matrix` in the Python API).
It is important to disambiguate the naming without making developers
to look into the comment in the header file (which is also not super
clear either). Additionally, more clear naming facilitates the unit
verification (or, in this case, space validation) when reading an
expression.
This patch calls the matrix `object_to_world` which makes it clear
from the local code what is it exactly going on. This is only done
on DNA level, and a lot of local variables still follow the old
naming.
A DNA rename is setup in a way that there is no change on the file
level, so there should be no regressions at all.
The possibility is to add `_matrix` or `_mat` suffix to the name
to make it explicit that it is a matrix. Although, not sure if it
really helps the readability, or is it something redundant.
Differential Revision: https://developer.blender.org/D16328
|
|
This was because `stroke_id` was not using `vertex_start`.
But since `vertex_start` is not 1 based like it used to be, we need to add
1 to it to avoid a fragment depth of `0.0` which would be equal to the
background and not render.
|
|
This is a convenience when one needs to often change the current framebuffer
and avoid the overhead of creating many Main/Simple passes.
|
|
Was caused by uvs not being sourced from the correct buffer.
|
|
This allows using drawcalls with non default vertex range.
These calls will be culled like any other instance by the GPU culling
pipeline. But they will not be batched together since the vertex range
is part of the group.
|
|
|
|
* External engines do not use the PBVH and need slower depsgraph updates.
* Final depsgraph tag after stroke finishes was missing for sculpt color
painting, caused missing updates for other viewports as well as any
modifiers or nodes on other objects using the colors.
|
|
Note: Still need to fix PBVH_BMESH.
|
|
|
|
These are unecessary now that we can bind buffers as textures directly.
|
|
Was caused by an extra point per stroke being drawn.
|
|
This change the attribute binding scheme to something similar to the
curves objects. Attributes are now buffer textures sampled per points.
The actual geometry is now rendered using an index buffer that avoid too
many vertex shader invocation.
Drawcall is wrapped in a DRW function to reduce complexity of future
changes.
|
|
This was caused by a wrongly sized vertex buffer for the stroke buffer.
|
|
For some reason stroke_id needs to be the triangle index, not the vertex
index.
|
|
Vertex indexing has not been updated and stroke_start usage was wrong.
Update all `stroke_start` usage.
|
|
`vert_len` was being shadowed and index_min & max wasn't correctly set.
|
|
|
|
Batching was broken / disabled and starting indices were wrong.
|
|
|
|
This allows using instancing in other ways, like resources indexing.
|
|
|
|
This fixes some firefly issues on corners of the cubemaps where the
blending factors would go above 1 or below 0.
|
|
In T93382, the problem was that the Blender-side rendering code was
still generating the subsurface passes because the old render pass
flags were set, even though Cycles doesn't generate them anymore.
After a closer look, it turns out that the entire hardcoded pass
creation code can be removed. We already have an Engine API function
to query the list of render passes from the engine, so we might as
well just call that and create the returned passes.
Turns out that Eevee already did this anyways. On the Cycles side, it
allows to deduplicate a lot of `BlenderSync::sync_render_passes`.
Before, passes were defined in engine.py and in sync.cpp. Now, all
passes that engine.py returns are created automatically, so sync.cpp
only needs to handle a few special cases.
I'm not really concerned about affecting external renderer addons,
since they already needed to handle the old "builtin passes" in
their Engine API implementation anyways to make them show up in the
compositor. So, unless they missed that for like 10 releases, they
should not notice any difference.
Differential Revision: https://developer.blender.org/D16295
|
|
This is an attempt to remove a driver bug.
|
|
objects
Move the material resources binding inside the
`DRW_shgroup_curves_create_sub` so that `DRW_shgroup_call_no_cull`
extracts the attributes.
|
|
MTLBatch and MTLDrawList implementation enables use of Metal Viewport for UI and Workbench. Includes Vertex descriptor caching and SSBO Vertex Fetch mode draw call submission.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D16101
|
|
color uniform assignment needing to be changed to ucolor was missed.
Ref T101445
Reviewed By: fclem
Maniphest Tasks: T101445
Differential Revision: https://developer.blender.org/D16236
|
|
|
|
Problem here was that layer_collection_objects_sync wasn't called when
the holdout property is updated due to frame change, so the changed
visibility flag was never applied to ob->base_flag.
Turns out there's no real reason to handle the per-object holdout
property through the layer system. So, instead of merging both the
layer holdout and object holdout into base_flag and checking that
from the render engines, only handle the layer holdout (which can't
be animated, so no issue here) through base_flag and explicitly also
check the object holdout in the render engines.
|
|
|
|
|
|
Turns out PBVH drawing and normal mesh batches are not mutually
exclusive inside the draw cache; there are edge cases with modifiers
and instancing where you need both, and forcing one or the other
inside this function leads to memory corruption.
|
|
tmp
|
|
- Remove unused include
- Avoid repeating blender:: namespace
- Remove timer left in by mistake in previous commit
|
|
On a Ryzen 3700x I observed a 4ms improvement (from 5ms to 1ms)
on every redraw when sculpting with 88000 curves.
|
|
Error in c67e5628d22f8348492 which mistook clearing
the pointer for clearing the values in the struct.
|
|
Instead of allocating three separate ThreadMutex pointers,
just embed std::mutex into the struct directly.
|
|
This commit replaces the `Mesh_Runtime` struct embedded in `Mesh`
with `blender::bke::MeshRuntime`. This has quite a few benefits:
- It's possible to use C++ types like `std::mutex`, `Array`,
`BitVector`, etc. more easily
- Meshes saved in files are slightly smaller
- Copying and writing meshes is a bit more obvious without
clearing of runtime data, etc.
The first is by far the most important. It will allows us to avoid a
bunch of manual memory management boilerplate that is error-prone and
annoying. It should also simplify future CoW improvements for runtime
data.
This patch doesn't change anything besides changing `mesh.runtime.data`
to `mesh.runtime->data`. The cleanups above will happen separately.
Differential Revision: https://developer.blender.org/D16180
|
|
Allows improving performance with BLI_task.hh in draw extraction code.
Threading added in c15a63d21eae49ffd improved performance by 3-4x
for me, but didn't make a difference until now.
|
|
|
|
|
|
This adds the possibility to use the C++ API for other GPUTexture.
|
|
|
|
|
|
When image data exceeds half float ranges values are set to +/-
infinity that could lead to artifacts later on in the pipeline.
Color management for example.
This patch adds a utility function `IMB_gpu_clamp_half_float`
that clamps full float values to fit within the range of
half floats.
This fixes T98575 and T101601.
|
|
This change is part of a wider set of changes to implement Grid and Pixel
snapping in the UV Editor. This particular change adds a new third option,
`pixel grid`, to the previous grid options, `dynamic grid` and `fixed grid`.
Maniphest Tasks : T78391
Differential Revision: https://developer.blender.org/D16197
|
|
|
|
|
|
|
|
|