Vertex Animation shaders for Unity 2019 LWRP not working

   5968   9   2
User Avatar
Member
12 posts
Joined: 6月 2017
Offline
Hello ! I'm testing the new Vertex Animation shaders for Unity LWRP and getting this issue.

When i import Gametools VAT LWRP shaders into Unity i'm getting this errors

Shader error in ‘sidefx/lwrp/VAT Fluid Simple Lit’: unrecognized identifier ‘posTex’ at Assets/SimpleLitVATFluidInput.hlsl(39) (on d3d11)
Shader error in ‘sidefx/lwrp/VAT Sprite Simple Lit’: unrecognized identifier ‘posTex’ at Assets/SimpleLitVATSpriteInput.hlsl(40) (on d3d11)
Shader error in ‘sidefx/lwrp/VAT Soft Simple Lit’: unrecognized identifier ‘posTex’ at Assets/SimpleLitVATSoftInput.hlsl(39) (on d3d11)
Shader error in ‘sidefx/lwrp/VAT RBD Simple Lit’: unrecognized identifier ‘posTex’ at Assets/SimpleLitVATRigidInput.hlsl(36) (on d3d11)

And when i try to create new material - there is no sidefx folder in shader selection list. All shaders found in Failed to Compile section.

Unity 2019.1.0f2 clean project
Windows 10 64
I Have Core RP, Lightweight RP and Shadergraph packages installed, LightweightRenderPipelineAsset created and assinged in project settings.

Can i get some help with this issue ? Maybe i'm doing something wrong ?
Thank you !!!
Edited by IceBar0n - 2019年4月25日 07:05:29
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Hi. I've just tested the shaders in 2019.2.0a4 and I'm not seeing any compile errors. It's weird that it would just be that attribute.
Does the declaration of _posTex exist on line 25 or 26 in that same file?

Mike
User Avatar
Member
12 posts
Joined: 6月 2017
Offline
Lines 25 and 26 looking like this

TEXTURE2D(_posTex);
SAMPLER(sampler_posTex);

Also tested on 2019.2.0a13 , seems that shader compiled, no errors, but vertex animation on my asset isnt working anyway..

I noticed he difference in package versions between 2019.1.0f2 and 2019.2.0a13

2019.1.0f2 package versions:
LWRP version 5.7.2
Core RP Library version 5.7.2

2019.2.0a13 package versions:
LWRP version 5.2.3
Core RP Library version 5.2.3

Maybe this will help to figure out whats causing the issue
Edited by IceBar0n - 2019年4月25日 10:13:22
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
I've tested the shaders in 2019.1.0f2 and I'm not getting any compile errors. Can you create a fresh project, import the shaders and see if that still causes problems?
User Avatar
Member
12 posts
Joined: 6月 2017
Offline
Tried on fresh project.
Still not compiling, reinstalled Unity 2019.1.0f2 just in case and no luck…

UPDATE: Tried on another machine, the same problem.
I've recorded short video of what i'm doing step by step, hope this help.
video [vimeo.com]

I have a feeling that i'm doing something wrong, because you said that all working fine on your machine.
If so then my apologies in advance

UPDATE 2 Tried on Unity 2019.1.2f1 on 3 different computers and still no luck, the same errors

Thank you

Denis
Edited by IceBar0n - 2019年5月14日 07:14:24
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Unity changed their underlying code in 2019 which broke the VAT shaders. Try using this package [drive.google.com]

I've also updated the code in the github repo so there's source for Unity 2018 and 2019.
User Avatar
Member
4 posts
Joined: 3月 2018
Offline
Hi.

Do you intend to support the HD SRP in Unity for these shaders too? Or do you think it likely I'll have any success tweaking the LWRP shaders to work with HDRP, given they both look to be HLSL?
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Hi,

We'd like to support both pipelines. I haven't had a chance to test the shaders with the HDRP but I would think the changes would be relatively straight forward. If you could try running them and report back any issues you might have, I can take a look at making the necessary changes.

Mike
User Avatar
Member
8 posts
Joined: 2月 2018
Offline
Hi Mike,

I'm also interested in getting vertex animations in the HDRP, works great in LWRP with your package above.

If you had the chance to convert the shaders i would love to try them.

Cheers,

Jordan
User Avatar
Member
1 posts
Joined: 1月 2020
Offline
Maybe consider utilizing ShaderGraph? In theory it would be much easier to make transitions between pipeline versions with shadergraph
  • Quick Links