Hashing 3D position into 2D position

Posted by notabene on Game Development See other posts from Game Development or by notabene
Published on 2011-02-06T02:33:01Z Indexed on 2011/02/06 7:33 UTC
Read the original article Hit count: 255

Filed under:
|
|
|

I am doing volumetric raycasting and curently working on depth jitter. I have 3D position on ray and want to sample 2D noise texture to jitter the depth.

Function for converting (or hashing) 3D position to 2D have to produce absolutely different numbers for a little changes (especialy because i am sampling in texture space so sample values differs very very little) and have to be "shader-wise" - so forget about branches, cycles etc.

I'm looking forward for yours nice and fast solutions.

© Game Development or respective owner

Related posts about directx

Related posts about textures