Live data from Hacker News

WebGL Water

madebyevan.com

71–80 of 119 posts

Re: WebGL Water

#71
I'm disappointed "toggling gravity" doesn't actually toggle gravity, just changes the density of the ball.

Edit: Looks like I'm wrong about the density. When you load the page the "gravity" of the ball is actually off (but it's at the bottom, so it looks like it's on and dense), and pressing G lets it float up.

It's not turning off gravity though. If there was no gravity, the water wouldn't pool at the bottom, so I was hoping to see blobs of water floating around.

Re: WebGL Water

#72
post #13

It's interesting to think of the reasons we don't have browser-based 3D renderers. Sure, WebGL exists. But it seems like the promise fizzled out, and I'm not quite sure why. Maybe it's as simple as "Steam is the money pipeline, and everyone makes native games on Steam."

Easy, so many reasons beyond just blaming Apple, - WebGL is a subset of ES 3.0, when the hardware can do GL ES 3.2 - WebGPU, when it arrives sometime during 2022, it will be a 1.0 MVP of the features from Metal, Vulkan and DX 12, with yet another shading language that looks like a mix of C++/HLSL/Rust, WGSL. - If you just want compute, now WebGPU is the only option, although GL ES 3.2 has it. After two failed attempt…

Chrome and Safari both have WebGL debuggers that let you see all the API calls made IIRC. It's not RenderDoc but it's not that bad?

Re: WebGL Water

#73

It's interesting to think of the reasons we don't have browser-based 3D renderers. Sure, WebGL exists. But it seems like the promise fizzled out, and I'm not quite sure why. Maybe it's as simple as "Steam is the money pipeline, and everyone makes native games on Steam."

We do have browser-based 3D renderers, but it's always several years behind the state-of-the-art in terms of what you're allowed to do with the hardware, so I think it tends to only appeal to indie developers like me…

Re: WebGL Water

#74
post #71

I'm disappointed "toggling gravity" doesn't actually toggle gravity, just changes the density of the ball. Edit: Looks like I'm wrong about the density. When you load the page the "gravity" of the ball is actually off (but it's at the bottom, so it looks like it's on and dense), and pressing G lets it float up. It's not turning off gravity though. If there was no gravity, the water wouldn't pool at the bottom, so I w…

mmmh first thing I tried was putting the ball outside the water and it levitated there. Technically speaking yeah, it could still just be density even in that case, but it would also make sense as gravity (indeed the ball felt into the water as soon as I activated gravity).

Re: WebGL Water

#75
post #71

I'm disappointed "toggling gravity" doesn't actually toggle gravity, just changes the density of the ball. Edit: Looks like I'm wrong about the density. When you load the page the "gravity" of the ball is actually off (but it's at the bottom, so it looks like it's on and dense), and pressing G lets it float up. It's not turning off gravity though. If there was no gravity, the water wouldn't pool at the bottom, so I w…

Huh? When I toggle G, the ball is locked in place. Not exactly what I'd call "toggling gravity" (except for very large masses), but it's sufficiently useful (I can toggle G and then drag the ball our, wait for the water to settle and then drop it with G).

Re: WebGL Water

#76
post #39

Kinda funny that if I move the ball out of the water slowly, it generates a lot of waves, but if I shoot it in the water or out, it's just a small wave. A few times I was able to yank the ball in or out with no trace at all—though that can perhaps be chalked up to the cursor moving too fast to register the intermediate positions.

This can be solved by doing the following: instead of checking "currentPosition" and "futurePosition" for a collision per frame, instead compute a sphere using those two values as bounds, and check if there are any collisions within that sphere

By converting the whole ball movement into an object, you end up with a "pill".

Re: WebGL Water

#78
post #42

I just went through comments from all the times this has been reposted in the past 10 years, and this is (so far) the first time there aren't any complaints about not working in their browser! I'm counting just the submissions that got >10 comments. The previous time, from 2017[1], was already quite good - there was only a single complaint, and that was about someone missing a WebGL extension this needs for floating…

Getting:

"Uncaught Error: This demo requires the OES_texture_float extension"

That's a Mozilla browser on Android though.

Re: WebGL Water

#80

Earlier quoted context omitted.

Please keep this reddit-tier lack of contribution to the discussion on, well, reddit. It's bad enough that discussion over there is flooded with puns, song lyrics and people calling everything wholesome, do we really need to drag every discussion forum on the internet down to that level?

Comments like this that spew negativity don't make HN a particularly inviting place either. Remember there's a human sitting on the other end.

All internet "forums" have a human sitting at the other end, why do you feel the need to mention there's a human sitting on the other end? GP wasn't really "spewing negativity", just discouraging a certain culture of discussion that is genuinely bad (and uncommon) for HN.
Post reply on HN