Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ddf5f9e
Fix Event connected directly to Output Event (revival) #154
PaulDemeulenaere Nov 9, 2020
6207965
Restore disabled 26_NonUnifomScale due to a wrong merge (need backpor…
PaulDemeulenaere Nov 12, 2020
64dc8d0
[HDRP] Fix debug view material (albedo/normal/...)
PaulDemeulenaere Nov 13, 2020
50eb3fc
Force ui update when shader might be reimported in StaticMeshOutput (…
iTris666 Nov 16, 2020
a8b81dc
Don't create VFXGraph during import callbacks (#148)
iTris666 Nov 16, 2020
88b8374
Select node on create (#166)
iTris666 Nov 20, 2020
b92a758
Dont flag dirty in vfxgraph is the model modified is a copy (#165)
iTris666 Nov 23, 2020
1aef99e
Added excludeFromTAA setting to VFX outputs
gabrieldelacruz Nov 24, 2020
197d328
Fix Custom Spawn serialization (#132)
PaulDemeulenaere Nov 30, 2020
6d8d869
Fix case 1294180 : Error feedback throwing an error while changing ca…
PaulDemeulenaere Nov 30, 2020
9df1264
Fix Preset (with exclusion) (#177)
PaulDemeulenaere Nov 30, 2020
812e474
Fix 1276602 incorrect uchar pcache import (#129)
Dec 1, 2020
73950bf
Update gradient test (#151)
gabrieldelacruz Dec 1, 2020
eedfcbd
Fix incorrect compilation condition for linux build (#184)
PaulDemeulenaere Dec 10, 2020
c8e95e0
Fix GPUEvent & SubGraph (#178)
PaulDemeulenaere Dec 15, 2020
a1c4ddf
Sample Point Cache operator (#92)
ludovic-theobald Dec 1, 2020
ef00540
Fix Case 1223747 - NaN caused by normal bending (#181)
ludovic-theobald Dec 1, 2020
369e2eb
[Subgraph] Prevent Pasting Context invalid subgraph (#191)
PaulDemeulenaere Jan 7, 2021
a424e5f
Fix Mouse Event Binder in player (#175)
PaulDemeulenaere Jan 8, 2021
21c8fa0
Vfx/docs/bugfixes (#188)
Jan 12, 2021
cbfbfb6
Update HDRP project assets
julienf-unity Jan 15, 2021
51db803
Change VisualEffect inspector "Edit" button to "New" when no asset is…
Nov 24, 2020
7f27e5f
Spawn State documentation (#195)
Jan 15, 2021
17d7abb
Added what's new page and moved blocks out one level in the table of …
Jan 15, 2021
ce22e42
backout update gradien test
julienf-unity Jan 15, 2021
d2f519e
Update ref images + deactivate test 26
julienf-unity Jan 17, 2021
87fafc1
update URP assets
julienf-unity Jan 17, 2021
cc0d5b4
Merge remote-tracking branch 'srp/10.x.x/release' into vfx/10.x.x-sta…
julienf-unity Jan 17, 2021
4ceb824
DEactivate test 32 + clean ribbon template vfx
julienf-unity Jan 17, 2021
6d68f0d
Merge branch '10.x.x/release' into vfx/10.x.x-staging
sebastienlagarde Jan 17, 2021
d3a9123
Merge branch '10.x.x/release' into vfx/10.x.x-staging
julienf-unity Jan 22, 2021
c7d8d3f
Fix 1290493 - Spaceship specific warnings (#176)
ludovic-theobald Dec 5, 2020
2f3b60c
Fix regression from #176
PaulDemeulenaere Dec 14, 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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ o.VFX_VARYING_METALLIC = metallic;
#elif HDRP_MATERIAL_TYPE_SPECULAR
#ifdef VFX_VARYING_SPECULAR
${VFXLoadParameter:{specularColor}}
o.VFX_VARYING_SPECULAR = specularColor;
o.VFX_VARYING_SPECULAR = specularColor.rgb;
#endif
#elif HDRP_MATERIAL_TYPE_TRANSLUCENT
#ifdef VFX_VARYING_THICKNESS
Expand All @@ -92,7 +92,7 @@ o.VFX_VARYING_EMISSIVESCALE = emissiveScale;
o.VFX_VARYING_EMISSIVE = attributes.color;
#elif HDRP_USE_ADDITIONAL_EMISSIVE_COLOR
${VFXLoadParameter:{emissiveColor}}
o.VFX_VARYING_EMISSIVE = emissiveColor;
o.VFX_VARYING_EMISSIVE = emissiveColor.rgb;
#endif
#endif
#if HDRP_USE_ADDITIONAL_BASE_COLOR
Expand Down
1 change: 1 addition & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix [Case 1223747](https://fogbugz.unity3d.com/f/cases/1223747/)
- Prevent pasting context within operator/block subgraph [Case 1235269](https://issuetracker.unity3d.com/product/unity/issues/guid/1235269/)
- VFXEventBinderBase throwing a null reference exception in runtime
- Fix [Case 1290493](https://fogbugz.unity3d.com/f/cases/1290493/#BugEvent.1072735759)

## [10.2.0] - 2020-10-19
### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
using System;
using System.Collections.Generic;
using UnityEngine;

namespace UnityEditor.VFX.Operator
{
[VFXInfo(category = "Math/Vector")]
class SafeNormalizationVariantProvider : VariantProvider
{
protected override sealed Dictionary<string, object[]> variants
{
get
{
return new Dictionary<string, object[]>
{
{ "safeNormalize", new object[]{true, false} }
};
}
}
}


[VFXInfo(category = "Math/Vector", variantProvider = typeof(SafeNormalizationVariantProvider))]
class Normalize : VFXOperatorNumericUniform
{
public class InputProperties
{
public Vector3 x = Vector3.one;
}

protected override sealed string operatorName { get { return "Normalize"; } }
[VFXSetting(VFXSettingAttribute.VisibleFlags.InInspector), SerializeField, Tooltip("Specifies if the operator should check if the vector to be normalized is a vero vector.")]
bool safeNormalize = false;


protected override sealed string operatorName { get {return safeNormalize ? "Safe Normalize" : "Normalize"; } }

protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputExpression)
{
return new[] { VFXOperatorUtility.Normalize(inputExpression[0]) };
if(safeNormalize)
return new[] { VFXOperatorUtility.SafeNormalize(inputExpression[0]) };
else
return new[] { VFXOperatorUtility.Normalize(inputExpression[0]) };
}

protected override sealed ValidTypeRule typeFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public static Dictionary<VFXValueType, VFXExpression> GenerateExpressionConstant
public static readonly Dictionary<VFXValueType, VFXExpression> TauExpression = GenerateExpressionConstant(2.0f * Mathf.PI);
public static readonly Dictionary<VFXValueType, VFXExpression> E_NapierConstantExpression = GenerateExpressionConstant(Mathf.Exp(1));
public static readonly Dictionary<VFXValueType, VFXExpression> EpsilonExpression = GenerateExpressionConstant(1e-5f);
public static readonly Dictionary<VFXValueType, VFXExpression> EpsilonSqrExpression = GenerateExpressionConstant(1e-10f);


public enum Base
{
Expand Down Expand Up @@ -269,7 +271,7 @@ static public VFXExpression Normalize(VFXExpression v)
static public VFXExpression SafeNormalize(VFXExpression v)
{
var sqrDist = Dot(v,v);
var condition = new VFXExpressionCondition(VFXValueType.Float, VFXCondition.Equal, VFXOperatorUtility.ZeroExpression[VFXValueType.Float], sqrDist);
var condition = new VFXExpressionCondition(VFXValueType.Float, VFXCondition.Less, sqrDist, VFXOperatorUtility.EpsilonSqrExpression[VFXValueType.Float]);
return new VFXExpressionBranch(condition, VFXOperatorUtility.ZeroExpression[v.valueType], Normalize(v));
}

Expand Down