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
Unity: 2021.3.17 f1
Graphic API: Vulkan
Render Pipeline: URP
To whom it may concern,
Hi all!
I am encountering a strange issue with UV flow timing in my shader. I am passing a custom half precision value (e.g., _Scale) to control the flow speed. My shader code looks like this: half4 color = SAMPLE_TEXTURE_2D(_Tex, _sampler_Tex, frac(_Time.y(or _Time.x * 20) * _Scale)); On certain devices, including some phones and PCs, the flow speed gradually slows down. Interestingly, when I change the precision from half to float, the issue is resolved. As I check the disassembled SPIR-V codes via RenderDoc, the only difference between correct and wrong shader is the code: float2 _388 = **CompositeConstruct**({_387, _387}) : **[[RelaxedPrecision]]**; When using float precision, the [[RelaxedPrecision]] qualifier disappears and the issue is gone too. Additionally, switching to OpenGL or other APIs resolves the problem as well. Does anyone have insight into why this happens?
Cheers.
The text was updated successfully, but these errors were encountered:
Unity: 2021.3.17 f1
Graphic API: Vulkan
Render Pipeline: URP
To whom it may concern,
Hi all!
I am encountering a strange issue with UV flow timing in my shader. I am passing a custom half precision value (e.g., _Scale) to control the flow speed. My shader code looks like this:
half4 color = SAMPLE_TEXTURE_2D(_Tex, _sampler_Tex, frac(_Time.y(or _Time.x * 20) * _Scale));
On certain devices, including some phones and PCs, the flow speed gradually slows down. Interestingly, when I change the precision from half to float, the issue is resolved. As I check the disassembled SPIR-V codes via RenderDoc, the only difference between correct and wrong shader is the code:float2 _388 = **CompositeConstruct**({_387, _387}) : **[[RelaxedPrecision]]**;
When using float precision, the [[RelaxedPrecision]] qualifier disappears and the issue is gone too. Additionally, switching to OpenGL or other APIs resolves the problem as well. Does anyone have insight into why this happens?Cheers.
The text was updated successfully, but these errors were encountered: