Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 1 addition & 2 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue where users can't create multiple Boolean or Enum keywords on the blackboard. [1329021](https://issuetracker.unity3d.com/issues/shadergraph-cant-create-multiple-boolean-or-enum-keywords)
- Fixed an issue where generated property reference names could conflict with Shader Graph reserved keywords [1328762] (https://issuetracker.unity3d.com/product/unity/issues/guid/1328762/)
- Fixed a ShaderGraph issue where ObjectField focus and Node selections would both capture deletion commands [1313943].

- Fixed a bug when a node was both vertex and fragment exclusive but could still be used causing a shader compiler error [1316128].

- Fixed divide by zero warnings when using the Sample Gradient Node

## [11.0.0] - 2020-10-21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static string Unity_SampleGradientV0(
{
$precision3 color = Gradient.colors[0].rgb;
[unroll]
for (int c = 1; c < 8; c++)
for (int c = 1; c < Gradient.colorsLength; c++)
{
$precision colorPos = saturate((Time - Gradient.colors[c - 1].w) / (Gradient.colors[c].w - Gradient.colors[c - 1].w)) * step(c, Gradient.colorsLength - 1);
color = lerp(color, Gradient.colors[c].rgb, lerp(colorPos, step(0.01, colorPos), Gradient.type));
Expand All @@ -50,7 +50,7 @@ static string Unity_SampleGradientV0(
#endif
$precision alpha = Gradient.alphas[0].x;
[unroll]
for (int a = 1; a < 8; a++)
for (int a = 1; a < Gradient.alphasLength; a++)
{
$precision alphaPos = saturate((Time - Gradient.alphas[a - 1].y) / (Gradient.alphas[a].y - Gradient.alphas[a - 1].y)) * step(a, Gradient.alphasLength - 1);
alpha = lerp(alpha, Gradient.alphas[a].x, lerp(alphaPos, step(0.01, alphaPos), Gradient.type));
Expand All @@ -71,7 +71,7 @@ static string Unity_SampleGradientV1(
{
$precision3 color = Gradient.colors[0].rgb;
[unroll]
for (int c = 1; c < 8; c++)
for (int c = 1; c < Gradient.colorsLength; c++)
{
$precision colorPos = saturate((Time - Gradient.colors[c - 1].w) / (Gradient.colors[c].w - Gradient.colors[c - 1].w)) * step(c, Gradient.colorsLength - 1);
color = lerp(color, Gradient.colors[c].rgb, lerp(colorPos, step(0.01, colorPos), Gradient.type));
Expand All @@ -81,7 +81,7 @@ static string Unity_SampleGradientV1(
#endif
$precision alpha = Gradient.alphas[0].x;
[unroll]
for (int a = 1; a < 8; a++)
for (int a = 1; a < Gradient.alphasLength; a++)
{
$precision alphaPos = saturate((Time - Gradient.alphas[a - 1].y) / (Gradient.alphas[a].y - Gradient.alphas[a - 1].y)) * step(a, Gradient.alphasLength - 1);
alpha = lerp(alpha, Gradient.alphas[a].x, lerp(alphaPos, step(0.01, alphaPos), Gradient.type));
Expand Down