Skip to content

Commit a8a7abe

Browse files
Wave struct stores float instead of half types. This fixes a bug on some platforms where half types in structBuffers are stored as 16 bits. (#168)
1 parent 2796fbc commit a8a7abe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Packages/com.verasl.water-system/Shaders/GerstnerWaves.hlsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ uniform uint _WaveCount; // how many waves, set via the water component
55

66
struct Wave
77
{
8-
half amplitude;
9-
half direction;
10-
half wavelength;
11-
half2 origin;
12-
half omni;
8+
float amplitude;
9+
float direction;
10+
float wavelength;
11+
float2 origin;
12+
float omni;
1313
};
1414

1515
#if defined(USE_STRUCTURED_BUFFER)

0 commit comments

Comments
 (0)