diff --git a/app-proto/inversive-display/src/inversive.frag b/app-proto/inversive-display/src/inversive.frag index 5620210..da2f415 100644 --- a/app-proto/inversive-display/src/inversive.frag +++ b/app-proto/inversive-display/src/inversive.frag @@ -141,11 +141,11 @@ void main() { int frag_cnt = 0; for (int i = 0; i < sphere_cnt; ++i) { vec2 hit_depths = sphere_cast(sphere_list[i], dir); - if (!isnan(hit_depths[0])) { + if (hit_depths[0] > 0.) { frags[frag_cnt] = sphere_shading(sphere_list[i], hit_depths[0] * dir, color_list[i], i); ++frag_cnt; } - if (!isnan(hit_depths[1])) { + if (hit_depths[1] > 0.) { frags[frag_cnt] = sphere_shading(sphere_list[i], hit_depths[1] * dir, color_list[i], i); ++frag_cnt; }