WebGL

Google Chrome as a plugin?

Udart's picture

So I have used the nice CoGeWebKit plugin but what I would really love was the ability to use a WebGL output in a Quartz context. If you don't know webGL check out some of the mind blowing stuff that has been created with e.g. the three.js api. Unfortunately this plugin does not activate webGL. Besides I have heard that Chrome performs the best overall.

So I was wondering if it would be possible for someone knowledgable to take a look at the source of the 'Chromium embedded Framework' example and get something working? I thought perhaps the overall concept and input/output scheme of the WebKit plugin could be used.

Excuse me for writing this in the Kineme forum but there are so many people with Quartz knowledge around here. I know only about web development and I am no good in XCode. So I can only post this hoping someone will be curious and have a look at the code.

CoGeWebKit project: http://code.google.com/p/cogewebkit/

Chromium Embedded framework bare bones example http://blog.erikd.org/2013/01/14/chromium-embedded-framework-3-bare-bones/ (link to github included)

Ashima Noise External Texture Warp (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NonCommercial
Date: 2012.06.25
Compatibility: 10.4, 10.5, 10.6, 10.7
Categories:
Required plugins:
(none)

This is a GLSL shader that is a "texture warp/distortion" effect.

It uses the Ashima Noise implementation that's been kicking around lately, that I particularly like and think looks nice and organic.

I'd used it for generating patterns, but had the idea a month or so ago to use the noise to perturb in input texture - which didn't occur to me at first since the whole deal was that it's a "textureless" noise implementation, but I'm glad it did!

After I had that hanging around for awhile, I decided to add some simple "feedback" loop facilitated lighting, which has a kind of eerie look :-)

I've been able to generate really cool looking abstract landscape type looks by feeding textures that have those kind of colors going on, and macerating the texture to taste. I've also achieved some pretty gross "melting flesh"/"monster" looks as well. I've had some fun with this filter in the past while, and I hope you all do as well. :-)

Go through the "Mode" values to checkout the various basic looks, 4 Modes in all.

"Amount" will increase the amount of the rippling, while "noiseFreq" will tend to increase the density of rippling per area.

"Speed" controls the pace of distortion fluctuation.

"Bump" will do some stuff to the .z channel to mess with the lighting a bit in modes where it's active.

"Spot R1/R2" control the throw of the mouse active light.

"gammaOn/gamma" controls gamma (psonice's gamma code...if it works, why not use it?).

Then there's some color channel offset stuff.

GLSL Sandbox

psonice's picture

Not directly QC related, but I'm sure some of you will love this :)

It's a site where you can create shaders in a browser with WebGL. The shader displays in the whole window (it just draws a single window-sized quad), with a code editor overlay for you to write your shader in. It provides a few uniforms for animation (time, mouse position + screen res), and you can save (it gets added to the gallery automatically, and there's versioning built in).

Current address (might change, not sure) is: http://glsl.heroku.com

It's under heavy development still, so it'll probably improve loads. It was made by one mr. doob who I guess some of you will have heard of, if not you should look him up, he's done some really cool work :)

WebGL / Shader Toy

psonice's picture

It seems the web is about to get a lot cooler! Webkit, firefox and chrome now support WebGL (at least in the nightly/beta builds, if you enable it..) It's effectively accelerated opengl es 2.0, embedded in a browser. That means you can do full 3d, including shaders! \o/

If you want to play with it, you'll probably want to download the webkit nightly build from http://www.webkit.org and enable it by running this in terminal:

defaults write com.apple.Safari WebKitWebGLEnabled -bool YES

Then why not have a play with 'shader toy' that IQ made:

http://www.iquilezles.org/apps/shadertoy

He's even included a selection of 1kb/4kb demos in the presets :)