Skip to content

Commit 3b69595

Browse files
julienf-unityLewis JordanJordanL8ludovic-theobaldgabrieldelacruz
authored
[2021.1][VFX] staging backports (#3645)
* Vfx/docs/bugfixes (#188) * Resolved 1272101 * Resolved 1264943 * Removed uncertainty around 'should' * Resolved 1298031 * Added snippets file * Resolved 1292127 * Fixed typos * Resolved 1295296 Co-authored-by: Lewis Jordan <[email protected]> * Texture2D Array Layout for Flipbooks * Motion Vector generation improvements (#194) * Added VFX_FEATURE_MOTION_VECTORS_VERTS mode to store motion vector info per vertex Optimized default motion vectors mode to store 4x3 matrix instead of 4x4. Added mode to store each previous vertex position for quads, triangles, lines and points. Refactor of motion vector defines. * Motion vectors support in lines and points * Resize buffer according to the element size * fix points and lines when not using the optimization * Fix motion vectors for lines * Changes suggested in review - Removed misplaced comment in VFXLineStripOutput - Access VFXLineOutput useTargetOffset through GetSettingValue in VFXOutputUpdate - Moved previous frame position calculation to the end of OutputUpdate compute - Added 4 bytes per particle for last frame index in elementToVFXBufferMotionVector buffer - Added noperspective when using VFX_FEATURE_MOTION_VECTORS_VERTS, through VFX_FEATURE_MOTION_VECTORS_INTERPOLATION define. - Fixed order of verts in lineSW particles. * Missing define rename in ParticleMeshes/PassForward.template * Improved condition for discarding due to not enough indirect buffers * Missing renaming of WRITE_MOTION_VECTOR_IN_FORWARD for particle lit meshes * Added what's new page and moved blocks out one level in the table of … * Spawn State documentation (#195) * Correct Sign operator node output for float when input is 0.0f * changed sky, emission scale, and updated references (#203) * Allow remaking an existing link. (#146) * ShaderGraph loosing reference while updating (sync with 7.x.x) (#185) * Use explicit GetOrRefreshShaderGraphObject & always lazy init the shadeGraph access. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/VFXGraph/Outputs/VFXAbstractParticleHDRPLitOutput.cs # com.unity.visualeffectgraph/Editor/Models/Contexts/Implementations/VFXMeshOutput.cs # com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs # com.unity.visualeffectgraph/Editor/ShaderGraph/VFXShaderGraphParticleOutput.cs # com.unity.visualeffectgraph/Editor/ShaderGraph/VFXShaderGraphPostProcessor.cs * Fix shaderGraph not listed in VFXModel This is actually an issue in VFXModel.GetSettings, we don't have any cases like this where the parent value is private. * Update changelog.md Same entry than #2873 * Removing changelog entry The actual fix was already there, this code is only a synchronisation with 7.x.x & prior version. * Fix ordering for "+" button in blackboard (#197) * [Fix Case 1221557] Checkbox Age Particles consistency (#202) * Fix case 1309174 - Fix compute culling compilation in URP (#210) * [pCache] Fix minor UX issues (#207) * [VCS] Handle correctly locked asset (#193) * Fix menu item The `//` was causing an untracked issue * [BRP] Fix Shader Compilation (#216) * Sphere and cube outputs as experimental * Add castShadows as additionalMappings in VFXStaticMeshOutput (#217) * Added information about compute shaders and ssbos (#222) * Added information about compute shaders and ssbos * Added recommendation to use Vulkan over OpenGL ES * Removed 'two' * Added entry about vfx graph not being out of preview for mobile platforms Co-authored-by: Lewis Jordan <[email protected]> * [Orient] 'Look At Position' particle disappearance (#101) * Expensive fix Computes two cross products to avoid the case when one of them is zero. Is it faster than branching to check ? Is this edge case worth the additional cost ? * More explicit approach/similar instruction cost + LookAtLine * Update Orient.cs * Handles edge case when cross(axis1, axis2) = (0,0,0) for all Orient variants * Small mistake in the exception message * Factorize SafeNormalizedCross * Update changelog * [Fix] PropertyBinder : Reset & Undo (#212) * Fix missing record object for proper undo/redo & reset * *Update changelog.md * Fix issue https://favro.com/organization/c564ede4ed3337f7b17986b6/1973edb4634ba00a90689144?card=Uni-160638 * Avoid VFXPropertyBinder to be added twice * Fix incorrect reference after copy past * Fix RemoveComponent clearing property binder first * Handle Copy/Past \o/ * Let the LateUpdate without any editor code & use Update (avoid the one frame of latency for inspector) * Remove useless recompute of GetComponents every frame, and use Reload (safer) * Remove dead code * *Add new entry in changelog (side improvement/fix) * *Update comment * [Fix] Null Ref Exception due to IsAssetEditable (#221) * Resource can be null on a block inspector while we are removing it Use safe check of resource before IsAssetEditable * *Update changelog * Fix issue https://github.cds.internal.unity3d.com/unity/vfx-graphics/pull/221#discussion_r113060 * Fix ProcessOperatorSign test Related to this PR : https://github.cds.internal.unity3d.com/unity/vfx-graphics/pull/190 & this change 1d6e19d * Update HDRP VFX * Fix formatting * update URP assets * Clean simple ribbon * Add missing metas * Disable motion vector per vertex optimization (#214) Temporarily disable motion vector per vertex optimization. Small refactor for vertex count calculation Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: Ludovic Theobald <[email protected]> Co-authored-by: Gabriel de la Cruz <[email protected]> Co-authored-by: Tristan Genevet <[email protected]> Co-authored-by: Paul Demeulenaere <[email protected]>
1 parent 4e16d16 commit 3b69595

File tree

327 files changed

+11557
-538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+11557
-538
lines changed

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/CopyPasteTest.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ MonoBehaviour:
619619
frustumCulling: 0
620620
castShadows: 0
621621
useExposureWeight: 0
622+
flipbookLayout: 0
622623
shaderGraph: {fileID: 0}
623624
primitiveType: 1
624625
useGeometryShader: 0

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXExpressionMathTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ public void ProcessExpressionSign()
237237
var a = -1.5f;
238238
var b = 0.0f;
239239
var c = 0.2f;
240-
var resultA = Mathf.Sign(a);
241-
var resultB = Mathf.Sign(b);
242-
var resultC = Mathf.Sign(c);
240+
var resultA = (a < 0.0f) ? -1.0f : (a > 0.0f) ? 1.0f : 0.0f;
241+
var resultB = (b < 0.0f) ? -1.0f : (b > 0.0f) ? 1.0f : 0.0f;
242+
var resultC = (c < 0.0f) ? -1.0f : (c > 0.0f) ? 1.0f : 0.0f;
243243

244244
var value_a = new VFXValue<float>(a);
245245
var value_b = new VFXValue<float>(b);

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXOperatorUtilityTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public void ProcessOperatorModuloFloat()
296296
[Test]
297297
public void ProcessOperatorSign([ValueSource("ProcessOperatorAbs_a")] float a)
298298
{
299-
var r = Mathf.Sign(a);
299+
var r = (a < 0.0f) ? -1.0f : (a > 0.0f) ? 1.0f : 0.0f;
300300
var value_a = new VFXValue<float>(a);
301301

302302
var expression = new VFXExpressionSign(value_a);

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/05_MotionVectors.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,6 +3201,7 @@ MonoBehaviour:
32013201
frustumCulling: 0
32023202
castShadows: 0
32033203
useExposureWeight: 0
3204+
flipbookLayout: 0
32043205
--- !u!114 &114904363320238742
32053206
MonoBehaviour:
32063207
m_ObjectHideFlags: 1

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/06_LineOutput.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,7 @@ MonoBehaviour:
24342434
frustumCulling: 0
24352435
castShadows: 0
24362436
useExposureWeight: 0
2437+
flipbookLayout: 0
24372438
useTargetOffset: 1
24382439
useNativeLines: 0
24392440
--- !u!114 &114978967300245268

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/07_UnityLogo.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,6 +2853,7 @@ MonoBehaviour:
28532853
frustumCulling: 0
28542854
castShadows: 0
28552855
useExposureWeight: 0
2856+
flipbookLayout: 0
28562857
shaderGraph: {fileID: 0}
28572858
primitiveType: 1
28582859
useGeometryShader: 0

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/08_Shadows.vfx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ MonoBehaviour:
294294
frustumCulling: 0
295295
castShadows: 1
296296
useExposureWeight: 0
297+
flipbookLayout: 0
297298
--- !u!114 &114149745243873572
298299
MonoBehaviour:
299300
m_ObjectHideFlags: 1
@@ -885,6 +886,7 @@ MonoBehaviour:
885886
frustumCulling: 0
886887
castShadows: 1
887888
useExposureWeight: 0
889+
flipbookLayout: 0
888890
shaderGraph: {fileID: 0}
889891
MeshCount: 1
890892
lod: 0
@@ -1143,6 +1145,7 @@ MonoBehaviour:
11431145
frustumCulling: 0
11441146
castShadows: 1
11451147
useExposureWeight: 0
1148+
flipbookLayout: 0
11461149
useTargetOffset: 1
11471150
useNativeLines: 0
11481151
--- !u!114 &114447498594171424
@@ -2207,6 +2210,7 @@ MonoBehaviour:
22072210
frustumCulling: 0
22082211
castShadows: 1
22092212
useExposureWeight: 0
2213+
flipbookLayout: 0
22102214
shaderGraph: {fileID: 0}
22112215
primitiveType: 1
22122216
useGeometryShader: 0
@@ -6087,6 +6091,7 @@ MonoBehaviour:
60876091
frustumCulling: 0
60886092
castShadows: 1
60896093
useExposureWeight: 0
6094+
flipbookLayout: 0
60906095
shaderGraph: {fileID: 0}
60916096
MeshCount: 1
60926097
lod: 0

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/08_Shadows_Alpha_Clipping.vfx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ MonoBehaviour:
571571
frustumCulling: 0
572572
castShadows: 1
573573
useExposureWeight: 0
574+
flipbookLayout: 0
574575
shaderGraph: {fileID: 0}
575576
primitiveType: 1
576577
useGeometryShader: 0
@@ -1214,6 +1215,7 @@ MonoBehaviour:
12141215
frustumCulling: 0
12151216
castShadows: 1
12161217
useExposureWeight: 0
1218+
flipbookLayout: 0
12171219
shaderGraph: {fileID: 0}
12181220
primitiveType: 1
12191221
useGeometryShader: 0
@@ -1716,6 +1718,7 @@ MonoBehaviour:
17161718
frustumCulling: 0
17171719
castShadows: 1
17181720
useExposureWeight: 0
1721+
flipbookLayout: 0
17191722
shaderGraph: {fileID: 0}
17201723
primitiveType: 1
17211724
useGeometryShader: 0
@@ -2021,6 +2024,7 @@ MonoBehaviour:
20212024
frustumCulling: 0
20222025
castShadows: 1
20232026
useExposureWeight: 0
2027+
flipbookLayout: 0
20242028
shaderGraph: {fileID: 0}
20252029
primitiveType: 1
20262030
useGeometryShader: 0
@@ -2796,6 +2800,7 @@ MonoBehaviour:
27962800
frustumCulling: 0
27972801
castShadows: 1
27982802
useExposureWeight: 0
2803+
flipbookLayout: 0
27992804
shaderGraph: {fileID: -5475051401550479605, guid: 75dc0b4ccd731aa4dbccf92567e457c0,
28002805
type: 3}
28012806
primitiveType: 1
@@ -3068,6 +3073,7 @@ MonoBehaviour:
30683073
frustumCulling: 0
30693074
castShadows: 1
30703075
useExposureWeight: 0
3076+
flipbookLayout: 0
30713077
shaderGraph: {fileID: -5475051401550479605, guid: 75dc0b4ccd731aa4dbccf92567e457c0,
30723078
type: 3}
30733079
primitiveType: 1
@@ -3340,6 +3346,7 @@ MonoBehaviour:
33403346
frustumCulling: 0
33413347
castShadows: 1
33423348
useExposureWeight: 0
3349+
flipbookLayout: 0
33433350
shaderGraph: {fileID: -5475051401550479605, guid: 75dc0b4ccd731aa4dbccf92567e457c0,
33443351
type: 3}
33453352
primitiveType: 1
@@ -3612,6 +3619,7 @@ MonoBehaviour:
36123619
frustumCulling: 0
36133620
castShadows: 1
36143621
useExposureWeight: 0
3622+
flipbookLayout: 0
36153623
shaderGraph: {fileID: -5475051401550479605, guid: 75dc0b4ccd731aa4dbccf92567e457c0,
36163624
type: 3}
36173625
primitiveType: 1
@@ -4300,6 +4308,7 @@ MonoBehaviour:
43004308
frustumCulling: 0
43014309
castShadows: 1
43024310
useExposureWeight: 0
4311+
flipbookLayout: 0
43034312
shaderGraph: {fileID: -5475051401550479605, guid: 8ef26182c95350844afe8c1f9e157db1,
43044313
type: 3}
43054314
primitiveType: 1
@@ -4641,6 +4650,7 @@ MonoBehaviour:
46414650
frustumCulling: 0
46424651
castShadows: 1
46434652
useExposureWeight: 0
4653+
flipbookLayout: 0
46444654
shaderGraph: {fileID: -5475051401550479605, guid: 8ef26182c95350844afe8c1f9e157db1,
46454655
type: 3}
46464656
primitiveType: 1
@@ -4982,6 +4992,7 @@ MonoBehaviour:
49824992
frustumCulling: 0
49834993
castShadows: 1
49844994
useExposureWeight: 0
4995+
flipbookLayout: 0
49854996
shaderGraph: {fileID: -5475051401550479605, guid: 8ef26182c95350844afe8c1f9e157db1,
49864997
type: 3}
49874998
primitiveType: 1
@@ -5323,6 +5334,7 @@ MonoBehaviour:
53235334
frustumCulling: 0
53245335
castShadows: 1
53255336
useExposureWeight: 0
5337+
flipbookLayout: 0
53265338
shaderGraph: {fileID: -5475051401550479605, guid: 8ef26182c95350844afe8c1f9e157db1,
53275339
type: 3}
53285340
primitiveType: 1
@@ -6186,6 +6198,7 @@ MonoBehaviour:
61866198
frustumCulling: 0
61876199
castShadows: 1
61886200
useExposureWeight: 0
6201+
flipbookLayout: 0
61896202
shaderGraph: {fileID: -5475051401550479605, guid: 75dc0b4ccd731aa4dbccf92567e457c0,
61906203
type: 3}
61916204
primitiveType: 1

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/09_AttributeMaps.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,7 @@ MonoBehaviour:
21232123
frustumCulling: 0
21242124
castShadows: 0
21252125
useExposureWeight: 0
2126+
flipbookLayout: 0
21262127
shaderGraph: {fileID: 0}
21272128
primitiveType: 1
21282129
useGeometryShader: 0

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/VFXTests/GraphicsTests/09_PointCache.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ MonoBehaviour:
143143
frustumCulling: 0
144144
castShadows: 0
145145
useExposureWeight: 0
146+
flipbookLayout: 0
146147
shaderGraph: {fileID: 0}
147148
primitiveType: 1
148149
useGeometryShader: 0

0 commit comments

Comments
 (0)