15,682 reputation
23263
bio website sam.zoy.org
location Paris, France
age 35
visits member for 3 years, 1 month
seen 2 hours 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
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.
Jan
2
revised Keep rasterized pixel amount constant
upload a larger image
Jan
2
answered How can obtain the relative orientation between two quaternions?
Dec
28
answered Encode two integers into colour values and compare them in a HLSL shader
Dec
25
answered Radiometric quantities and time in rendering
Dec
20
comment Why not use vectors to represent orientation?
@v.oddou The one time creation cost is unimportant; often you create a quaternion once, and apply it to a hundred objects. This is my main argument (“people manipulate rotations rather than represent them”) and I don’t think it’s fallacious. Also, note that you usually do not need sine or cosine to construct a quaternion.
Dec
19
revised Why not use vectors to represent orientation?
add more divisions to the operation count
Dec
19
answered Why not use vectors to represent orientation?
Dec
14
comment Implementing frame-independent friction
Can you explain how you then transform the value of friction into a force or a velocity change? Formulas like Math.pow(0.6f, deltaTime) can be correct but it all depends on how friction is applied.
Dec
14
comment How to rotate an object around world aligned axes?
let us continue this discussion in chat
Dec
14
comment How to rotate an object around world aligned axes?
I don’t think I understand your question. Your GIF shows a rotation of about 50 degrees around Z (object space), then 50 degrees around X (object space), then 45 degrees around Y (object space). This is exactly the same as a rotation of 45 degrees around Y (world space), then 50 degrees around X (world space), then 50 degrees around Z (world space).
Dec
14
comment How to rotate an object around world aligned axes?
You are misreading. Changing the order does not result in the same rotation. Changing the order and switching from intrinsic rotations to extrinsic rotations results in the same rotation.
Dec
14
comment How to rotate an object around world aligned axes?
I see no contradiction here. Both my answer and that statement are true. And yes, performing rotations in object space and in world space yield different rotations; that’s precisely the point, isn’t it?
Dec
14
answered How to rotate an object around world aligned axes?
Dec
8
answered Angle between two planes
Dec
5
awarded  Civic Duty