mirror of
https://github.com/autc04/Retro68.git
synced 2024-06-10 02:29:39 +00:00
fix reflection
This commit is contained in:
parent
00f704871a
commit
b014ba5ba2
|
@ -129,7 +129,7 @@ float ray(int n, float x0, float y0, float z0, float dx, float dy, float dz)
|
||||||
if(hitSphere(x,-1.5f,z, lxn, lyn, lzn, ts))
|
if(hitSphere(x,-1.5f,z, lxn, lyn, lzn, ts))
|
||||||
color *= 0.2f;
|
color *= 0.2f;
|
||||||
|
|
||||||
return std::min(1.0f, color + 0.5f * ray(n-1, x,-2.0f,z,dx,-dy,dz));
|
return std::min(1.0f, color + 0.5f * ray(n-1, x,-1.5f,z,dx,-dy,dz));
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::max(0.0f, dy * 0.3f);
|
return std::max(0.0f, dy * 0.3f);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user