Skip to content

[2021.1][VFX] staging backports #3645

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 31 commits into from
Mar 10, 2021
Merged

Conversation

julienf-unity
Copy link
Contributor

@julienf-unity julienf-unity commented Feb 24, 2021

Purpose of this PR

Added

  • Added support for Texture2D Arrays in Flipbooks

Changed

  • Sphere and Cube outputs are now experimental
  • Property Binder : Handle Remove Component removing linked hidden scriptable objectfields
  • Property Binder : Prevent multiple VFXPropertyBinder within the same game object

Fixed

  • Modified Sign operator node output for float when input is 0.0f Case 1299922
  • An existing link can be remade.
  • Use alphabetical order in type list in blackboard "+" button Case 1304109
  • Consistently displays the Age Particles checkbox in Update context Case 1221557
  • Fix compute culling compilation in URP Case 1309174
  • pCache: Unexpected ditable field in Mesh Statistics, Save & Cancel pCache, error trying to access not readable texture Case 1122417
  • Handle correctly locked VisualEffectAsset with version control system Case 1261051
  • Artefact in VFXView using efficient debug mode in component target board Case 1243947
  • Compilation error due to direct access to GetWorldToObjectMatrix instead of VFXGetWorldToObjectMatrix Case 1308481
  • Safe Normalization of Cross Products in Orient blocks Case 1272724
  • Property Binder : Undo after reset Case 1293794
  • Property Binder : Allow copy/past from a game object to another
  • Deleting a context node and a block while both are selected throws a null ref exception. Case 315578

Testing status

Tests launched locally


Comments to reviewers

Notes for the reviewers you have assigned.

Lewis Jordan and others added 28 commits February 24, 2021 11:59
* Resolved 1272101

* Resolved 1264943

* Removed uncertainty around 'should'

* Resolved 1298031

* Added snippets file

* Resolved 1292127

* Fixed typos

* Resolved 1295296

Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
* 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
* 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.
The `//` was causing an untracked issue
* 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 <lewis.jordan@hotmail.co.uk>
* 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 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
* 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
@julienf-unity julienf-unity requested review from PaulDemeulenaere and a team February 24, 2021 16:48
@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@PaulDemeulenaere
Copy link
Contributor

@VitaVFX VitaVFX self-requested a review February 25, 2021 08:03
Temporarily disable motion vector per vertex optimization.
Small refactor for vertex count calculation
@julienf-unity
Copy link
Contributor Author

I backported the commit you mentionned @PaulDemeulenaere

Copy link
Contributor

@PaulDemeulenaere PaulDemeulenaere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick overview (skipping change in .vfx files) and didn't notice unexpected change.

@VitaVFX VitaVFX removed the request for review from a team February 26, 2021 16:55
@PaulDemeulenaere
Copy link
Contributor

Ready to be merged @julienf-unity
image

@julienf-unity julienf-unity merged commit 3b69595 into 2021.1/staging Mar 10, 2021
@julienf-unity julienf-unity deleted the 2021.1/vfx/staging branch March 10, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants