You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi, I uses UIParticle.cs to control my custom particle system on UI.
I write a custom shader which uses "custom vertex streams" to control like "uv flow" of texture by artists.
But I found it looks like only TEXCOORD0.xyzw will work well.
If I use TEXCOORD1, TEXCOORD2.... , the values fetched in shader not correct.
I have tried to use the same setting (with same particle system and same shader), make particle system not controlled by "UIParticle.cs", it will be correct.
I am not sure whether it's limitation for UIParticle.cs or maybe just I didn't setup correctly?
Like the image below, I use Custom1.xyzw (TEXCOORD0.zw/xy) as custom value.
It will use custom1.xy => represent TEXCOORD0.zw in shader. custom1.zw => represent TEXCOORD1.xy in shader.
This is how I get particle system input value in shader, in this case, TEXCOORD0.zw are correct, but TEXCOORD1.xy are always wrong....
I have no idea what happened....
To Reproduce
Steps to reproduce the behavior:
Enable "Custom Vertex Stream" of renderer of particle system.
Add Custom1.xyzw (TEXCOORD0.zw|xy)
Implement custom shader and declare attribute like the "offset" below to fetch custom data input on particle system:
In UI, TEXCOORD0.zw, TEXCOORD1.zw, TEXCOORD2.zw ... components will be discarded.
So you can use only TEXCOORD0.xy, TEXCOORD1.xy, TEXCOORD2.xy ... components for custom vertex stream. TEXCOORD0.zw, TEXCOORD1.zw, TEXCOORD2.zw ... components must to be filled with "unnecessary" data (such as Size.xy.)
In addition, add the channels you want to use to Canvas.AdditionalShaderChannels.
Describe the bug
Hi, I uses UIParticle.cs to control my custom particle system on UI.
I write a custom shader which uses "custom vertex streams" to control like "uv flow" of texture by artists.
But I found it looks like only TEXCOORD0.xyzw will work well.
If I use TEXCOORD1, TEXCOORD2.... , the values fetched in shader not correct.
I have tried to use the same setting (with same particle system and same shader), make particle system not controlled by "UIParticle.cs", it will be correct.
I am not sure whether it's limitation for UIParticle.cs or maybe just I didn't setup correctly?
Like the image below, I use Custom1.xyzw (TEXCOORD0.zw/xy) as custom value.
It will use
custom1.xy => represent TEXCOORD0.zw in shader.
custom1.zw => represent TEXCOORD1.xy in shader.
This is how I get particle system input value in shader, in this case, TEXCOORD0.zw are correct, but TEXCOORD1.xy are always wrong....
I have no idea what happened....
To Reproduce
Steps to reproduce the behavior:
Expected behavior
If you feed "offset" value by "custom data" on particle system, the texture should be "offset".
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: