tovacinni/sdf-explorer

A couple issues

XorDev opened this issue · 4 comments

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!

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?

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

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

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!