I am having trouble in my pixel shader's reflections https://www.shadertoy.com/view/lsycD1, I cant get them to work, currently they are inside my main's render loop and are almost displaying what I want but not really, I have tried using reflect( rayDirection, position ) or reflect( rayDirection, normals ) but none of them seem to work, if anybody has an idea I'd be pleased, thanks!
// Normalized pixel coordinates (from -1 to 1)
vec2 uv = ( -iResolution.xy + 2.0 * fragCoord ) / iResolution.y;
vec2 mou = iMouse.xy / iResolution.xy;
if( mou.x == 0.0 ) mou = vec2( 0.4, 0.3 );
vec3 ro = 4.0 * vec3( sin( iTime * mou.x ), mou.y, cos( iTime * -mou.x ) );
vec3 ww = normalize( vec3( 0.0 ) - ro );
vec3 uu = normalize( cross( vec3( 0.0, 1.0, 0.0 ), ww ) );
vec3 vv = normalize( cross( ww, uu ) );
vec3 rd = normalize( uv.x * uu + uv.y * vv + 1.5 * ww );
//vec3 rd = normalize( vec3( uv, -1.0 ) );
float t = 0.0, d = EPS;
for( int i = 0; i < STEPS; ++i )
{
d = 0.5 * map( ro + rd * t ).x;
if( d < EPS || t > FAR ) break;
t += d;
// Here is where the problem is:
if( map( ro + rd * t ).y == 0.0 )
for( int j = 0; j < 64; j++ )
{
if( t > FAR ) break;
rd = normalize( reflect( rd, norm( ro + rd * t ) ) );
d = 0.5 * map( ro + rd * t ).x;
t += d;
}