Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions VL.Stride.Runtime/src/Rendering/Effects/EffectShaderNodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down