Bug: the gbuffer depth texture only includes the thin instances when mesh.freezeWorldMatrix() is called. This might be related to gBuffer doesn't handle thin instances properly (whose fix is still working, so it was not a regression).
“Please, bruno, tell me that you made a PG this time that reproduces your weird bug”. Well, I got a PG that DOES NOT reproduce it https://playground.babylonjs.com/#217750#66 does not reproduce it, but is as close as I could get to real code and it works perfectly well. I also tested disabling autoClear, which is commented out in the PG but didn’t reproduce the bug either.
a quick fix is to add “cross-env”: “latest” to devDependencies (or install globally) and then change any npm task starting with “NUXT_HOST…” to “cross-env NUXT_HOST …”.
Not related, but probably generally helpful, I have to do this all the time for scripts that use NODE_ENV
Its part of the npm script, all its doing is setting an environment variable. You could actually delete it probably. Chrome on windows sometimes doesnt open 0.0.0.0 as localhost , it seems to change version to version.
Sorry, I don’t use windows. NUXT_HOST is an environment variable. I think you can ignore it and just run nuxt, it’s there to accept connections from external hosts instead of binding to localhost.
I can also publish a test page on the public site. But it’ll be compiled in production mode, so crappy traces. Is that helpful?
I think it could be helpful for evgeni and others on windows that arent so familiar with the node ecosystem. On windows, to set env variables you have to prefix it with set , for ex “dev”: “set NUXT_HOST …”. The cross-env cli tool just makes it work on both linux and windows consistently.
What, how can you people write Typescript and not use node and those awful JS builders? I miss just adding <script> so much! How can you live without webpack and babel and where do I sign to do the same?
Sorry, I thought this would be trivial to build in any platform. Laje de Santos em Realidade Virtual is online now. Fish around you are generated randomly, so please rotate the camera if they’re not immediately visible.
incredible photos @brunobg . i’m a Rescue Diver, but never been to Brazil - thanks for sharing. Cool website - really enjoyed reading the technical page and also impressive what you did with caustics. This is one of my favourite webgl articles on caustics even though it was made >10 years ago: Rendering Realtime Caustics in WebGL | by Evan Wallace | Medium
ps: All of my vue is vue3 and in TypeScript. It’s a great way to work with Vetur and once you get past a learning curve!
Thank you @brianzinn! I have a ton of other photos and videos to upload, but haven’t had time to process them yet. Brazil has some nice dive spots, and this one has some sentimental value because it took part in the earliest days of diving here, as well as becoming the first marine park.
Thank you! I’ll update that page very soon. The new material plugins made caustics much easier and faster to do, and avoids a second render per frame.
I love Vue, but that build stuff is always awful. JS somehow managed to become a dynamic compiled language
It’s a problem with the world matrix passed by the geometry buffer renderer, which is (1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1) whereas the one used for the regular display of the fishes is (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1).
I tried to reproduce the bug in https://playground.babylonjs.com/#WGZLGJ#4430 but it does work there (it does not work in 4.2.1 because the geometry buffer renderer did not handle thin instances at all in that version).
I just tried it with beta-11 and it doesn’t seem fixed. “seem” because there may be a separate regression where models are not rendered at the same place as in beta-5, although the issues might be linked.
First, short digression that may help to pinpoint the problem given @Evgeni_Popov 's answer about the world matrix. I’m fixing some weird model issues (glb exported from Blender has negative scaling in one axis and some bizarre base rotation) manually:
I didn’t bother to understand why this is happening on the export since this “reset” works, but this probably explains the discrepancy of the matrices. In fact, the freezeWorldMatrix() from the original report is even weirder, since I’m making these updated after that call. But with this code and beta-5 the instances are rendered in world coordinates as expected:
BABYLON.Matrix.ComposeToRef(
new BABYLON.Vector3(1, 1, 1),
orientation, // some quaternion
boid.position, // in world coordinates
m
);
m.copyToArray(bufferMatrices, i * 16);
With beta-11 this doesn’t happen anymore. And this doesn’t happen only with instances, another model that I load (loadTurtle in the Github code) and apply the same reset is rendered at a completely different location with beta-11 compared to beta-5.
BTW, is there some easy way to run the online PG with a previous alpha/beta version? It would make it easier to show this regression.