7 ms·
Autumn
- CaptainSwing 12y agoreally beautiful.. thanks for sharing
- skrowl 12y agoCool demo. I like it. I'm looking forward to a plugin-free web! Now if only we could get people to upgrade from IE8 and 9.
- melling 12y agoIt feels pretty good to click the link on my iPad and see the leaves. Apple was the last hold out for WebGL. Hopefully, we'll see a big spike in WebGL usage.
- foobarfizzbuzz 12y agoCan you please explain how Apple was the last to hold out for those of us who are ignorant on WebGL.
- uptown 12y agoThey only recently added support on iOS devices: http://caniuse.com/#feat=webgl http://caniuse.com/#feat=webgl
- robin_reala 12y agoIt was disabled by default on desktop before Yosemite too.
- robin_reala 12y agoMozilla were the first to implement (Vladimir Vukićević’s work) with Opera around about the same time. Chrome jumped on board a few years later, and IE as of version 11. Apple was the holdout for basically unknown reasons (they’ve had a working version preffed off for ~5 years now) but the basic assumption is that graphics card drivers needed to be hardened to provide a secure execution environment for shaders. It’s one thing to buy a game and give it root, quite another to load a webpage that could start a WebGL process in the background and load executable code onto the graphics card.
- acdha 12y agoSecurity is definitely the likely candidate (it was for Microsoft as well): even on Yosemite, where they enabled WebGL by default, there's a per-site permissions interface similar to things like location services access.
- pjmlp 12y agoIt is still pretty limited on mobile devices. On my S3 I have to enable it on Chrome and most people are using the native Android browsers. On my Windows Phone, my 3D samples turn into a wireframe models.
- kentf 12y agoBeautiful, thanks for sharing.
- bhouston 12y agoBeautiful. Love the god rays. I believe this actually from last year as it uses http://threejs.org http://threejs.org version 58. :)
- 4ad 12y agoNice demo. Is there any reason why every WebGL demo makes my browser burn the CPUs and drain the battery? Equivalent native code that produces output of the same quality does not have this much of an effect.
- tux3 12y agoIf web sites were allowed to execute native code on your computer, this would be a huge security risk. Instead we have more restricted web languages, but at the cost of performance. Basically.
- 4ad 12y agoWell, first, even assuming JITing JavaScript is expensive and produces expensive code, shouldn't WebGL demos mostly stress the GPU and not the CPU? Second, web sites are not allowed to execute native code, but all the modern JavaScript engines compile down to native code. My intuition tells me to expect the performance of compiled JavaScript to be low, however I have seen endless benchmarks that say that's not the case and JITed JavaScript should be plenty fast. However I feel this disconnect between those benchmarks and reality. The benchmarks say it's fast, while in fact I perceive it to be pretty slow and a resource hog.
- mixedbit 12y agoThis isn't the case with every WebGL demo, only animations need to continuously render. For example WebGL apps that change view only when camera position changes do not require to continuously invoke the render loop and often can have low CPU requirements.
- flohofwoe 12y agoIt depends I think. There isn't any built-in reason why WebGL code would drain batteries faster then a similar native-code demo. WebGL has to do a bit more validation on the CPU which may contribute a bit. But other then that most demos should be very light on the CPU side, so the difference between JS and native code wouldn't be an issue. However, many WebGL demos move a lot of work to the GPU (especially the shadertoy demos, which render the entire scene in a single fullscreen quad and have absurdly complex pixel shaders), epecially in fullscreen mode these would suck your battery dry very quickly. On my fairly old MBP, all fullscreen 3D apps (also native games) kick the fan into high gear immediately and the bottom gets warm very quickly, while most "reasonable" WebGL demos don't have this effect (e.g. some of the lighter ones from here: http://alteredqualia.com/ http://alteredqualia.com/)
- auton1 12y agoOther fun ones here: http://oos.moxiecode.com/blog/index.php/experiments/javascript-webgl/ http://oos.moxiecode.com/blog/index.php/experiments/javascri...
- readerrrr 12y agoPlayable ping-pong: http://oos.moxiecode.com/js_webgl/ping_pong/ http://oos.moxiecode.com/js_webgl/ping_pong/ C64 Music video: http://oos.moxiecode.com/js_webgl/c64_shader/ http://oos.moxiecode.com/js_webgl/c64_shader/ Attack on the Death Star with an X-Wing: http://oos.moxiecode.com/js_webgl/xwing/index.html http://oos.moxiecode.com/js_webgl/xwing/index.html
- mVChr 12y agoSome more of my favorites, these are not only fantastic coding examples but also artistic or humorous. Endless Forest: http://oos.moxiecode.com/js_webgl/forest/index.html http://oos.moxiecode.com/js_webgl/forest/index.html Particle Waterfall: http://oos.moxiecode.com/js_webgl/waterfall/index.html http://oos.moxiecode.com/js_webgl/waterfall/index.html Gold Rays: http://oos.moxiecode.com/js_webgl/godrays/index.html http://oos.moxiecode.com/js_webgl/godrays/index.html Spiders 2 (Hammertime): http://oos.moxiecode.com/js_webgl/spiders_2_hammertime/ http://oos.moxiecode.com/js_webgl/spiders_2_hammertime/ Stopping by Woods on a Snowy Evening: http://oos.moxiecode.com/js_webgl/woods_xmas/ http://oos.moxiecode.com/js_webgl/woods_xmas/ EDIT: R-Type on the SNES! http://oos.moxiecode.com/js_webgl/snes_retro/ http://oos.moxiecode.com/js_webgl/snes_retro/
- dntrkv 12y agoIf you turn on the Gold Rays one in the background and watch the Stopping by Woods on a Snowy Evening one, the music and voice over just go so well together, I didn't realize it was a different tab playing the music at first.
- AshleysBrain 12y agoBeautiful! However I tried it on my Nexus 5 and it looks like a bunch of stuff is turned off and the display is kind of pixellated. Is there a way to run it full-res mode? Modern mobiles have surprisingly powerful GPUs.
- jbverschoor 12y agosuper nice
- dstaheli 12y agoWow, I'm a Chrome user, but I'm impressed with how much better this performs in IE.
- snarfy 12y agoI believe there is an extra layer of indirection in chrome. IE can implement WebGL using DirectX, while chrome uses OpenGL, which under windows is a wrapper over DirectX. This may not be true of all video cards/drivers but I believe it's the default implementation of OpenGL under windows.
- pmr_ 12y agoOpenGL has never been implemented in terms of DirectX on windows. No idea what you are talking about here.
- tsemple 12y agoWhen Vista first came out, Microsoft forced OpenGL to be a layer above DirectX. But they pretty quickly backed down and let people build direct OpenGL drivers again.
- snarfy 12y agoAh, this is where I got it from. I didn't realize they changed it back.
- runeks 12y agoYeah, I know this is true for the AMD driver, at least. Their Catalyst ("fglrx") OpenGL implementation is shared between Linux and Windows, with a fairly low-level wrapper for each OS. [1][2] [1] http://www.phoronix.com/forums/showthread.php?106228-RadeonSI-Gallium3D-Nine-Can-Beat-AMD-Catalyst-With-Some-Wine-Tests&p=440188#post440188 http://www.phoronix.com/forums/showthread.php?106228-RadeonS... [2] http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/AMD_Intermediate_Language_%28IL%29_Specification_v2.pdf http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/...
- zerr 12y agoCan anybody explain what's special about WebGL demos? I mean, don't we already know that WebGL exposes possibilities of OpenGL to JavaScript through browser? Am I missing something?
- malkia 12y agoI was able to see and interact with it, without downloading a binary file, installing it, or directly running it. The demo run just fine (perceivable 10-15fps) on my oldest chromebook - C710. And it is amazing.
- Touche 12y ago> Can anybody explain what's special about WebGL demos? Yes, you are able to see it by clicking a link on news.ycombinator.com. In fact, all articles on Hacker News are viewable by clicking a link. That's why they're here.
- anon1385 12y ago>Am I missing something? No not really. Just web developers being excited that the lords and masters who control their s̶h̶a̶c̶k̶l̶e̶s̶ sandbox have dropped them a few crumbs allowing them to compete with the native software of 1996.
- robin_reala 12y ago1996 was pre-GeForce256. Your timeline is off.
- Igglyboo 12y agoNo way in hell you could do this realtime in 1996, native or not.
- deleted 12y ago[deleted]
- adrianN 12y agoThere are some impressive demos from the late 90's. For example https://www.youtube.com/watch?v=bUm8_b8fIuU https://www.youtube.com/watch?v=bUm8_b8fIuU
- pyre 12y agoMy experience: Ran for maybe 30s and then the tab crashed. Looked beautiful though. Chrome Version 38.0.2125.104 MacOSX 10.9.4 Edit: Didn't crash second time around. Still Beautiful.
- mrjj 12y agoChrome lo-o-oves accident crashes.
- diltonm 12y agoOn Ubuntu 14.04 on Chrome with nVidia GTX-660 it ran smooth and was very beautiful. The CPU usage didn't look bad overall too.
- barrkel 12y agoIt was much smoother in Firefox for me than Chrome (Ubuntu 12.04 with GTX 660).
- miohtama 12y agoWow, smooth on Firefox on Nexus 5! Never seen mobile friendly WebGL before.
- daredevildave 12y agoTry http://swooop.playcanvas.com/ http://swooop.playcanvas.com/ :-)
- srcmap 12y agoworks well in ipad with touch - very nice!
- Igglyboo 12y agoAnyone know why he put all of his scripts in a <font> tag? Is he just trying to hide them or is there an actual reason?
- haihaibye 12y agohttp://davmlaw.github.io/ProceduralGraphics/fall.html http://davmlaw.github.io/ProceduralGraphics/fall.html
- rglover 12y agoStuff like this makes me think about how we'll live in the future. I read the book Ready Player One last year (fun fiction read) and the story is set in a world where most people live inside of a virtual world accessed via VR headsets/suits (e.g. Occulus Rift). Seeing this makes me think of a future when we'll be doing the same and instead of looking at this in a browser, we'll actually be able to stand under a tree and watch the leaves fall.
- Kronopath 12y agoAnd hearing what you say makes me think of a present where I can stand under a tree and watch the leaves fall. Because it's October, the air is cool and crisp, and there's a park nearby. The resolution is much better too. As technologists, we have to make sure not to get too caught up in our own bubble. We have to remember what kind of a job our technology actually does for people, what kind of a role it actually plays in their lives. And I think the VR enthusiasts right now have a tendency to lose sight of that.
- y4mi 12y agobut doing this in the rift would take at most 30 seconds... doing it in real life is an actual chore which takes at least 30 minutes if you also consider the way back.
- lotsofmangos 12y agoA half hour walk to watch leaves in the park doesn't sound like much of a chore.
- tedks 12y agoAre you kidding? Who has time for that? 30 minutes to sit around staring at trees? This rendered like crap in my browser, but I'd probably take a 2.5-5 minute break once a day to look at leaves. That'd probably be about all I could stand. What's the difference between 30 seconds and 30 minutes staring at leaves? They're leaves. They all look the same and they all act the same. They're mostly the same color. They don't do anything interesting. There's a disturbing undercurrent in industrial societies of fetishizing the "natural", and I think that's the only reason anyone would enjoy sitting in the cold looking at a goddamn tree for a half hour -- to make a tribal statement about how ~enlightened~ they are because they can ~appreciate~ the ~beauty~ of ~nature~. I mean, you're probably a developer, aren't you? Your time is valuable. Why waste it looking at a tree? Just keep this open in a small tile on your desktop and glance at it once every few hours if you really like leaf videos.
- Shivetya 12y agoNow if I could only set up items like this to be my desktop background.
- chatmasta 12y agoSeeing this led me to investigate WebGL security vulnerabilities, since the shader code runs out-of-sandbox. Interesting discussion: http://security.stackexchange.com/questions/13799/is-webgl-a-security-concern http://security.stackexchange.com/questions/13799/is-webgl-a...
- zurn 12y agoBy "out of sandbox" you refer to the fact that shaders are statically transpiled into safe code, rather than getting executed in a dynamically memory-safe and sandboxed environment? I agree the approach raises some doubts, as it gives untrusted web content a degree of indirect control over what kind of "safe" shader code gets passed to the GPU shader compilers. But the first-order issues are addressed by the specced security model (https://www.khronos.org/webgl/security/ https://www.khronos.org/webgl/security/).
- chatmasta 12y agoYes that's what I was referring to. I've only read the linked SO discussion, but it seems like security on that compilation step is a focus point for the companies implementing WebGL. Still, any time you're manually bound checking at compilation, there's a chance for error. (A SO comment mentioned something about open acceptance tests for this.) Microsoft says the security is too bad to develop for, but that could be a play for DirectX (whatever it's called now) more than a real security worry. Point is, it seems like a lot of the WebGL security is based on "don't worry, we tested everything!"
- dceddia 12y agoAt first I wasn't sure if there was background noise, or if it was just my laptop fan spinning up. Fun demo.
- emmanueloga_ 12y agoNow, if only I could replace my chromecast stand-by screen with this... :)