GLSLUnit - A unit testing framework for WebGL Shaders written in JavaScript

1,384 views
Skip to first unread message

Roy Williams

unread,
Nov 3, 2011, 6:21:01 PM11/3/11
to WebGL Dev List
I work at Google on the MapsGL effort, and as part of launching MapsGL
we decided to launch a unit testing framework we wrote for our
shaders. Shaders can get hugely complicated and bug prone, and don't
provide a great way to debug them. GLSL Unit hopes to change that.

Check out our demo application here:
http://glslunit.appspot.com/

Source code is here:
http://code.google.com/p/glsl-unit/

Also, I'd love to talk about this at the upcoming WebGL Camp in
Mountain View. Have a slot for me to talk with people about this
free? I'd love to get people's feedback on this tool and other tools
they'd like to see to help with WebGL development.

Thanks,
Roy

Henrik Bennetsen

unread,
Nov 4, 2011, 1:15:48 PM11/4/11
to webgl-d...@googlegroups.com
Also, I'd love to talk about this at the upcoming WebGL Camp in
Mountain View.  Have a slot for me to talk with people about this
free?  I'd love to get people's feedback on this tool and other tools
they'd like to see to help with WebGL development.

Will respond directly.



--
OurBricks connects people who need great 3D content with those who can create it. Check this 2 min. introduction video and keep up on Facebook and Twitter.


Patrick Cozzi

unread,
Nov 4, 2011, 7:32:35 PM11/4/11
to WebGL Dev List
Roy,

This is a really nice tool. I especially like that we can test
individual texture reads, function calls, etc. - not just the output
color. People are going to find that so useful!

Currently to unit test GLSL functions, I render a single point to a
1x1 viewport, and make the color white if the function returns what I
expected; otherwise the color is black. Looks like your tool takes
this a few steps farther under the hood. At this point, I probably
have at least 100 of these tests. I'll port them to GLSLUnit in the
next week or two, and let you know my experience.

Regards,
Patrick
--
http://www.seas.upenn.edu/~pcozzi/

Roy Williams

unread,
Nov 8, 2011, 5:55:35 PM11/8/11
to webgl-d...@googlegroups.com
Thanks!  Let me know what you think and what your experience is.  We've found it super useful here.  We'll actually be talking about it at the WebGL Camp next month.

Thanks,
Roy
Reply all
Reply to author
Forward
0 new messages