• 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!

Shaders and Surfaces quick question

A

Archdemon

Guest
So I am making a little platformer with my nephew (trying to get him into programming; he seems to have a liking for it.) And I am using shaders and surfaces within a single room at the moment, but I am noticing that the shader seems to also affect the surface making for some let's just say undesirable results. Is there any way to make a shader ignore a certain surface before drawing out across the screen? If any more information is needed to answer this just let me know! Thanks.
 

NightFrost

Member
Shaders only affect the draws you put between shader_set and shader_reset, so you should be having full control over what gets affected. If this isn't happening, you're probably having a shader effect accidentally spill over to your other draws somewhere.
 
A

Archdemon

Guest
So could having the code for both the shaders and the surfaces in a single control object be causing the spill over?
 

NightFrost

Member
If you mean you're doing both draws with shaders and draws without shaders in same Draw event, no by default that shouldn't cause any problems. However if the code is not organized correctly, you may have left some shader running where you think it is not.
 
R

robproctor83

Guest
You might be better off sharing some code if possible. Otherwise, open up the debugger and step through the draw process to see what is going on.
 
Top