Unity-Technologies / BoatAttack

Demo Project using the Universal RP from Unity3D
Other
2.54k stars 952 forks source link

Wave struct stores float instead of half types. #168

Closed kaychang-unity closed 2 years ago

kaychang-unity commented 2 years ago

This fixes a bug on some platforms where half types in structBuffers are stored as 16 bits, but the data uploaded from the CPU are 32 bits floats. This would result in the water geometry not appearing on screen.

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

kaychang-unity commented 2 years ago

That looks good. I'm curious where is the CPU-side code that uploads the data?

Here: https://github.com/Unity-Technologies/BoatAttack/blob/24390bb14cd42862fd388fffa58b9e71b5d7fde8/Packages/com.verasl.water-system/Scripts/Water.cs#L244