16,251 reputation
23465
bio website sam.zoy.org
location Paris, France
age 35
visits member for 3 years, 4 months
seen 1 hour ago

I live in Paris, France.

I work on video games (computers and consoles) for a living. I write free software and all kind of crazy shit for fun. My interests: image processing, video coding, rendering, game development, maths, physics, compression, cryptography.


Jan
17
awarded  Nice Answer
Jan
17
revised Should the Oj lobe of a Lafortune shader cause the light to be displaced?
re-do drawings
Jan
17
revised Should the Oj lobe of a Lafortune shader cause the light to be displaced?
added 34 characters in body
Jan
17
answered Should the Oj lobe of a Lafortune shader cause the light to be displaced?
Jan
16
comment Why translation uses multiplication and not addition?
This question is mostly opinion-based. Addition is indeed more effective and straightforward, but what makes you think that it isn’t actually used? I add vectors together all the time.
Jan
15
awarded  Nice Answer
Jan
14
comment How can I compute the common points when spheres intersect?
The variable B is already a Point. It is the centre of the intersection circle.
Jan
14
comment How can I compute the common points when spheres intersect?
It is the square of its length. For a geometrical definition, see the Wikipedia article.
Jan
14
comment How can I compute the common points when spheres intersect?
@Leggy7 I added pseudocode using your variable names, hoping it's clearer now.
Jan
14
revised How can I compute the common points when spheres intersect?
use Unicode subscript and add pseudocode
Jan
14
comment How can I compute the common points when spheres intersect?
@Leggy7 the last line tells you where is B because it tells you what vector C1B is. If only we could use LaTeX formatting on this site, it would look a lot better.
Jan
14
answered How can I compute the common points when spheres intersect?
Jan
14
comment How can I compute the common points when spheres intersect?
Is this 2D or 3D? In 3D, the intersection of two spheres is a circle.
Jan
14
answered Smooth interpolation with variable time steps
Jan
11
comment Code to generate a color gradient within a texture using a diagonal line
@Thraka The code above is supposed to give you exactly the effect in your picture. Did you keep the Clamp call?
Jan
11
comment Code to generate a color gradient within a texture using a diagonal line
@Thraka The x1/y1/x2/y2 values decide the slope of the gradient. Isn’t it what you’re looking for? If not, maybe I’d need a drawing to understand better.
Jan
10
answered Code to generate a color gradient within a texture using a diagonal line
Jan
3
answered Is there a way to optimize this 2D lighting effect shader?
Jan
2
comment margin of error trying to check if a point lays on line
Your question mentions a line segment, but your equation is for a line without limits. Which one is it you need?
Jan
2
comment Keep rasterized pixel amount constant
Are the objects really arbitrarily shaped and oriented, or is there some consistency? Your example with a rectangle is a worst-case scenario and I can think of methods to reduce the problem in this specific case, but that will depend on what the other objects are.