Corona Shader Playground from your web browser!

You can play/experiment with Corona custom (fragment) shaders from a webgl-enabled browser. This includes being able to write your own shader code and live previewing them, among other things:

https://shader.coronalabs.com/

To share the shader code, click “Generate share link”

Since Lua means “moon” in Portuguese, here’s one of a rotating moon:

https://shader.coronalabs.com/#shaders/moon.frag&textures/512/moon-diffuse.jpg&%5B0.005,0.01,-0.3,1.5%5D

Ah, cool.  :slight_smile:

How far is the compiler from what would show up in an HTML5 build?

I’ll test my fragment-only shaders when I get the chance.

Argh, looks like more of mine depend on vertex shaders than I thought.  :stuck_out_tongue: (Also, I have some “outline” ones that are rather pointless with opaque textures.)

That said, all the fragment-only ones seem to work well:

Bump

Bump (stone)

Bump (texel size)

Circle (basic) (This is meant to be put on a circle display object; it doesn’t bother to discard outside pixels.)

Circle (bumped)

Simplex2 (basic) (Basically the same one from the other thread / Code Exchange; noise adapted from Ashima Arts)

Sphere (basic) (The circle one, but discarding)

Sphere (bumped)

Sphere (fractional Brownian motion) (Everything from here on is adapted from Ashima Arts and / or Stefan Gustavson)

Sphere (flow noise)

Sphere (spots)

Sphere (tiles)

Worley2 (1 - scaled x)

Worley2 (facets and dots)

A lot of the noise samples aren’t time-dependent, but have time-updated parameters in the associated demos (and look pretty cool).

N.B. If you fiddle with the CoronaVertexUserData parameters in certain effects, a few will interpolate  REALLY weirdly since they consist two [0, 1]-range numbers encoded together (fun with cramming into four values!).  :smiley:

Really cool!