George Duckett
Reputation
Top tag
Next privilege 125 Rep.
Vote down
 Nov9 revised Extra $100 after borrowing and shopping formatting, wording Nov9 suggested approved edit on Extra$100 after borrowing and shopping Nov9 comment Optimizing response times of an ambulance corp: short-term versus average To explain "Voronoi tessellation" it might be worth including an image from a google image search from that phrase. It certainly helped me understand it. Great explanations though! Sep21 comment What are imaginary numbers? @Joe, and OP: That article could probably go in the answer. It is a great resource. Aug23 awarded Autobiographer Jul27 awarded Supporter Jul27 accepted Function to make values close to zero, zero leaving others as is Jul27 awarded Editor Jul27 revised Function to make values close to zero, zero leaving others as is added 55 characters in body Jul27 comment Function to make values close to zero, zero leaving others as is Sorry for not being clear. The output of $f$ should be a 2d vector. x is a real number that defines the range of values of each component of $v$ that will become zero. Jul27 asked Function to make values close to zero, zero leaving others as is May26 comment Step function for greaterthan @Chris. In HLSL (High Level Shader Language) any conditional (in a loop especially) is very bad, as the graphics card can't do so much in parallel. (it has to wait for the longest running branch to finish... or something). Not sure why, but on the xbox, adding an if statement to conditionally break out of a loop early was vastly more expensive than completing the loop in all cases. Same with step (which is an intrinsic function of HLSL). My knowledge doesnt extend to the "why" unfortunately. See my question here May26 comment Step function for greaterthan Ahh ok, think i understand now. Thanks for the extra answer. May26 comment Step function for greaterthan I understand your first paragraph, thanks for the insight. Not quite following the second part though. Are you giving an example of how to do an absolute value function? I don't understand how that helps deal with the case x = y. May26 awarded Scholar May26 comment Step function for greaterthan That's exactly what i was after, thanks. May26 accepted Step function for greaterthan May26 awarded Student May26 comment Step function for greaterthan @joriki, exactly, if someone can work out the formula for f(x, y) then i can do the translation into HLSL so no programming knowledge is needed or involved. I merely included a bit of background to aid any future searchers. May26 comment Step function for greaterthan Sorry, i don't understand. The reason for this question is programming related, but the question (what mathematical function is 0 when x < y and 1 when x >= y) is a mathematical one. (isn't it?)