• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Question about Draw Pipeline (I think)

HNM

Member
In a case like this:

// in Draw GUI
surface_set_target ( blur_surface ) ;
shader_set ( shd_blur ) ;
draw_surface_stretched ( application_surface , 0 , 0 , blur_surface_width , blur_surface_height ) ;
// where blur surface is smaller

does the shader apply to the app_surface before or after it's stretched? Would drawing the app_surface on another small surface with a passthrough shader first be faster(and necessary)?
 

kburkhart84

Firehammer Games
In a case like this:

// in Draw GUI
surface_set_target ( blur_surface ) ;
shader_set ( shd_blur ) ;
draw_surface_stretched ( application_surface , 0 , 0 , blur_surface_width , blur_surface_height ) ;
// where blur surface is smaller

does the shader apply to the app_surface before or after it's stretched? Would drawing the app_surface on another small surface with a passthrough shader first be faster(and necessary)?
I assume it is applying the shader to the stretched version, unless internally it is doing some kind of pre-drawing before stretching(I seriously doubt that). Note that it is applying to the stretched blur_surface though, not the whole app_surface.

As far as you drawing it to another surface first so it is faster....what would you gain, and why would it be faster OR necessary.
 
  • Like
Reactions: HNM

HNM

Member
I assume it is applying the shader to the stretched version, unless internally it is doing some kind of pre-drawing before stretching(I seriously doubt that). Note that it is applying to the stretched blur_surface though, not the whole app_surface.

As far as you drawing it to another surface first so it is faster....what would you gain, and why would it be faster OR necessary.
Thanks for the quick reply, you basically cleared it up for me.
I thought if the app_surface was blured with the shader and then stretched you would have to manually draw it stretched first to save on blur steps.
 
Top