{
GLuint idx = glGetUniformBlockIndex( shader, "ub_world_lighting" );
glUniformBlockBinding( shader, idx, world->ubo_bind_point );
}
{
GLuint idx = glGetUniformBlockIndex( shader, "ub_world_lighting" );
glUniformBlockBinding( shader, idx, world->ubo_bind_point );
}
{
glActiveTexture( GL_TEXTURE0 );
glBindTexture( GL_TEXTURE_2D, world_render.tex_terrain_noise );
{
glActiveTexture( GL_TEXTURE0 );
glBindTexture( GL_TEXTURE_2D, world_render.tex_terrain_noise );
void world_render_traffic( world_instance *world, u32 material_id,
struct world_pass *pass ){
if( !mdl_arrcount( &world->ent_traffic ) ) return;
void world_render_traffic( world_instance *world, u32 material_id,
struct world_pass *pass ){
if( !mdl_arrcount( &world->ent_traffic ) ) return;
void world_render_pass( world_instance *world, struct world_pass *pass ){
for( int i=0; i<world->surface_count; i++ ){
struct world_surface *mat = &world->surfaces[i];
void world_render_pass( world_instance *world, struct world_pass *pass ){
for( int i=0; i<world->surface_count; i++ ){
struct world_surface *mat = &world->surfaces[i];
void world_render_both_stages( world_instance *world, struct world_pass *pass )
{
mesh_bind( &world->mesh_geo );
void world_render_both_stages( world_instance *world, struct world_pass *pass )
{
mesh_bind( &world->mesh_geo );
struct world_surface *mat ){
glActiveTexture( GL_TEXTURE1 );
glBindTexture( GL_TEXTURE_2D, world->textures[ mat->info.tex_diffuse ] );
struct world_surface *mat ){
glActiveTexture( GL_TEXTURE1 );
glBindTexture( GL_TEXTURE_2D, world->textures[ mat->info.tex_diffuse ] );
shader_scene_standard_use();
shader_scene_standard_uTexGarbage(0);
shader_scene_standard_uTexMain(1);
shader_scene_standard_use();
shader_scene_standard_uTexGarbage(0);
shader_scene_standard_uTexMain(1);
world_shader_standard_bind( world, cam );
struct world_pass pass = {
.shader = k_shader_standard,
world_shader_standard_bind( world, cam );
struct world_pass pass = {
.shader = k_shader_standard,
shader_scene_standard_alphatest_use();
shader_scene_standard_alphatest_uTexGarbage(0);
shader_scene_standard_alphatest_uTexMain(1);
shader_scene_standard_alphatest_use();
shader_scene_standard_alphatest_uTexGarbage(0);
shader_scene_standard_alphatest_uTexMain(1);
void world_render_challenges( world_instance *world, struct world_pass *pass,
v3f pos, int layer_depth ){
if( !world ) return;
void world_render_challenges( world_instance *world, struct world_pass *pass,
v3f pos, int layer_depth ){
if( !world ) return;
int layer_depth ){
shader_scene_fxglow_use();
shader_scene_fxglow_uUvOffset( (v2f){ 0.0f, 0.0f } );
int layer_depth ){
shader_scene_fxglow_use();
shader_scene_fxglow_uUvOffset( (v2f){ 0.0f, 0.0f } );
struct world_surface *mat ){
if( mat->info.flags & k_material_flag_collision ){
shader_scene_override_uAlphatest(0);
struct world_surface *mat ){
if( mat->info.flags & k_material_flag_collision ){
shader_scene_override_uAlphatest(0);
void render_world_override_pass( world_instance *world,
struct world_pass *pass ){
for( int i=0; i<world->surface_count; i++ ){
void render_world_override_pass( world_instance *world,
struct world_pass *pass ){
for( int i=0; i<world->surface_count; i++ ){
struct world_pass pass = {
.cam = &skaterift.cam,
.fn_bind_textures = bindpoint_override,
struct world_pass pass = {
.cam = &skaterift.cam,
.fn_bind_textures = bindpoint_override,