11,995 reputation
22654
bio website sam.zoy.org
location Paris, France
age 34
visits member for 2 years, 2 months
seen 25 mins ago
stats profile views 917

I live in Paris, France.

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


1d
comment Hexagon collision detection for fast moving objects?
@madshogo You're right. I assumed that the timestep was small enough compared to object sizes that this wouldn't be a problem, but it's certainly not very robust in the general case. I'll look into fixing it.
Mar
29
comment Why is my sky color calculation in Mathematica incorrect?
The question is really too localised and might get closed, but thanks for the paper link, it's interesting.
Mar
28
comment Why are graphics engines writern in C/C++, when games are GPU bound?
This question really lacks acceptability of premises. A lot of the games I know are CPU bound.
Mar
20
comment Why do game engines convert models to triangles compared to keeping it as four side polygon
Being coplanar doesn’t “ALWAYS define a flat plane”.
Mar
11
comment Handling window resize with arbitrary aspect ratios
possible duplicate of Scaling a game view with letterboxes?
Feb
25
comment limiting jump forces to achieve a maximum jump height
Note that applying a force for a long time is not jumping, it’s more like some kind of thruster effect.
Feb
17
comment How can I replicate the color limitations of the NES with an HLSL pixel shader?
This is not the NES colour palette at all. The NES didn’t use 8-bit RGB, it used a fixed palette of about 50 to 60 colours in the YPbPr space.
Feb
17
comment What's the best way of translating a 2D vector into the closest 8-way compass direction?
A map with float2 as the key? This doesn’t look very serious.
Feb
14
comment What's the best way of translating a 2D vector into the closest 8-way compass direction?
+1 by the way, I really think this is the most straightforward and rigourous answer.
Feb
14
comment What are the main requirements to port a game to Linux
About Valve, note that they hired Sam Lantinga, the original author of libSDL.
Feb
14
comment Animate part of .3ds object using lib3ds library
@Sidar I approved your edit and further removed the signature at the bottom of the post, so it's that second edit that appears. You can still see yours in the history.
Feb
14
comment What's the best way of translating a 2D vector into the closest 8-way compass direction?
It's perfectly OK to answer your own question. But I would consider not using atan2 to be a bad decision; your code is a lot longer and difficult to understand. It's also... very wrong: where did you get these 0.5 and 2 values? You would probably need sqrt(2)/2 and sqrt(2)+1 instead.
Feb
14
comment What's the best way of translating a 2D vector into the closest 8-way compass direction?
Note that it's usually atan2(y,x), not atan2(x,y).
Feb
13
comment Using two FBOs results in the second FBO having nothing drawn to
Have you tried gDEBugger maybe?
Feb
12
comment 3D isometric depth sorting
The reason no algorithm seems to handle what you are looking for is because there is no such algorithm. It's not possible to Z-sort tiles in the generic case. Even in a situation where there is a solution, it may be hard to find it (look for "topological sort"). The obvious option is to use a Z-buffer.
Feb
12
comment Jagged transparency when rendering translucent textures (OpenGL 3.2 + GLSL)
You are right. I used the wrong argument order. Thanks, answer fixed!
Feb
11
comment Jagged transparency when rendering translucent textures (OpenGL 3.2 + GLSL)
smoothstep may not be necessary at all; but its purpose here is to avoid any visible discontinuities when the alpha is near 0.1, by stretching these values to 0.0 using a smooth curve.
Feb
11
comment Lerp vs Vector math: one better than the other?
In your first example you mention a "desired distance", yet in the second one you use a "speed value". Can you maybe clarify? Anyway, lerp() is only one scalar-vector multiplication and a few additions; it should be extremely fast.
Feb
3
comment What book/guide should I follow for GLSL
I second the above comment. From what you explain it seems you’d also need something like this book (don’t pay attention to the ugly cover; the content is excellent).
Feb
2
comment vec4 for vec3 multiplication while calculating the specular value
@RamyAlZuhouri Usually the alpha value does not come from the same light calculations as the colour value. You can certainly set it to 1.0 if your object is supposed to be opaque.