Shaders and Surfaces quick question

Archdemon

Member
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.
 

Archdemon

Member
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.
 
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