Age | Commit message (Collapse) | Author |
|
The constant M_PI_4 is added to GLSL to ensure it works there too.
Differential Revision: https://developer.blender.org/D14288
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D14306
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D14307
|
|
|
|
|
|
Some drivers for legacy platforms seem to have issues with compute
shaders, as revealed by T94936. This disables compute shader for the
known drivers where this issue is present. It is not clear if the issue
is Windows only or not, so this disable them for all operating systems.
See T94936 for a list of configurations where the issue is reproducible
or not.
Differential Revision: https://developer.blender.org/D14264
|
|
An alpha component can be specified for an object's color. This adds an alpha
socket to the object info shader node allowing for the alpha component of the
object's color to be accessed in the shader editor.
Differential Revision: https://developer.blender.org/D14141
|
|
|
|
|
|
This is an OpenGL 4.3 feature that enables creating a texture using a range
of the same data as another texture.
|
|
This means textures need to have the number of mipmap levels specified
upfront. It does not mean the data is immutable.
There is fallback code for OpenGL < 4.2.
Immutable storage will enables texture views in the future.
|
|
Fixes issue introduced in rB1685b1dba44e02ce1faace4a5de6d6cd0d98ef90
|
|
Also add an assert to avoid reproducing the error in the future.
|
|
|
|
Also use SRC_ prefix for source variables so cmake_consistency_check.py
detects these files as being known to CMake.
|
|
|
|
Previously, objects and geometries were mapped between frames
using different hash tables in a way that is incompatible with
geometry instances. That is because the geometry mapping happened
without looking at the `persistent_id` of instances, which is not possible
anymore. Now, there is just one mapping that identifies the same
object at multiple points in time.
There are also two new caches for duplicated vbos and textures used for
motion blur. This data has to be duplicated, otherwise it would be freed
when another time step is evaluated. This caching existed before, but is
now a bit more explicit and works for geometry instances as well.
Differential Revision: https://developer.blender.org/D13497
|
|
This commit should suffice to make the shader API agnostic now (given that
all users of it use the GPU API).
This makes the shaders not trigger a false positive error anymore since
the binding slots are now garanteed by the backend and not changed at
after compilation.
This also bundles all uniforms into UBOs. Making them extendable without
limitations of push constants. The generated uniforms from OCIO are not
densely packed in the UBO to avoid complexity. Another approach would be to
use GPU_uniformbuf_create_from_list but this requires converting uniforms
to GPUInputs which is too complex for what it is.
Reviewed by: brecht, jbakker
Differential Revision: https://developer.blender.org/D14123
|
|
# Conflicts:
# intern/opencolorio/ocio_shader_shared.hh
|
|
This reverts commit 7f7c614ecddbcb66de0bff1657366970dede99be.
|
|
|
|
This can happen when the attribute has been optimized out by the compiler.
|
|
This commit should suffice to make the shader API agnostic now (given that
all users of it use the GPU API).
This makes the shaders not trigger a false positive error anymore since
the binding slots are now garanteed by the backend and not changed at
after compilation.
This also bundles all uniforms into UBOs. Making them extendable without
limitations of push constants. The generated uniforms from OCIO are not
densely packed in the UBO to avoid complexity. Another approach would be to
use GPU_uniformbuf_create_from_list but this requires converting uniforms
to GPUInputs which is too complex for what it is.
Reviewed by: brecht, jbakker
Differential Revision: https://developer.blender.org/D14123
|
|
This avoid potential shader recompilation and is more in line
with vulkan design.
|
|
This commit should suffice to make the shader API agnostic now (given that
all users of it use the GPU API).
This makes the shaders not trigger a false positive error anymore since
the binding slots are now garanteed by the backend and not changed at
after compilation.
This also bundles all uniforms into UBOs. Making them extendable without
limitations of push constants. The generated uniforms from OCIO are not
densely packed in the UBO to avoid complexity. Another approach would be to
use GPU_uniformbuf_create_from_list but this requires converting uniforms
to GPUInputs which is too complex for what it is.
Reviewed by: brecht, jbakker
Differential Revision: https://developer.blender.org/D14123
|
|
Pretty straight forward. Returns the texture dimensions count. This is
different from the size.
|
|
|
|
Optimized out attributes returns an invalid location `-1` resulting in
an undefined behavior shift.
|
|
|
|
|
|
The check was reversed, leading to less errors being reported.
|
|
This might have caused undersized buffer if using the wrong formats with
`GPU_texture_read()`.
|
|
Use using instead of typedef, remove redundant string init,
use "empty", address qualified auto, use nullptr.
|
|
Currently whenever gl queries are performed for the viewport, a large
1024 byte array is allocated to store the query results (256 of them).
Unfortunately, if any gizmo using a `draw_select` callback is active
(e.g. the transform gizmos), these queries (and allocations) will occur
during every mouse move event.
Change the vector to allow for up to 16 query results before making an
allocation. This provides enough space for every built-in gizmo except
Scale Cage (which needs 27 queries). It also removes unnecessary
allocations from two other related vectors used during query processing.
Differential Revision: https://developer.blender.org/D13784
|
|
|
|
Due to the freeing and re-creation of textures performed when binding
offscreen viewports, VR viewport textures would be needlessly
re-created every drawing iteration, leading to a negative impact on VR
frame rate.
This was brought to light by 6738ecb64e8b, which introduced an
additional texture clear operation on initialization and was
prohibitively costly on some systems when performed every frame.
Now, the textures for VR viewports will not be always re-created
during offscreen binding, but only when necessary using a pre-drawing
step (`wm_xr_session_surface_offscreen_ensure()`).
Reviewed By: jbakker, fclem
Differential Revision: https://developer.blender.org/D14059
|
|
|
|
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
A Bump node without a Height input is meaningless and does nothing.
As such, it is available as an old workaround that allows making Node
Group inputs that default to normal when not connected, by routing
via a no-op Bump node before doing math.
Cycles specifically recognizes this use case and either bypasses
the node, or converts it into a Geometry Normal node, but Eevee
was still evaluating it as usual. That incurred performance cost,
and also normalized the vector unlike Cycles.
This implements the same bypass logic for Eevee. Since I'm not
sure if it's possible to totally remove the node at this stage,
it emits a no-op function call to copy the input vector.
Differential Revision: https://developer.blender.org/D14045
|
|
|
|
|
|
|
|
|
|
|
|
This was caused by rB3a90f93507a344d2b6eb3ae631371348ff977047
|
|
As of now we do not allow additional infos duplication. We could in the future
but for now assert that this is not the case.
|
|
|
|
To avoid that, we simply filter using a debug group.
|
|
This is then easier to include in other modules.
|