Skip to content

Vfx/fix/1289612 filter texture by dimension #5715

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 13 commits into from
Oct 18, 2021

Conversation

julienamsellem
Copy link
Contributor

@julienamsellem julienamsellem commented Sep 17, 2021

Purpose of this PR

https://fogbugz.unity3d.com/f/cases/1289612/

When an operator, a node or even a property exposes a Texture object, the picker lists all kind of textures (2D, 3D, Cubemap ...).
The list is then much longer than needed and the user is bothered with non relevant textures.
With the fix, the picker lists only relevant textures.

[Before]
Unity_GvXsSUPpfD

[After]
Unity_qZPKnwpnhu


Testing status

The change will apply to any object field in the VFX graph editor, so I checked

  • The blackboard
  • Operator (Sample SDF)
  • Nodes (Position Mesh and Output Quad main texture)

Comments to reviewers

The scope of the change is quite large because not only texture picker is affected, any kind of object picker (mesh, skinmesh, texture ...).
The UI on this part is completely new, even though I tried to make it the same as before so you may also check for regression on this part.

Note
The object icon is a bit improved since now it's more accurate than before. For example if your object should be a cubemap, you see a cubemap icon, not the generic texture icon.
[Before]
Unity_hSfvG5kTSz

[After]
Unity_XWzxDs2bkV

@julienamsellem julienamsellem requested review from iTris666 and a team September 17, 2021 17:30
@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

VFX
/.yamato%252Fall-vfx.yml%2523PR_VFX_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@julienamsellem
Copy link
Contributor Author

I forgot one aspect of the issue: the texture picker should also include RenderTextures objects (if possible of the correct dimension).
I'll add more commits to support this feature.

@VitaVFX VitaVFX requested review from VitaVFX and removed request for a team September 20, 2021 14:04
@VitaVFX
Copy link

VitaVFX commented Sep 20, 2021

I am happier than a seagull with a French fry 🍟 when I see such detailed and informative PR descriptions, thank you! Keep it up!

Tested:

  1. VFX Graph, Subgraph Operator, Blackboard, Inspector
  2. Sample Attribute Map, Sample Texture Cube, Sample Texture 3D, Sample Texture 2D, Load Texture 2D Array, Load Texture 3D, Load Texture 2d, Sample Multiple Position Map, Sample Signed Distance Field, Cubemap, Cube map array nodes, Shader Graph, Main texture inputs in Output context
  3. .jpg, .png, .tga, .exr formats
  4. Drag texture to the texture slot, assign texture via object picker
  5. Setting texture to none, deleting it from project browser, undo/redo, copy/paste
  6. Tried tweaking Texture type and shape settings

Issues found:

  1. Texture can not be dragged to texture slot (not reproducible on master), (Does not work with inline nodes, Blackboard properties, works with Inspector)
    uTlGUzRMWt

  2. When the texture's shape changes, the texture remains assigned to the field instead of being removed. For example: Changing textures shape from 2D to Cubemap.
    image

  3. As you already mentioned, RT support is missing

@iTris666
Copy link
Contributor

Have you tested that a render texture with the right dimension should also be regarded as compatible ?

@VladNeykov VladNeykov self-requested a review September 21, 2021 10:00
@VladNeykov
Copy link
Contributor

Hi @julienamsellem ,
Really useful fix! I've jotted down some observations (WIP) in the test doc

@VladNeykov VladNeykov removed the request for review from VitaVFX October 5, 2021 15:29
Copy link
Contributor

@VladNeykov VladNeykov left a comment

Choose a reason for hiding this comment

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

Looking good, no outstanding issues found.
Test doc for reference.
Thanks for the fix! :)

@julienamsellem julienamsellem marked this pull request as ready for review October 8, 2021 09:18
@julienamsellem julienamsellem requested review from julienf-unity and removed request for iTris666 October 11, 2021 12:16
@julienamsellem julienamsellem merged commit ead249a into master Oct 18, 2021
@julienamsellem julienamsellem deleted the vfx/fix/1289612-filter-texture-by-dimension branch October 18, 2021 07:45
odbb added a commit that referenced this pull request Oct 18, 2021
* master: (148 commits)
  [HDRP] Add custom pass buffer scaling functions (#5809)
  Fix HDRP template input not working when using the new Input System and no Keyboard/Mouse (#6045)
  [SRP] Bump package version to 13.2.0 (#6049)
  ** Improving FTPL perf on ps4 by .3 ms on average ** (#5866)
  Remove min version from package.json (#6044)
  Fix subdiv view (#6033)
  Small qol (#6036)
  APV: update some tooltips and add a clamp on dilation validity threshold (#6005)
  SRP bump to 13.1.1 (#6041)
  (SRP] Bump min version to a12 to fix Yamato
  Vfx/fix/1289612 filter texture by dimension (#5715)
  [HDRP] Fix 9601/9602 reference screenshots after cache server weirdness
  [CI] [trunk] Updated editor to 5a5aca0fb632e01b9b362f6deb73bcf599d612ca
  [CI] [trunk] Updated editor to 7b5b9bb6eed88e40de00efa2a629dd8f0b2bfee2
  [CI] [trunk] Updated editor to a397ac6302d3ce68bd3eeea7721610a649addfa3
  [CI] [trunk] Updated editor to dd9d77b7ded66b5edad4dacf123ffbb6c8d8c4bf
  [CI] [trunk] Updated editor to 6c7822fe613adfea64bb232c817a2fdee34fc273
  [CI] [trunk] Updated editor to aae7fd02ff5afebc831948d25c52dcf704a8a3f3
  [CI] [trunk] Updated editor to 9c278756e419ae931cabac6c5dd60f24e05c6de3
  [CI] [trunk] Updated editor to d3dc7fc8d330da1155ec00683876a559b2a63281
  ...
unity-emilk pushed a commit that referenced this pull request May 10, 2022
https://fogbugz.unity3d.com/f/cases/1419176/

This is a regression introduced by this PR [#5715](#5715)

Repro steps:
1. Import the attached project
2. Open the VFX graph
3. Observe the subgraph block and subgraph operator are referenced properly
4. Rename the VFX Graph
5. Observe both subgraph references are lost

Expected outcome:
- References to be kept

![](https://fogbugz.unity3d.com/default.asp?ixAttachment=446486&pg=pgDownload&pgType=pgFile&sFilename=Unity_22xc8Fjr3L.gif)
unity-emilk pushed a commit that referenced this pull request Oct 14, 2022
https://jira.unity3d.com/browse/UUM-5081
Backport of this PR: https://github.cds.internal.unity3d.com/unity/unity/pull/9708

This is a regression introduced by this PR [#5715](#5715)

Repro steps:
1. Import the attached project
2. Open the VFX graph
3. Observe the subgraph block and subgraph operator are referenced properly
4. Rename the VFX Graph
5. Observe both subgraph references are lost

Expected outcome:
- References to be kept

![](https://fogbugz.unity3d.com/default.asp?ixAttachment=446486&pg=pgDownload&pgType=pgFile&sFilename=Unity_22xc8Fjr3L.gif)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants