Skip to content

[VFX] Update from vfx/staging #489

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

Merged
merged 30 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
645a10e
property attributes not serialized (#253)
julienf-unity Mar 23, 2020
f0e09f2
Remove shader warnings (#261)
julienf-unity Mar 27, 2020
ba38685
Vfx/feature/filter enum (#243)
iTris666 Mar 30, 2020
c0e13e5
Remove raytracing enumerator filter as it was removed from HDRP enum
julienf-unity Mar 31, 2020
6aac856
Remove irrelevant render queues from some HDRP outputs (#263)
julienf-unity Apr 3, 2020
d64a8bd
Fixed Flipbook Texture Names
peeweek Apr 17, 2020
45ab417
Update CHANGELOG.md
Apr 20, 2020
257a4de
Merge pull request #9 from unity/vfx/fix/flipbook-asset-names
Apr 20, 2020
8c9c4b7
Merge remote-tracking branch 'srp/master' into vfx/staging
julienf-unity Apr 20, 2020
3734160
Fix exception when creating new category on new visual effect asset.
iTris666 Apr 21, 2020
6f4f572
Forward port - Dont remove suboutputs objects if it cannot be deseria…
julienf-unity Apr 22, 2020
b0c452e
Merge branch 'master' into vfx/staging
PaulDemeulenaere Apr 24, 2020
c63e6d9
Fix to graft : support for flag enum in inspector
PaulDemeulenaere Apr 29, 2020
3390036
*Update changelog
PaulDemeulenaere Apr 29, 2020
f1f7f8c
Merge pull request #11 from unity/vfx/fix/new-category
iTris666 Apr 29, 2020
4c49282
Merge pull request #13 from unity/vfx/fix/enum-flag-in-inspector
PaulDemeulenaere Apr 30, 2020
f26a487
Revert "Fix Enum Flag" (#15)
PaulDemeulenaere Apr 30, 2020
18803f2
"Fix Enum Flag" (#16)
PaulDemeulenaere Apr 30, 2020
adfdce9
Fix for Initial Event field height, (#17)
iTris666 May 4, 2020
dd47610
Merge remote-tracking branch 'srp/master' into vfx/staging
julienf-unity May 4, 2020
9b568b6
Vfx/fix colorfield height (#19)
iTris666 May 13, 2020
c0f5529
Mesh Sampling (revival) (#1)
PaulDemeulenaere May 14, 2020
b8ec5e0
Update experimental disclaimers (#367)
JordanL8 May 14, 2020
99aacf9
Merge branch 'vfx/staging' of github.com:Unity-Technologies/Graphics …
julienf-unity May 14, 2020
1405b00
[HDRP] MSAA & MotionVector (#12)
PaulDemeulenaere May 14, 2020
0779451
Allow an object slot to have null as its value (#25)
iTris666 May 14, 2020
990ee1c
Vfx/fix/prevent capacity change locked (#24)
iTris666 May 14, 2020
2ad32f1
Merge branch 'master' into vfx/staging
PaulDemeulenaere May 14, 2020
e7f360c
*Update all vfx (had to do it manually...)
PaulDemeulenaere May 14, 2020
ba1d189
Restore missing enty in hdrp changelog (bad resolve conflict from me)
PaulDemeulenaere May 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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,53 @@ public void ProcessExpressionMatrixToVector4s()

Assert.AreEqual(new Vector4(1, 0, 0, 0), reduced.Get<Vector4>());
}


[Test]
public void OuputExpression_From_Slot_Mesh_Should_Be_Invalid_Constant()
{
var source = ScriptableObject.CreateInstance<VFXInlineOperator>();
source.SetSettingValue("m_Type", (SerializableType)typeof(Mesh));
var expressionOutput = source.outputSlots[0].GetExpression();

var context = new VFXExpression.Context(VFXExpressionContextOption.ConstantFolding);
var reduced = context.Compile(expressionOutput);

Assert.IsTrue(expressionOutput.Is(VFXExpression.Flags.InvalidConstant));
}

[Test]
public void OuputExpression_From_Slot_Mesh_Should_Be_Invalid_Constant_Propagation()
{
var source = ScriptableObject.CreateInstance<VFXInlineOperator>();
source.SetSettingValue("m_Type", (SerializableType)typeof(Mesh));

var meshCount = ScriptableObject.CreateInstance<Operator.MeshVertexCount>();
meshCount.inputSlots[0].Link(source.outputSlots[0]);

var add = ScriptableObject.CreateInstance<Operator.Add>();
add.SetOperandType(0, typeof(uint));
add.SetOperandType(1, typeof(uint));
add.inputSlots[1].value = 8u;

var expressionOutputBefore = add.outputSlots[0].GetExpression();
var contextBefore = new VFXExpression.Context(VFXExpressionContextOption.ConstantFolding); //Used by runtime
var reducedBeforeLink = contextBefore.Compile(expressionOutputBefore);

bool success = add.inputSlots[0].Link(meshCount.outputSlots[0]);
Assert.IsTrue(success);

var expressionOutputAfter = add.outputSlots[0].GetExpression();
var contextAfter = new VFXExpression.Context(VFXExpressionContextOption.ConstantFolding); //Used by runtime
var reducedAfterLink = contextAfter.Compile(expressionOutputAfter);

var contextAfterCPUEvaluation = new VFXExpression.Context(VFXExpressionContextOption.CPUEvaluation | VFXExpressionContextOption.ConstantFolding); //Used by GUI
var reducedAfterLinkCPUEvaluation = contextAfterCPUEvaluation.Compile(expressionOutputAfter);

Assert.IsAssignableFrom(typeof(VFXValue<uint>), reducedBeforeLink);
Assert.IsAssignableFrom(typeof(VFXExpressionAdd), reducedAfterLink);
Assert.IsAssignableFrom(typeof(VFXValue<uint>), reducedAfterLinkCPUEvaluation);
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public void DynamicSlots()


model.SetSettingValue("slotSetting", 1);
Assert.IsTrue(model.GetInputSlot(0).property.attributes.Length == 0);
Assert.IsTrue(model.GetInputSlot(0).property.attributes.attributes.Count == 0);

model.SetSettingValue("slotSetting", 5);
Assert.IsTrue(model.GetInputSlot(0).property.attributes.Length == 1);
Assert.IsTrue(model.GetInputSlot(0).property.attributes.attributes.Count == 1);
}

[Test]
Expand Down
Loading