POWER
[carveJwlIkooP6JGAAIwe30JlM.git] / world_water.h
index 656f1b2350afa588117d1a80f8a47a3dddab1093..928d36c95175c6d73cbad7bfee03f0b61a67fd93 100644 (file)
@@ -158,7 +158,19 @@ VG_STATIC void render_water_surface( m4x4f pv, m4x3f camera )
    glBlendEquation(GL_FUNC_ADD);
 
    mesh_bind( &world.mesh_water );
-   mesh_draw( &world.mesh_water );
+
+   for( int i=0; i<world.material_count; i++ )
+   {
+      struct world_material *mat = &world.materials[i];
+
+      if( mat->info.shader == k_shader_water )
+      {
+         shader_water_uShoreColour( mat->info.colour );
+         shader_water_uOceanColour( mat->info.colour1 );
+
+         mdl_draw_submesh( &mat->sm_no_collide );
+      }
+   }
 
    glDisable(GL_BLEND);
 }