diff --git a/VL.Stride.Runtime/src/Rendering/Effects/EffectShaderNodes.cs b/VL.Stride.Runtime/src/Rendering/Effects/EffectShaderNodes.cs index 99438a94..5dd5b3c2 100644 --- a/VL.Stride.Runtime/src/Rendering/Effects/EffectShaderNodes.cs +++ b/VL.Stride.Runtime/src/Rendering/Effects/EffectShaderNodes.cs @@ -236,6 +236,14 @@ private static ParameterPinDescription CreatePinDescription(ParameterKey key, in if (isOptionalOverride.HasValue) isOptional |= isOptionalOverride.Value; + // Ensure unknown shader types always get a valid default value for the pin + if (typeInPatch == typeof(IComputeNode) && runtimeDefaultValue == null && key.PropertyType == typeof(Stride.Shaders.ShaderSource)) + { + // Use the variable name as the type name for the fallback + var typeName = key.GetVariableName(); + runtimeDefaultValue = new VL.Stride.Rendering.CompositionInput.ShaderSourceComputeNode(new Stride.Shaders.ShaderClassSource(typeName)); + } + return new ParameterPinDescription(usedNames, key, count, compilationDefaultValue: compilationDefaultValue, name: name,