Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sg/inline color node hdr to default fix #91

Merged
merged 25 commits into from
May 6, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cd4b320
fix for https://fogbugz.unity3d.com/f/cases/1184248/
zadi0648 Jan 17, 2020
fa5f6af
fix for https://fogbugz.unity3d.com/f/cases/1185260/
zadi0648 Jan 22, 2020
0d64c6f
removed unnecessary float4 + ColorNode parity
zadi0648 Feb 13, 2020
ec992f1
Merge branch 'master' into sg/color-property-to-match-inline
zadi0648 Mar 5, 2020
95cbc86
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 6, 2020
890bb7d
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 9, 2020
795d4ea
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 13, 2020
bb13c92
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 16, 2020
7fbdf82
fix to shader graph files (needed a save)
zadi0648 Mar 17, 2020
d5f2e4b
fixing hdrp shader graphs
zadi0648 Mar 17, 2020
5c8fde1
file cleanup
zadi0648 Mar 17, 2020
9f239fa
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 17, 2020
93c8a44
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 17, 2020
baaa030
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 23, 2020
92521ee
kept the clamping
zadi0648 Mar 23, 2020
9367f80
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 23, 2020
7f0154c
modification scope fix
zadi0648 Mar 23, 2020
109d278
Merge branch 'master' of https://github.com/Unity-Technologies/Script…
zadi0648 Mar 25, 2020
d35d501
fixed changelog error
zadi0648 Mar 25, 2020
053e176
fixed changelog error
zadi0648 Mar 25, 2020
856bf9f
Merge branch 'master' into sg/inline-color-node-hdr-to-default-fix
zadi0648 Apr 1, 2020
74e4ebb
Merge branch 'master' into sg/inline-color-node-hdr-to-default-fix
marctem Apr 9, 2020
108ac3b
Merge remote-tracking branch 'origin/master' into sg/inline-color-nod…
marctem Apr 24, 2020
6e77485
Merge remote-tracking branch 'origin/master' into sg/inline-color-nod…
marctem May 5, 2020
7801df8
Merge branch 'master' into sg/inline-color-node-hdr-to-default-fix
marctem May 5, 2020
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
Prev Previous commit
Next Next commit
file cleanup
  • Loading branch information
zadi0648 committed Mar 17, 2020
commit 5c8fde1ba1ac5d3bdd9d9b24dcb3ba8724afb290
54 changes: 27 additions & 27 deletions com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Guid propertyGuid
{
get { return m_PropertyGuid; }
set
{
{
if (m_PropertyGuid == value)
return;

Expand All @@ -35,7 +35,7 @@ public Guid propertyGuid

AddOutputSlot(property);
Dirty(ModificationScope.Topological);
}
}
}
public override bool canSetPrecision => false;

Expand All @@ -59,20 +59,20 @@ void AddOutputSlot(AbstractShaderProperty property)
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
break;
case ConcreteSlotValueType.Vector1:
AddSlot(new Vector1MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, 0));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Vector1MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, 0));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Vector2:
AddSlot(new Vector2MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Vector2MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Vector3:
AddSlot(new Vector3MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Vector3MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Vector4:
AddSlot(new Vector4MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Vector4MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output, Vector4.zero));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Matrix2:
AddSlot(new Matrix2MaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
Expand All @@ -87,28 +87,28 @@ void AddOutputSlot(AbstractShaderProperty property)
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
break;
case ConcreteSlotValueType.Texture2D:
AddSlot(new Texture2DMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Texture2DMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Texture2DArray:
AddSlot(new Texture2DArrayMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Texture2DArrayMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Texture3D:
AddSlot(new Texture3DMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
AddSlot(new Texture3DMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] {OutputSlotId});
break;
case ConcreteSlotValueType.Cubemap:
AddSlot(new CubemapMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
AddSlot(new CubemapMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
break;
case ConcreteSlotValueType.SamplerState:
AddSlot(new SamplerStateMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
AddSlot(new SamplerStateMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
break;
case ConcreteSlotValueType.Gradient:
AddSlot(new GradientMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
AddSlot(new GradientMaterialSlot(OutputSlotId, property.displayName, "Out", SlotType.Output));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
break;
default:
throw new ArgumentOutOfRangeException();
Expand Down Expand Up @@ -165,7 +165,7 @@ public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMo
public override string GetVariableNameForSlot(int slotId)
{
var property = owner.properties.FirstOrDefault(x => x.guid == propertyGuid);
if (property == null)
if (property == null)
throw new NullReferenceException();

if (!(property is Texture2DShaderProperty) &&
Expand Down Expand Up @@ -201,14 +201,14 @@ public override bool ValidateConcretePrecision(ref string errorMessage)
concretePrecision = precision.ToConcrete();
else
concretePrecision = owner.concretePrecision;
return false;
}
return false;
}

public override void OnBeforeSerialize()
{
{
base.OnBeforeSerialize();
m_PropertyGuidSerialized = m_PropertyGuid.ToString();
}
}

public override void OnAfterDeserialize()
{
Expand Down