FrankBoltzmann
05-21-2015, 09:21 AM
Hi,
I'm currently doing a large shader where I need functions to create layers of abstraction. I have some loops (I know, bad) in some of my functions and I implement a loopbreaker to prevent infinite loops. I don't know if this is good or bad practise, but I'd like to check if my loopbreakers are being hit and for what fragments this happens. Is there an easier way to do this than propagating some kind of out bool loopbreaking parameter up until my main() catches it and outputs an ultragreen color for those fragments? (that's how I debug my shader code most of the times) Maybe altering the output register and jumping to program exit? (can I actually go into assembly and do this? safely?)
Thank you
I'm currently doing a large shader where I need functions to create layers of abstraction. I have some loops (I know, bad) in some of my functions and I implement a loopbreaker to prevent infinite loops. I don't know if this is good or bad practise, but I'd like to check if my loopbreakers are being hit and for what fragments this happens. Is there an easier way to do this than propagating some kind of out bool loopbreaking parameter up until my main() catches it and outputs an ultragreen color for those fragments? (that's how I debug my shader code most of the times) Maybe altering the output register and jumping to program exit? (can I actually go into assembly and do this? safely?)
Thank you