Skip to content

Commit 83ad751

Browse files
ludovic-theobaldGitHub Enterprise
authored andcommitted
Fix Case 1223747 - NaN caused by normal bending (#181)
* Update Pass.template * Update CHANGELOG.md
1 parent 8b44f3b commit 83ad751

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1818
- Unexpected exception while trying to display capacity warning [Case 1294180](https://issuetracker.unity3d.com/product/unity/issues/guid/1294180/)
1919
- Exclude Operator, Context, Block and Subgraph from Preset [Case 1232309](https://issuetracker.unity3d.com/product/unity/issues/guid/1232309/)
2020
- Fix [Case 1212002](https://fogbugz.unity3d.com/f/cases/1212002/)
21+
- Fix [Case 1223747](https://fogbugz.unity3d.com/f/cases/1223747/)
2122

2223
## [10.2.0] - 2020-10-19
2324
### Added

com.unity.visualeffectgraph/Shaders/ParticlePlanarPrimitives/Pass.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ float3 tangentWS = i.VFX_VARYING_TANGENT;
2424
float3 bitangentWS = cross(i.VFX_VARYING_TANGENT,i.VFX_VARYING_NORMAL);
2525

2626
#if defined(VFX_VARYING_BENTFACTORS) && USE_NORMAL_BENDING
27-
float3 bentFactors = float3(i.VFX_VARYING_BENTFACTORS.xy,sqrt(1.0f - dot(i.VFX_VARYING_BENTFACTORS,i.VFX_VARYING_BENTFACTORS)));
27+
float3 bentFactors = float3(i.VFX_VARYING_BENTFACTORS.xy,sqrt(max(0.0f,1.0f - dot(i.VFX_VARYING_BENTFACTORS,i.VFX_VARYING_BENTFACTORS))));
2828
normalWS = tangentWS * bentFactors.x + bitangentWS * bentFactors.y + normalWS * bentFactors.z;
2929
tangentWS = normalize(cross(normalWS,bitangentWS));
3030
bitangentWS = cross(tangentWS,normalWS);

0 commit comments

Comments
 (0)