Merge branch 'blender-v3.1-release'
This commit is contained in:
commit
34449ba9a6
|
@ -284,6 +284,7 @@ void depsgraph_tag_component(Depsgraph *graph,
|
|||
* here. */
|
||||
if (component_node == nullptr) {
|
||||
if (component_type == NodeType::ANIMATION) {
|
||||
id_node->is_cow_explicitly_tagged = true;
|
||||
depsgraph_id_tag_copy_on_write(graph, id_node, update_source);
|
||||
}
|
||||
return;
|
||||
|
@ -301,6 +302,9 @@ void depsgraph_tag_component(Depsgraph *graph,
|
|||
if (component_node->need_tag_cow_before_update()) {
|
||||
depsgraph_id_tag_copy_on_write(graph, id_node, update_source);
|
||||
}
|
||||
if (component_type == NodeType::COPY_ON_WRITE) {
|
||||
id_node->is_cow_explicitly_tagged = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* This is a tag compatibility with legacy code.
|
||||
|
@ -888,6 +892,7 @@ void DEG_ids_clear_recalc(Depsgraph *depsgraph, const bool backup)
|
|||
* correctly when there are multiple depsgraph with others still using
|
||||
* the recalc flag. */
|
||||
id_node->is_user_modified = false;
|
||||
id_node->is_cow_explicitly_tagged = false;
|
||||
deg_graph_clear_id_recalc_flags(id_node->id_cow);
|
||||
if (deg_graph->is_active) {
|
||||
deg_graph_clear_id_recalc_flags(id_node->id_orig);
|
||||
|
|
|
@ -904,7 +904,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph, const IDNode
|
|||
* modifiers.
|
||||
*
|
||||
* TODO: Investigate modes besides edit-mode. */
|
||||
if (check_datablock_expanded(id_cow)) {
|
||||
if (check_datablock_expanded(id_cow) && !id_node->is_cow_explicitly_tagged) {
|
||||
const ID_Type id_type = GS(id_orig->name);
|
||||
if (OB_DATA_SUPPORT_EDITMODE(id_type) && BKE_object_data_is_in_editmode(id_orig)) {
|
||||
/* Make sure pointers in the edit mode data are updated in the copy.
|
||||
|
|
|
@ -121,6 +121,9 @@ struct IDNode : public Node {
|
|||
/* Accumulated flag from operation. Is initialized and used during updates flush. */
|
||||
bool is_user_modified;
|
||||
|
||||
/* Copy-on-Write component has been explicitly tagged for update. */
|
||||
bool is_cow_explicitly_tagged;
|
||||
|
||||
/* Accumulate recalc flags from multiple update passes. */
|
||||
int id_cow_recalc_backup;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ set(INC
|
|||
../../../intern/glew-mx
|
||||
../../../intern/guardedalloc
|
||||
../../../intern/opensubdiv
|
||||
../../../intern/clog
|
||||
|
||||
# dna_type_offsets.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../makesdna/intern
|
||||
|
|
|
@ -54,6 +54,8 @@ struct IMAGE_Data {
|
|||
#define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1)
|
||||
#define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2)
|
||||
#define IMAGE_DRAW_FLAG_DEPTH (1 << 3)
|
||||
/** Flag to disable depth testing (used for node editor back drop drawing).*/
|
||||
#define IMAGE_DRAW_FLAG_DEPTH_ALWAYS (1 << 4)
|
||||
|
||||
/**
|
||||
* Abstract class for a drawing mode of the image engine.
|
||||
|
|
|
@ -56,6 +56,7 @@ class SpaceNodeAccessor : public AbstractSpaceAccessor {
|
|||
|
||||
void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *ibuf) override
|
||||
{
|
||||
r_shader_parameters.flags |= IMAGE_DRAW_FLAG_DEPTH_ALWAYS;
|
||||
if ((snode->flag & SNODE_USE_ALPHA) != 0) {
|
||||
/* Show RGBA */
|
||||
r_shader_parameters.flags |= IMAGE_DRAW_FLAG_SHOW_ALPHA | IMAGE_DRAW_FLAG_APPLY_ALPHA;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define IMAGE_DRAW_FLAG_APPLY_ALPHA (1 << 1)
|
||||
#define IMAGE_DRAW_FLAG_SHUFFLING (1 << 2)
|
||||
#define IMAGE_DRAW_FLAG_DEPTH (1 << 3)
|
||||
#define IMAGE_DRAW_FLAG_DEPTH_ALWAYS (1 << 4)
|
||||
|
||||
#define FAR_DISTANCE farNearDistances.x
|
||||
#define NEAR_DISTANCE farNearDistances.y
|
||||
|
@ -12,9 +13,11 @@
|
|||
void main()
|
||||
{
|
||||
ivec2 uvs_clamped = ivec2(uv_screen);
|
||||
float depth = texelFetch(depth_texture, uvs_clamped, 0).r;
|
||||
if (depth == 1.0) {
|
||||
discard;
|
||||
if ((drawFlags & IMAGE_DRAW_FLAG_DEPTH_ALWAYS) == 0) {
|
||||
float depth = texelFetch(depth_texture, uvs_clamped, 0).r;
|
||||
if (depth == 1.0) {
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
vec4 tex_color = texelFetch(imageTexture, uvs_clamped, 0);
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
|
||||
#include "draw_manager.h"
|
||||
|
||||
#include "CLG_log.h"
|
||||
|
||||
static CLG_LogRef LOG = {"draw.manager.shader"};
|
||||
|
||||
extern char datatoc_gpu_shader_2D_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_3D_vert_glsl[];
|
||||
extern char datatoc_gpu_shader_depth_only_frag_glsl[];
|
||||
|
@ -616,11 +620,10 @@ static uint32_t drw_shader_dependencies_get(const DRWShaderLibrary *lib, const c
|
|||
}
|
||||
dbg_name[i + 1] = '\0';
|
||||
|
||||
printf(
|
||||
"Error: Dependency not found: %s\n"
|
||||
"This might be due to bad lib ordering.\n",
|
||||
dbg_name);
|
||||
BLI_assert(0);
|
||||
CLOG_WARN(&LOG,
|
||||
"Error: Dependency not found: %s\n"
|
||||
"This might be due to bad lib ordering or overriding a builtin shader.\n",
|
||||
dbg_name);
|
||||
}
|
||||
else {
|
||||
deps |= 1u << (uint32_t)dep;
|
||||
|
|
Loading…
Reference in New Issue