Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/Water.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var collision_texture
func update_collision_texture():
# Update the collision maps
var img = collision_texture.get_data() # Get the currently rendered map
img.convert(4) # Convert to RGBA, this is required on GLES3
# Set current map as old map
var old_collision_texture = simulation_material.get_shader_param("collision_texture")
simulation_material.get_shader_param("old_collision_texture").set_data(old_collision_texture.get_data())
Expand All @@ -32,6 +33,7 @@ func update_collision_texture():
func update_height_map():
# Update the height maps
var img = simulation_texture.get_data() # Get currently rendered map
img.convert(4) # Convert to RGBA, this is required on GLES3
# Set current map as old map
var old_height_map = simulation_material.get_shader_param("z_tex")
simulation_material.get_shader_param("old_z_tex").set_data(old_height_map.get_data())
Expand Down