-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make portals usable and intuitive #9
Comments
Fixed scene switch compatibility with the interpolation routine! |
Update: Materials are being unnecessarily rebuilt at every frame by Three, slowing down the render call (experimentally by a factor > 2). More about it here: Portals linking between the same scene won’t be available before this performance issue is addressed. |
Removed support for water reflexion in Firefox due to this. |
So there is a workaround to fix this performance issue: do material instancing.
(-> 3x speedup!) Similarly, for looping portals, use as many different materials as there are different portal cameras:
|
Fixed water reflection performance in 7ec5b19 (this also fixes the 1-frame latency for 1-involution portals!) Remaining to do:
(perf:)
|
Portals
Two different portal guns should be available:
One that opens a window that is automatically linked to another world (implemented).
One that links two portal ends (p1p2) on-demand (like in Valve’s game, not yet implemented).
Needed to make the system robust and usable
A rendering system that solves some level of portal recursion, and also that uses stencil masks for performance, is already available, but the following bricks are still missing.
These are somewhat long-term bricks:
two portals linking in the same scene/world
on-demand portals (p1p2)
portal camera rotation, when p1’s rotation differs form p2’s
compute the chain transformation for recursive rendering: position (trivial) + rotation (less trivial)
compatibility with scene shadows (this will be tough to get working)
Needed first
These are the more "pressing" issues:
Therefore we need client-wise portal collision detection (just copy the code from the server), and to check for portal collision in the interpolation routine, when a flag
needsToSwitchScene
is set.Performance: pre-allocate scenes, render target and composers to avoid lag when crossing a portal for the first time.
Make a portal helper (with the raycaster on close chunks).
The text was updated successfully, but these errors were encountered: