Re:WebGL Path Tracing
by hebejebelus on Wednesday August 10, 2011 @09:18AM
(#2868012)
That's fantastic. I've been meaning to get into WebGL (perhaps make some sort of tech demo game with it). I've held off because of performance issues (also, I admit, I'm not too excited about dealing with shaders).
I think I should stop procrastinating now and actually do something with it. This is very exciting!
Re:WebGL Path Tracing
by dualogy on Wednesday August 10, 2011 @09:22AM
(#2868032)
Shaders are fun! Looks a bit like "scary c++" at first but not too steep a learning-curve actually. No header files, pointers and the likes. Just a couple of maths functions and maths types (vec3, float etc). Pixel shaders return a "color" vector, vertex shaders a vertex "position" and "that's about it".
Re:WebGL Path Tracing
by daeken on Wednesday August 10, 2011 @01:12PM
(#2869189)
I learned the basics of OpenGL from NeHe many years ago, and while things have gotten better, I can't recommend the site anymore. It's all written for old-school OpenGL (3 and below) and is generally a compendium of what you shouldn't do when writing OGL code. I still love it, but it's a bad resource for people new to OGL.
Re:WebGL Path Tracing
by daeken on Wednesday August 10, 2011 @04:49PM
(#2870126)
The Orange Book, Red Book, Lighthouse3d tutorials, and general experimentation. One nice thing about WebGL is that the cruft is largely gone, due to its ES parentage. This means that a lot of old tutorials are completely irrelevant, but that you can safely use just about everything without running into horrible practices. (Not that there aren't plenty of pitfalls left.)
Re:WebGL Path Tracing
by crazygringo on Wednesday August 10, 2011 @11:51AM
(#2868762)
This is one of the coolest things I've seen all year, without exaggeration. The gradual rendering alone is new to me (and utterly fascinating), but the fact that diffuse lighting can be rendered in a browser... this completely redefines what I understand a browser to be capable of. Seriously amazing.
Re:WebGL Path Tracing
by aidenn0 on Wednesday August 10, 2011 @12:40PM
(#2869035)
If you haven't seen path-tracing before, you should check out LuxRender: http://www.luxrender.net/ It's an open source unbiased renderer that uses similar techniques.
It's a massively parallel problem, so the recent abilities to run general purpose code on a graphics accelerator has really been a huge boost to performance something like: http://www.youtube.com/watch?v=70uNjjplYzA would have been impossible before CUDA came out.
Re:WebGL Path Tracing
by dualogy on Wednesday August 10, 2011 @09:19AM
(#2868025)
Seems like a general WebGL issue -- I've seen most WebGL examples hang up or freeze on integrated graphics / Intel graphics but they always run absolutely smoothly on "full-blown" gamer-like GPUs (nVidia etc.) Unless your nVidia is on a MacBook but running Linux instead of OSX und thus odd drivers.
Re:WebGL Path Tracing
by sonnyz on Wednesday August 10, 2011 @10:43AM
(#2868424)
Worked great for me until I switched tabs back to HN to read comments. My screens instantly went black while my video card driver thew up all over my desk.
I think I should stop procrastinating now and actually do something with it. This is very exciting!
It's a massively parallel problem, so the recent abilities to run general purpose code on a graphics accelerator has really been a huge boost to performance something like: http://www.youtube.com/watch?v=70uNjjplYzA would have been impossible before CUDA came out.
http://madebyevan.com/about/
I've been struggling to complete a web page app like this for a while, and he has finished several even though he's still in school.
javascript:ui.setObjects(makeRecursiveSpheres())
in the location bar with the page open and you'll really torture your graphics card.