Skip to content

Commit

Permalink
[Stride] Changes the pin types of ColorMap, ColorIn and `ComposeD…
Browse files Browse the repository at this point in the history
…rawShader` to `GPU<RGBA>`

This commit is a breaking change. It probably requires more thought on how it affects other nodes and we need to ensure that conversion nodes from/to Vector4 & RGBA are present.

Consider this commit WIP.
  • Loading branch information
azeno committed Jul 4, 2023
1 parent 7eb40c1 commit 8cd357b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
30 changes: 5 additions & 25 deletions VL.Stride.Runtime/VL.Stride.Rendering.ShaderFX.vl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns:p="property" xmlns:r="reflection" Id="IeOwK5mcmYGQCVIub1SUlp" LanguageVersion="2022.5.0-0778-g41d7625912" Version="0.128">
<Document xmlns:p="property" xmlns:r="reflection" Id="IeOwK5mcmYGQCVIub1SUlp" LanguageVersion="2023.5.3-0043-g9a167bc1d8" Version="0.128">
<NugetDependency Id="QNDaxjZxapFM8KPBDLuO6H" Location="VL.CoreLib" Version="2021.4.12-1361-g53776bfdff" />
<Patch Id="G28kmfwtWsRPWb67PHzP5Y">
<Canvas Id="TtPf6YeHIWxLlrjYVAmnpJ" DefaultCategory="Stride" CanvasType="FullCategory">
Expand Down Expand Up @@ -8122,7 +8122,7 @@
<Pin Id="VsGGGQcwtkjOFfRdNBkUPN" Name="Constant Buffer Name" Kind="InputPin" />
<Pin Id="DArbXfK5GUZLcU1Gecfxhs" Name="Output" Kind="StateOutputPin" />
</Node>
<Node Bounds="359,420,46,19" Id="AFL4bONCNBRLiNHJasMZUL">
<Node Bounds="359,420,83,19" Id="AFL4bONCNBRLiNHJasMZUL">
<p:NodeReference LastCategoryFullName="VL.Stride.Shaders.ShaderFX.ShaderFXUtils" LastDependency="VL.Stride.Runtime.dll">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<PinReference Kind="InputPin" Name="Var Name" />
Expand Down Expand Up @@ -8184,15 +8184,6 @@
<Pin Id="Gn8GNMf38WNN643fxU5QyF" Name="Value" Kind="InputPin" />
<Pin Id="RPnBpTc2XSfQQapjpU8Bpo" Name="Output" Kind="StateOutputPin" />
</Node>
<Node Bounds="672,687,63,26" Id="VZumbqyAHrjQIIDFmqhApN">
<p:NodeReference LastCategoryFullName="Color.RGBA" LastDependency="VL.CoreLib.vl">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<Choice Kind="OperationCallFlag" Name="ToVector4" />
<CategoryReference Kind="ColorRGBAType" Name="RGBA" NeedsToBeDirectParent="true" />
</p:NodeReference>
<Pin Id="RP9ifDloEDOMDN0DmPGDBc" Name="Input" Kind="StateInputPin" />
<Pin Id="OfVTfoQ4xQkM2eCMvwxN1V" Name="Result" Kind="OutputPin" />
</Node>
<Node Bounds="660,594,92,80" Id="FIfFFZUBvLLPkZ29LqcShl">
<p:NodeReference LastCategoryFullName="Primitive" LastDependency="Builtin">
<Choice Kind="StatefulRegion" Name="Region (Stateful)" Fixed="true" />
Expand Down Expand Up @@ -8263,12 +8254,10 @@
<Link Id="BICRgZ83gzKQSPeZbsLGRi" Ids="Pm73WxejvL0O01SL1VVRg8,VsGGGQcwtkjOFfRdNBkUPN" />
<Link Id="LVGD0e745PVMItSDJ8eWey" Ids="E3uf8GrN1BsNelTZRcGj0G,Pm73WxejvL0O01SL1VVRg8" />
<Link Id="IPuSZ4Lyf7hOFEt9nJo9nu" Ids="BWf7CV9D8ynOttCBgnu0km,E3uf8GrN1BsNelTZRcGj0G" IsHidden="true" />
<Link Id="Hfu1UMzzWJwP0k8i02Zu7R" Ids="OfVTfoQ4xQkM2eCMvwxN1V,Gn8GNMf38WNN643fxU5QyF" />
<Link Id="IQyG5ktC1QNQTqn8m6mixz" Ids="OaCHojVXykQMiY2wpQ9ro7,DECg6eWv9n9LHeGpZLuncH" />
<Link Id="AuOI5qSBUL2NpcRg4AssgL" Ids="Aar5wW9UqsCPGrP7A74vsS,Gbda1Fr3hEzPcCX00mPM4P" IsFeedback="true" />
<Link Id="KMp0hDoWV2qNJy5rgq5lfR" Ids="Aar5wW9UqsCPGrP7A74vsS,D3LmZtun1RNLjmWJd1Yky2" />
<Link Id="OEQXhfSA3iwNx3XcW0aAeA" Ids="AxLZtWGvQAgOdScascraAm,Gbda1Fr3hEzPcCX00mPM4P" />
<Link Id="FAAygN9Q8K2L7T2ZmEiCRb" Ids="Gbda1Fr3hEzPcCX00mPM4P,RP9ifDloEDOMDN0DmPGDBc" />
<Link Id="LzQBVDouF0lMtaO1wkJXif" Ids="F4VRYVk5jOGMnVo2oMr8vq,FvoWliEUtMEL0p0C030EiZ" IsHidden="true" />
<Link Id="MrC1mJq9IS7NxboVy6Ah2e" Ids="FvoWliEUtMEL0p0C030EiZ,Rg4Ui6YhUd0MFMPsfcsU2u" />
<Link Id="Kwn86Rbj7irMJXogWlJEmD" Ids="Rg4Ui6YhUd0MFMPsfcsU2u,IWYtkhuP5rxPneOyEDCzLN" />
Expand Down Expand Up @@ -8302,6 +8291,7 @@
</Pin>
<Pin Id="Mlw1ghvX2YLQJ8I4r2c4uL" Name="Is Normal" Kind="InputPin" Summary="Set to true if the color is used as normal map. Avoids sRGB conversion." />
</Patch>
<Link Id="G5fxpb71c7pMNPx7YvBqbt" Ids="Gbda1Fr3hEzPcCX00mPM4P,Gn8GNMf38WNN643fxU5QyF" />
</Patch>
</Node>
<Canvas Id="KylK2bNtDj2LkxfN7vzaaX" Name="Functions" Position="970,934">
Expand Down Expand Up @@ -14963,7 +14953,7 @@
<Pin Id="CxPpNkI6aH3LaKvRwGSVmL" Name="Constant Buffer Name" Kind="InputPin" />
<Pin Id="O8woFeqy0QCP3gtdM9tPEE" Name="Output" Kind="StateOutputPin" />
</Node>
<Node Bounds="359,420,46,19" Id="VjUQEUr32YsPW2mW2KKw6C">
<Node Bounds="359,420,83,19" Id="VjUQEUr32YsPW2mW2KKw6C">
<p:NodeReference LastCategoryFullName="VL.Stride.Shaders.ShaderFX.ShaderFXUtils" LastDependency="VL.Stride.Runtime.dll">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<PinReference Kind="InputPin" Name="Var Name" />
Expand Down Expand Up @@ -15032,15 +15022,6 @@
<Pin Id="VbOYiaZpOndOlTt9QbcRPT" Name="Input" Kind="InputPin" />
<Pin Id="K5VpeYhsXuaNR9ZySKPnPd" Name="Output" Kind="OutputPin" />
</Node>
<Node Bounds="670,604,63,26" Id="AbCuRNH1YSmQCUXepfIAGw">
<p:NodeReference LastCategoryFullName="Color.RGBA" LastDependency="VL.CoreLib.vl">
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
<Choice Kind="OperationCallFlag" Name="ToVector4" />
<CategoryReference Kind="ColorRGBAType" Name="RGBA" NeedsToBeDirectParent="true" />
</p:NodeReference>
<Pin Id="Tu1wK0LBLWgNSfc1OVwz4m" Name="Input" Kind="StateInputPin" />
<Pin Id="KksIKf5XYm1LD3Ms4NJCRM" Name="Result" Kind="OutputPin" />
</Node>
<Node Bounds="658,502,92,80" Id="MWarD5lB5tdLHIY5w02Ckt">
<p:NodeReference LastCategoryFullName="Primitive" LastDependency="Builtin">
<Choice Kind="StatefulRegion" Name="Region (Stateful)" Fixed="true" />
Expand Down Expand Up @@ -15079,14 +15060,12 @@
<Link Id="RW7gIxaPm4fN33ZvLbN4Ro" Ids="P4GrVcrWydyLlVzrWYWjyw,CxPpNkI6aH3LaKvRwGSVmL" />
<Link Id="NnLNz1LhP83PGTuZq3RIlw" Ids="M8Hz8dPqs6ON76e2wcXOz5,P4GrVcrWydyLlVzrWYWjyw" />
<Link Id="OhjwC5HrOntPvPbjcf5BhZ" Ids="J2Pgrdq90wBOwWmrJeRh6X,M8Hz8dPqs6ON76e2wcXOz5" IsHidden="true" />
<Link Id="Qfg4egiTp8XQaeSqcCC8K0" Ids="KksIKf5XYm1LD3Ms4NJCRM,AEG9XWqqGq0PkNONNNZ2PO" />
<Link Id="AUl8gtQND2pMqm21QgQRDc" Ids="CY4oBYtrhEWM3wi5XODJrF,ArSdLoeF1B6MudCiMEjYiV" />
<Link Id="D2sYd3B58LJNRWt9SgOBg0" Ids="ArSdLoeF1B6MudCiMEjYiV,VbOYiaZpOndOlTt9QbcRPT" />
<Link Id="GtQBWgKAzgYLSQBwh1X6Sh" Ids="SmGNDyl5uxoP8MtdSpdEUB,P2rX1nqdr56NU8LIGQZM9J" IsFeedback="true" />
<Link Id="QTIjaH1NvKcOKubc1as0hj" Ids="K5VpeYhsXuaNR9ZySKPnPd,SmGNDyl5uxoP8MtdSpdEUB" />
<Link Id="STNzn5VPubQMwVvxfoMFOJ" Ids="SmGNDyl5uxoP8MtdSpdEUB,Egv5CEzKUS1PYlQ8r0Un5C" />
<Link Id="Rrueq5V2zzoPR6yMAwgp4u" Ids="Bl8xqPcYozwOUxXnB76XMn,P2rX1nqdr56NU8LIGQZM9J" />
<Link Id="HLVyJwMUYGML1upO9ZQ5SV" Ids="P2rX1nqdr56NU8LIGQZM9J,Tu1wK0LBLWgNSfc1OVwz4m" />
<Link Id="NczqMBjmHFdOonXymVludI" Ids="VK9puscy70UQHyN1sdRvA2,Q5HVHglg59VPvTPXJXxgAC" IsHidden="true" />
<Link Id="Vc7JRhbYmyKPsjkujaHxnQ" Ids="Q5HVHglg59VPvTPXJXxgAC,MKFihE3yRqxQF4QXHasx7x" />
<Link Id="LqzCJE8KXsSLeMELKLU4XU" Ids="MKFihE3yRqxQF4QXHasx7x,HHKiB0dKzydOiCCHwXBzuP" />
Expand All @@ -15110,6 +15089,7 @@
</p:TypeAnnotation>
</Pin>
</Patch>
<Link Id="HKFe6vr7M0OQdcjt8yR4ty" Ids="P2rX1nqdr56NU8LIGQZM9J,AEG9XWqqGq0PkNONNNZ2PO" />
</Patch>
</Node>
</Canvas>
Expand Down
2 changes: 1 addition & 1 deletion VL.Stride.Runtime/src/Shaders/ShaderGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static TextureFXEffect ComposeShader(GraphicsDevice graphicsDevice, IComp
return effectImageShader;
}

public static DynamicEffectInstance ComposeDrawShader(GraphicsDevice graphicsDevice, IComputeValue<Vector4> vertexRoot, IComputeValue<Vector4> pixelRoot)
public static DynamicEffectInstance ComposeDrawShader(GraphicsDevice graphicsDevice, IComputeValue<Vector4> vertexRoot, IComputeValue<Color4> pixelRoot)
{
var effectImageShader = new DynamicDrawEffectInstance("ShaderFXGraphEffect");

Expand Down

0 comments on commit 8cd357b

Please sign in to comment.