Spaces:
Running
Running
Pim Schreurs commited on
Commit ·
7610016
1
Parent(s): 3a96fa5
Wormhole no longer renders things inside black hole
Browse filesThere used to be some artifacts inside the black hole when looking at it
through the wormhole. Should be fixed now.
- index.html +3 -6
index.html
CHANGED
|
@@ -345,6 +345,9 @@ vec3 raytrace(vec3 rayPosition, vec3 rayDirection)
|
|
| 345 |
objectDistance = sphereDistance(rayPosition, rayDirection, planet);
|
| 346 |
testDistance(ID_PLANET, objectDistance, currentDistance, currentObject);
|
| 347 |
|
|
|
|
|
|
|
|
|
|
| 348 |
objectDistance = ringDistance(rayPosition, rayDirection, blackhole.xyz, blackhole.w * blackholeDisk);
|
| 349 |
testDistance(ID_BLACKHOLE_DISK, objectDistance, currentDistance, currentObject);
|
| 350 |
}
|
|
@@ -416,12 +419,6 @@ vec3 raytrace(vec3 rayPosition, vec3 rayDirection)
|
|
| 416 |
rayPosition += rayDirection * rayDistance;
|
| 417 |
}
|
| 418 |
}
|
| 419 |
-
|
| 420 |
-
if (startGalaxy == 0 && currentGalaxy > 0.5)
|
| 421 |
-
{
|
| 422 |
-
objectDistance = sphereDistance(rayPosition, rayDirection, blackhole);
|
| 423 |
-
testDistance(ID_BLACKHOLE, objectDistance, currentDistance, currentObject);
|
| 424 |
-
}
|
| 425 |
|
| 426 |
if (currentObject != -1)
|
| 427 |
{
|
|
|
|
| 345 |
objectDistance = sphereDistance(rayPosition, rayDirection, planet);
|
| 346 |
testDistance(ID_PLANET, objectDistance, currentDistance, currentObject);
|
| 347 |
|
| 348 |
+
objectDistance = sphereDistance(rayPosition, rayDirection, blackhole);
|
| 349 |
+
testDistance(ID_BLACKHOLE, objectDistance, currentDistance, currentObject);
|
| 350 |
+
|
| 351 |
objectDistance = ringDistance(rayPosition, rayDirection, blackhole.xyz, blackhole.w * blackholeDisk);
|
| 352 |
testDistance(ID_BLACKHOLE_DISK, objectDistance, currentDistance, currentObject);
|
| 353 |
}
|
|
|
|
| 419 |
rayPosition += rayDirection * rayDistance;
|
| 420 |
}
|
| 421 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
|
| 423 |
if (currentObject != -1)
|
| 424 |
{
|