Skip to content

Commit ee0ede2

Browse files
[bugfix1251348] Fix for Node Search Window not showing some compatible ports when dragging to open (#3556)
* Added fix * Fix vertex stage node compatibility * Used GetEffectiveShaderStageCapability() to fix compatibility * Revert "Used GetEffectiveShaderStageCapability() to fix compatibility" This reverts commit 776626a. * Fixed vetex stage compatibility
1 parent 04a57d8 commit ee0ede2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,11 @@ public bool IsCompatibleWith(MaterialSlot otherSlot)
259259

260260
public bool IsCompatibleStageWith(MaterialSlot otherSlot)
261261
{
262-
var candidateStage = otherSlot.stageCapability;
263-
return stageCapability == ShaderStageCapability.All || candidateStage == stageCapability;
262+
var startStage = otherSlot.stageCapability;
263+
if (startStage == ShaderStageCapability.All)
264+
startStage = NodeUtils.GetEffectiveShaderStageCapability(otherSlot, true)
265+
& NodeUtils.GetEffectiveShaderStageCapability(otherSlot, false);
266+
return startStage == ShaderStageCapability.All || stageCapability == ShaderStageCapability.All || stageCapability == startStage;
264267
}
265268

266269
public string GetDefaultValue(GenerationMode generationMode, ConcretePrecision concretePrecision)

0 commit comments

Comments
 (0)