tovacinni / sdf-explorer

This is accompanying code for our JCGT / I3D paper, "A Dataset and Explorer for 3D Signed Distance Functions (SDF)".
Other
257 stars 12 forks source link

A couple issues #2

Open XorDev opened 2 years ago

XorDev commented 2 years ago

Elephant SDF has a reference to "pi" which is not defined anywhere else. Secondly, the burger SDF links the wrong shader. The correct version is here: https://www.shadertoy.com/view/WsXSDH Thanks for providing this useful resource!

tovacinni commented 2 years ago

Hi, thank you for pointing these out!

I have updated the link for the awesome burger SDF.

I actually can't seem to find a pi anywhere in the Elephant SDF- is the error happening inside Elephant.glsl?

XorDev commented 2 years ago

Oops, I meant the Temple. Right at the bottom where the rotation occurs. pi is also referenced in the burger shader, but not defined. I imagine this inconsistency exists elsewhere

XorDev commented 2 years ago

Also Dinosaur has a float/int division again at the rotation part. p = p * RotMat(vec3(0.,1.,0.), -(3.14/2));

tovacinni commented 2 years ago

I think the pi is actually a global constant that is defined outside the shader. I forget why we decided on this but I agree there are inconsistencies since sometimes PI or pi is redefined and used. I'll go through the shaders at somepoint and make them consistent!