mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #146759: Radial Tilling node crashes in the compositor
The Radial Tilling node crashes in the compositor in GPU mode. This is because the compositor does not yet support 2D vectors in shader code generation, but properly supports and expects them in the interface, which the Radial Tilling node declares. This results in a bad shader which crashes Blender. To properly fix this, we need to: - Support 2D vectors in compositor GPU material shader code generation. - Support 2D vectors in shader node GPU stack construction. - Adjust the interface of radial tilling to actually use 2D vectors. This seems risky for 5.0, so this patch temporarily drops support for the node in the compositor in 5.0. Then once 2D vectors are supported, it can be enabled again. Pull Request: https://projects.blender.org/blender/blender/pulls/147627
This commit is contained in:
parent
f7ef7eff5e
commit
5841cb21f7
4 changed files with 26 additions and 2 deletions
|
|
@ -302,7 +302,6 @@ class NODE_MT_compositor_node_vector_base(node_add_menu.NodeMenu):
|
|||
ops.value = "'VECTOR'"
|
||||
self.node_operator(layout, "ShaderNodeSeparateXYZ")
|
||||
layout.separator()
|
||||
self.node_operator(layout, "ShaderNodeRadialTiling")
|
||||
self.node_operator(layout, "ShaderNodeVectorCurve")
|
||||
self.node_operator_with_searchable_enum(context, layout, "ShaderNodeVectorMath", "operation")
|
||||
self.node_operator(layout, "ShaderNodeVectorRotate")
|
||||
|
|
|
|||
|
|
@ -38,6 +38,17 @@ bool sh_node_poll_default(const blender::bke::bNodeType * /*ntype*/,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool sh_geo_poll_default(const blender::bke::bNodeType * /*ntype*/,
|
||||
const bNodeTree *ntree,
|
||||
const char **r_disabled_hint)
|
||||
{
|
||||
if (!STR_ELEM(ntree->idname, "ShaderNodeTree", "GeometryNodeTree")) {
|
||||
*r_disabled_hint = RPT_("Not a shader or geometry node tree");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool common_poll_default(const blender::bke::bNodeType * /*ntype*/,
|
||||
const bNodeTree *ntree,
|
||||
const char **r_disabled_hint)
|
||||
|
|
@ -60,6 +71,17 @@ void sh_node_type_base(blender::bke::bNodeType *ntype,
|
|||
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;
|
||||
}
|
||||
|
||||
void sh_geo_node_type_base(blender::bke::bNodeType *ntype,
|
||||
std::string idname,
|
||||
const std::optional<int16_t> legacy_type)
|
||||
{
|
||||
blender::bke::node_type_base(*ntype, idname, legacy_type);
|
||||
|
||||
ntype->poll = sh_geo_poll_default;
|
||||
ntype->insert_link = node_insert_link_default;
|
||||
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;
|
||||
}
|
||||
|
||||
void common_node_type_base(blender::bke::bNodeType *ntype,
|
||||
std::string idname,
|
||||
const std::optional<int16_t> legacy_type)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ bool sh_node_poll_default(const blender::bke::bNodeType *ntype,
|
|||
void sh_node_type_base(blender::bke::bNodeType *ntype,
|
||||
std::string idname,
|
||||
std::optional<int16_t> legacy_type = std::nullopt);
|
||||
void sh_geo_node_type_base(blender::bke::bNodeType *ntype,
|
||||
std::string idname,
|
||||
std::optional<int16_t> legacy_type = std::nullopt);
|
||||
void common_node_type_base(blender::bke::bNodeType *ntype,
|
||||
std::string idname,
|
||||
std::optional<int16_t> legacy_type = std::nullopt);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void register_node_type_sh_radial_tiling()
|
|||
|
||||
static blender::bke::bNodeType ntype;
|
||||
|
||||
common_node_type_base(&ntype, "ShaderNodeRadialTiling");
|
||||
sh_geo_node_type_base(&ntype, "ShaderNodeRadialTiling");
|
||||
ntype.ui_name = "Radial Tiling";
|
||||
ntype.ui_description = "Transform Coordinate System for Radial Tiling";
|
||||
ntype.nclass = NODE_CLASS_OP_VECTOR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue