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
I am working with a double precision build (Godot 4.2.3 mono). The example project runs, but the initial spectrum (and thus the waves) are not the same as in the single-precision build. Making the following 1-line change solves the issue:
In Ocean3D._pack_initial_spectrum_settings(), change the line that appends the wave vector to pass the wave vector components as 32-bit floats instead of a Vector2. The double precision build of Godot uses 64-bit Vector2, but it makes the correct conversion to 32-bit floats when appending the components to a PackedFloat32Array.
WAS:
settings_bytes.append_array(PackedVector2Array([wave_vector]).to_byte_array())
SHOULD BE:
settings_bytes.append_array(PackedFloat32Array([wave_vector.x, wave_vector.y]).to_byte_array())
The text was updated successfully, but these errors were encountered:
I am working with a double precision build (Godot 4.2.3 mono). The example project runs, but the initial spectrum (and thus the waves) are not the same as in the single-precision build. Making the following 1-line change solves the issue:
In Ocean3D._pack_initial_spectrum_settings(), change the line that appends the wave vector to pass the wave vector components as 32-bit floats instead of a Vector2. The double precision build of Godot uses 64-bit Vector2, but it makes the correct conversion to 32-bit floats when appending the components to a PackedFloat32Array.
WAS:
settings_bytes.append_array(PackedVector2Array([wave_vector]).to_byte_array())
SHOULD BE:
settings_bytes.append_array(PackedFloat32Array([wave_vector.x, wave_vector.y]).to_byte_array())
The text was updated successfully, but these errors were encountered: