- vg_acquire_thread_sync();
- {
- vg_tex2d_init( (vg_tex2d *[]){&tex_water_surf}, 1 );
- }
- vg_release_thread_sync();
+ vg_tex2d_load_qoi_async_file( "textures/water_surf.qoi",
+ VG_TEX2D_LINEAR|VG_TEX2D_REPEAT,
+ &tex_water_surf );
{
if( !world->water.enabled || (vg.quality_profile == k_quality_profile_low) )
return;
/* Draw reflection buffa */
{
if( !world->water.enabled || (vg.quality_profile == k_quality_profile_low) )
return;
/* Draw reflection buffa */
glClearColor( 1.0f, 0.0f, 0.0f, 0.0f );
glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT );
glClearColor( 1.0f, 0.0f, 0.0f, 0.0f );
glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT );
m4x4_clip_projection( beneath_cam.mtx.p, clippb );
camera_finalize( &beneath_cam );
m4x4_clip_projection( beneath_cam.mtx.p, clippb );
camera_finalize( &beneath_cam );
- glViewport( 0, 0, vg.window_x, vg.window_y );
+ //glViewport( 0,0, g_render_x, g_render_y );
/* Draw surface */
shader_scene_water_use();
render_fb_bind_texture( gpipeline.fb_water_reflection, 0, 0 );
shader_scene_water_uTexMain( 0 );
/* Draw surface */
shader_scene_water_use();
render_fb_bind_texture( gpipeline.fb_water_reflection, 0, 0 );
shader_scene_water_uTexMain( 0 );
shader_scene_water_uInvRes( (v2f){
1.0f / (float)vg.window_x,
1.0f / (float)vg.window_y });
shader_scene_water_uInvRes( (v2f){
1.0f / (float)vg.window_x,
1.0f / (float)vg.window_y });
shader_scene_water_uShoreColour( mat->info.colour );
shader_scene_water_uOceanColour( mat->info.colour1 );
shader_scene_water_uShoreColour( mat->info.colour );
shader_scene_water_uOceanColour( mat->info.colour1 );
shader_scene_water_fast_uTime( world_global.time );
shader_scene_water_fast_uCamera( cam->transform[3] );
shader_scene_water_fast_uSurfaceY( world->water.height );
shader_scene_water_fast_uTime( world_global.time );
shader_scene_water_fast_uCamera( cam->transform[3] );
shader_scene_water_fast_uSurfaceY( world->water.height );
shader_scene_water_fast_uShoreColour( mat->info.colour );
shader_scene_water_fast_uOceanColour( mat->info.colour1 );
shader_scene_water_fast_uShoreColour( mat->info.colour );
shader_scene_water_fast_uOceanColour( mat->info.colour1 );