Skip to content

Commit

Permalink
Wave struct stores float instead of half types. This fixes a bug on s…
Browse files Browse the repository at this point in the history
…ome platforms where half types in structBuffers are stored as 16 bits.
  • Loading branch information
kaychang-unity committed Feb 18, 2022
1 parent 2796fbc commit 24390bb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Packages/com.verasl.water-system/Shaders/GerstnerWaves.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ uniform uint _WaveCount; // how many waves, set via the water component

struct Wave
{
half amplitude;
half direction;
half wavelength;
half2 origin;
half omni;
float amplitude;
float direction;
float wavelength;
float2 origin;
float omni;
};

#if defined(USE_STRUCTURED_BUFFER)
Expand Down

0 comments on commit 24390bb

Please sign in to comment.