feat(web): support the full shader node add catalog
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

Extend the native editShaderNode ADD map, setShaderGraph allowlist and
blend-reader readback for the remaining 10 advertised node types; update
SceneIR and the catalog. Verified Noise Texture and Emission creation.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-14 07:38:30 +08:00
parent 9499664892
commit 71a8e8c95e
9 changed files with 61 additions and 19 deletions

View File

@@ -26,16 +26,16 @@ export const SHADER_NODE_CATALOG: readonly ShaderNodeCatalogEntry[] = Object.fre
{ type: "SEPARATE_COLOR", label: "Separate Color", category: "Color", keywords: ["separate", "rgb", "channel"], readbackTypes: ["SEPARATE_COLOR"] },
{ type: "MATH", label: "Math", category: "Converter", keywords: ["math", "add", "multiply"], readbackTypes: ["MATH"] },
{ type: "OUTPUT", label: "Material Output", category: "Output", keywords: ["output", "surface"], readbackTypes: ["OUTPUT"] },
{ type: "DIFFUSE", label: "Diffuse BSDF", category: "Shader", keywords: ["diffuse", "bsdf"], readbackTypes: [] },
{ type: "GLOSSY", label: "Glossy BSDF", category: "Shader", keywords: ["glossy", "specular", "bsdf"], readbackTypes: [] },
{ type: "EMISSION", label: "Emission", category: "Shader", keywords: ["emission", "light"], readbackTypes: [] },
{ type: "MIX_SHADER", label: "Mix Shader", category: "Shader", keywords: ["mix", "shader"], readbackTypes: [] },
{ type: "ADD_SHADER", label: "Add Shader", category: "Shader", keywords: ["add", "shader"], readbackTypes: [] },
{ type: "NOISE", label: "Noise Texture", category: "Texture", keywords: ["noise", "procedural"], readbackTypes: [] },
{ type: "GRADIENT", label: "Gradient Texture", category: "Texture", keywords: ["gradient", "ramp"], readbackTypes: [] },
{ type: "CHECKER", label: "Checker Texture", category: "Texture", keywords: ["checker", "pattern"], readbackTypes: [] },
{ type: "FRESNEL", label: "Fresnel", category: "Input", keywords: ["fresnel", "ior"], readbackTypes: [] },
{ type: "LAYER_WEIGHT", label: "Layer Weight", category: "Input", keywords: ["layer", "weight", "facing"], readbackTypes: [] },
{ type: "DIFFUSE", label: "Diffuse BSDF", category: "Shader", keywords: ["diffuse", "bsdf"], readbackTypes: ["DIFFUSE"] },
{ type: "GLOSSY", label: "Glossy BSDF", category: "Shader", keywords: ["glossy", "specular", "bsdf"], readbackTypes: ["GLOSSY"] },
{ type: "EMISSION", label: "Emission", category: "Shader", keywords: ["emission", "light"], readbackTypes: ["EMISSION"] },
{ type: "MIX_SHADER", label: "Mix Shader", category: "Shader", keywords: ["mix", "shader"], readbackTypes: ["MIX_SHADER"] },
{ type: "ADD_SHADER", label: "Add Shader", category: "Shader", keywords: ["add", "shader"], readbackTypes: ["ADD_SHADER"] },
{ type: "NOISE", label: "Noise Texture", category: "Texture", keywords: ["noise", "procedural"], readbackTypes: ["NOISE"] },
{ type: "GRADIENT", label: "Gradient Texture", category: "Texture", keywords: ["gradient", "ramp"], readbackTypes: ["GRADIENT"] },
{ type: "CHECKER", label: "Checker Texture", category: "Texture", keywords: ["checker", "pattern"], readbackTypes: ["CHECKER"] },
{ type: "FRESNEL", label: "Fresnel", category: "Input", keywords: ["fresnel", "ior"], readbackTypes: ["FRESNEL"] },
{ type: "LAYER_WEIGHT", label: "Layer Weight", category: "Input", keywords: ["layer", "weight", "facing"], readbackTypes: ["LAYER_WEIGHT"] },
]);
const CATALOG_BY_READBACK = new Map<string, ShaderNodeCatalogEntry>();

Binary file not shown.