Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a bug where adding a " to a property display name would cause shader compilation errors and show all nodes as broken
- Fixed a bug where the `Position` node would change coordinate spaces from `World` to `Absolute World` when shaders recompile. [1184617](https://issuetracker.unity3d.com/product/unity/issues/guid/1184617/)
- Fixed a bug where instanced shaders wouldn't compile on PS4.
- Fixed a bug where switching a Color Nodes' Mode between Default and HDR would cause the Color to be altered incorrectly.
- Fixed a bug where nodes dealing with matricies would sometimes display a preview, sometimes not.
- Optimized loading a large Shader Graph. [1209047](https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs)
- Fixed NaN issue in triplanar SG node when blend goes to 0.
Expand Down
19 changes: 7 additions & 12 deletions com.unity.shadergraph/Editor/Data/Nodes/Input/Basic/ColorNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,17 @@ public Color color
if ((value.color == m_Color.color) && (value.mode == m_Color.mode))
return;

if(value.mode != m_Color.mode)
if ((value.mode != m_Color.mode) && (value.mode == ColorMode.Default))
{
if(value.mode == ColorMode.HDR)
value.color = value.color.gamma;
else
{
float r = Mathf.Clamp(value.color.r, 0, 1);
float g = Mathf.Clamp(value.color.g, 0, 1);
float b = Mathf.Clamp(value.color.b, 0, 1);
float a = Mathf.Clamp(value.color.a, 0, 1);
value.color = new UnityEngine.Color(r, g, b, a);
}
float r = Mathf.Clamp(value.color.r, 0, 1);
float g = Mathf.Clamp(value.color.g, 0, 1);
float b = Mathf.Clamp(value.color.b, 0, 1);
float a = Mathf.Clamp(value.color.a, 0, 1);
value.color = new UnityEngine.Color(r, g, b, a);
}

m_Color = value;
Dirty(ModificationScope.Node);
Dirty(ModificationScope.Graph);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ void HandleColorProperty(PropertySheet propertySheet, ColorShaderProperty colorP
{
this._preChangeValueCallback("Change Color Mode");
colorProperty.colorMode = (ColorMode)newValue;
this._postChangeValueCallback(true);
this._postChangeValueCallback(true, ModificationScope.Graph);
},
colorProperty.colorMode,
"Mode",
Expand Down