+ vg_tex2d_load_qoi_async_file( "textures/garbage.qoi",
+ VG_TEX2D_NEAREST|VG_TEX2D_REPEAT,
+ &tex_terrain_noise );
+
+ vg_async_call( async_world_render_init, NULL, 0 );
+}
+
+VG_STATIC void world_link_lighting_ub( world_instance *world, GLuint shader )
+{
+ GLuint idx = glGetUniformBlockIndex( shader, "ub_world_lighting" );
+ glUniformBlockBinding( shader, idx, world->ubo_bind_point );
+}
+
+VG_STATIC void world_bind_position_texture( world_instance *world,
+ GLuint shader, GLuint location,
+ int slot )
+{
+ render_fb_bind_texture( &world->heightmap, 0, slot );
+ glUniform1i( location, slot );
+}
+
+VG_STATIC void world_bind_light_array( world_instance *world,
+ GLuint shader, GLuint location,
+ int slot )
+{
+ glActiveTexture( GL_TEXTURE0 + slot );
+ glBindTexture( GL_TEXTURE_BUFFER, world->tex_light_entities );
+ glUniform1i( location, slot );
+}
+
+VG_STATIC void world_bind_light_index( world_instance *world,
+ GLuint shader, GLuint location,
+ int slot )
+{
+ glActiveTexture( GL_TEXTURE0 + slot );
+ glBindTexture( GL_TEXTURE_3D, world->tex_light_cubes );
+ glUniform1i( location, slot );