}
VG_STATIC int render_gate( world_instance *world_inside,
- ent_gate *gate, camera *cam )
+ ent_gate *gate, camera *cam, int layer_depth )
{
v3f viewdir, gatedir;
m3x3_mulv( cam->transform, (v3f){0.0f,0.0f,-1.0f}, viewdir );
shader_model_gate_uPv( cam->mtx.pv );
shader_model_gate_uMdl( gate->to_world );
shader_model_gate_uCam( cam->pos );
-
- /* TODO(ART IMPROVEMENT): animate alpha of this? */
shader_model_gate_uColour( (v4f){0.0f,1.0f,0.0f,0.0f} );
shader_model_gate_uTime( vg.time*0.25f );
shader_model_gate_uInvRes( (v2f){
glStencilMask( 0x00 );
}
- render_world( world_inside, &gate_camera );
+ render_world( world_inside, &gate_camera, layer_depth );
{
glDisable( GL_STENCIL_TEST );
- render_water_texture( world_inside, &gate_camera );
- render_fb_bind( gpipeline.fb_main );
+ render_water_texture( world_inside, &gate_camera, layer_depth );
+ render_fb_bind( gpipeline.fb_main, 1 );
glEnable( GL_STENCIL_TEST );