stagedraw: disable face culling for 2D rendering
It's never needed, and sometimes we have to re-enable it e.g. for blast particles. This lets those cases batch together with other sprites.
This commit is contained in:
parent
b9ee7628ba
commit
bc4924ac59
1 changed files with 4 additions and 0 deletions
|
@ -622,6 +622,7 @@ static bool draw_powersurge_effect(Framebuffer *target_fb, BlendMode blend) {
|
|||
r_state_push();
|
||||
r_blend(BLEND_NONE);
|
||||
r_disable(RCAP_DEPTH_TEST);
|
||||
r_disable(RCAP_CULL_FACE);
|
||||
|
||||
// if(player_is_powersurge_active(&global.plr)) {
|
||||
r_state_push();
|
||||
|
@ -675,6 +676,7 @@ static bool boss_distortion_rule(Framebuffer *fb) {
|
|||
r_state_push();
|
||||
r_blend(BLEND_NONE);
|
||||
r_disable(RCAP_DEPTH_TEST);
|
||||
r_disable(RCAP_CULL_FACE);
|
||||
|
||||
cmplx fpos = global.boss->pos;;
|
||||
cmplx pos = fpos;
|
||||
|
@ -809,6 +811,7 @@ static void stage_render_bg(StageInfo *stage) {
|
|||
if(should_draw_stage_bg()) {
|
||||
r_mat_mv_push();
|
||||
r_enable(RCAP_DEPTH_TEST);
|
||||
r_enable(RCAP_CULL_FACE);
|
||||
stage->procs->draw();
|
||||
r_mat_mv_pop();
|
||||
fbpair_swap(background);
|
||||
|
@ -816,6 +819,7 @@ static void stage_render_bg(StageInfo *stage) {
|
|||
|
||||
set_ortho(VIEWPORT_W, VIEWPORT_H);
|
||||
r_disable(RCAP_DEPTH_TEST);
|
||||
r_disable(RCAP_CULL_FACE);
|
||||
|
||||
apply_bg_shaders(stage->procs->shader_rules, background);
|
||||
|
||||
|
|
Loading…
Reference in a new issue