The current title here on HN of “Firefox in Unity” is incorrect. This is based on Servo, not Firefox. From what I understand as a very casual observer that hasn’t been keeping up with things, Servo’s architecture is rather more conducive to this application both in embedding convenience and rendering, being able to render pages in a way that will make them perfect quality regardless of your 3D perspective, whereas I imagine Firefox <i>might</i> still be at the “rasterise the viewport and use it as a tile” level, though maybe WebRender (applying Servo’s renderer to Firefox) has resolved that? As I say, I haven’t been keeping up with things. Anyway, the correct title for the article is “A browser plugin for Unity”.
This is something I've wanted for years, for numerous uses like collaboration, Method of loci, and documentation. Overlaying our built-in spatial awareness with focused data is an area of information architecture with a lot of untapped potential.<p>there is also this which allows multiple windows within unity (there's a demo you can try): <a href="https://zenfulcrum.com/browser" rel="nofollow">https://zenfulcrum.com/browser</a>
I remember when this sort of functionality arrived in Second Life.<p>It enabled a lot of easy 'shared experiences'. eg: Watching a live video stream of an event with people, or group presentations etc.
As the author of the first web browser plugin for Unity (HTMLTexture) I must say I'm very impressed by this. Kudos.<p>Sounds like Unity has changed enough under the hood that the technique I used (calling gl_bind() behind Unity's back, using the texture ID you pass in, to basically write to the texture Unity is using for your mesh) no longer works.
For anyone else looking to embed a modern browser in their Windows/macOS/Linux* C++ application, you might consider Dullahan: source: <a href="https://bitbucket.org/lindenlab/dullahan/src/master/" rel="nofollow">https://bitbucket.org/lindenlab/dullahan/src/master/</a> and example screenshot: <a href="https://bitbucket.org/lindenlab/dullahan/raw/master/docs/webcube.png" rel="nofollow">https://bitbucket.org/lindenlab/dullahan/raw/master/docs/web...</a><p>I recently updated it to use Chromium 81 and would have updated it to the most recent version (84) if there weren't some non-trivial changes needed to make video/audio streaming work again.<p>It's what we use in Second Life and would welcome other users' comments to help improve it.
I'm sure having a browser in game as a million uses but ...<p>Oculus Rift has in game browser built into their OS. In any game and any time I can pull up a browser in VR (or any desktop app). Pin a walkthru up. Pin up video chat with a friend.<p>It seems like browser in VR would be better served at an OS level. The OS could provide a way for the app to request VR be placed in the scene. Ideally it happens in a way the app can't look at the screen since a game shouldn't be able to look at the contents of your browser window.
>As we do not have control over the binding of the texture and the Unity context, the current design for updating this texture uses a blit (copy) via Servo’s surfman-chains API<p>I don't think this is necessary. You should be able to make Texture objects that ref existing native textures in Unity and I've been able to use OES_EGL_image_external extensions to sample Android decoded video textures sampled from Unity shaders.<p>Its not the most widely available option but the perf is much better.