Introducing osltoy

341 views
Skip to first unread message

Larry Gritz

unread,
Nov 30, 2017, 2:11:58 PM11/30/17
to osl...@googlegroups.com
Teaser: 


(if that image doesn't make it through the mail list filters, just visit it here: https://github.com/lgritz/OpenShadingLanguage/blob/lg-osltoy/src/doc/Figures/osltoy/osltoy-fbm.jpg)


The pitch:

You all know about https://www.shadertoy.com/, right? But maybe you thought "I want that... but WebGL, yuck, I want it for OSL!"

Now you have it!

OK, it's rough. Truth be told, this started out as a "can I throw a crazy thing together in one day" project. But I kept hacking on and off for another week until it wasn't too embarrassing, maybe even useful. It still needs work, it will improve with time, but it's definitely good enough to play with, and for others to help if you are so inclined.

Aside: This is an exercise we periodically do department-wide at Imageworks, inspired by Atlassian's famed "FedEx day" idea: http://www.ideachampions.com/weblogs/archives/2011/12/atlassian_is_a.shtml It's a ton of fun and many of the one-day prototypes turn into continuing projects that are useful for production -- highly recommended! Thanks to Pascal Lecocq -- doing this for FedEx was his idea, but he actually ended up doing something different (and also cool) so I decided to pursue this one myself anyway.

So the shocking thing is that you can get OSL shaders to execute in essentially real time (if they aren't *too* complicated). I can get Mandelbrot, or several octaves of noise, at 20-30 fps.

What's the most insane thing you can find to do with this?


You can see the pull request and try out the code here:  https://github.com/imageworks/OpenShadingLanguage/pull/824

If you download that branch, just point a browser at src/doc/osltoy.md.html for the preliminary docs.

--
Larry Gritz
l...@larrygritz.com




Master Zap

unread,
Dec 4, 2017, 7:32:18 AM12/4/17
to OSL Developers
Nice. I will pretend I inspired you :P

/Z

Larry Gritz

unread,
Dec 4, 2017, 3:11:33 PM12/4/17
to osl...@googlegroups.com
It's an idea I've been kicking around for a while, but you definitely helped to light a fire under me to go and actually do it. :-)


On Dec 4, 2017, at 4:32 AM, Master Zap <zap.an...@gmail.com> wrote:

Nice. I will pretend I inspired you :P

/Z

--
Larry Gritz




Reply all
Reply to author
Forward
0 new messages