Shade - Pro Shader Editing for iOS (Version 1.3 now out)

Shade is our latest app - a powerful node-based shader editor for iOS.

Shade is tightly integrated into both Codea and Unity. Any shaders you create can be directly used in Codea via drag and drop, sharing or iCloud.

We have been working closely with the Codea community throughout the development of Shade, including a private beta and subsequent public beta. Many of the improvements coming to Codea are from Shade’s development. We would like to take this moment to thank everyone in the community for your support, suggestions and feedback.

Get Shade here: https://itunes.apple.com/app/id1402522815

More info at: https://shade.to

Loaded the above version of Shade. So far so good.

@John One thing I noticed with the above Shade code. Open one of the examples, then wait for the map in the lower left corner to disappear. Place your finger where the map was and move your finger. The map will reappear, but the highlighted square will move in the opposite direction that your finger is moving. If you lift your finger and put it back down, the highlighted square will then move in the same direction as your finger. No big deal, but just odd.

@dave1707 that’s because when the map is not there you are dragging the canvas, and dragging the canvas makes the map re-appear, but you are not interacting with the minimap, it is still displaying how the canvas is moving. When you drag on the minimap directly it moves the canvas inversely because you are dragging the viewing region

Shade’s marketing website is very slick. Looking forward to the same for Codea :wink:

@distortum thank you, I want to redo the Codea one now with the same sort of template

I cant get the export of shaders to Codea working. When opening the exported shader in Codea it is just an empty file.

How can I get this to work? Anyone else having the same issue?

@janalex Here’s how I do it.

  1. From within the Files app, open the Shade folder.
  2. Long press a shader. When the popup shows, select Copy.
  3. Open the Codea folder.
  4. Open the Dropbox Assets folder.
  5. Long press a blank area. When the popup shows, press Paste.
  6. Run Codea and the Shader should be in the Codea Dropbox folder.

Here’s an example to use. Replace Dropbox:Checkers with your shader.

function setup()
    -- uses a shader from Shade.
    scene = craft.scene()
    skyMaterial=scene.sky.material
    skyMaterial.sky=color(0, 62, 255, 255)
    skyMaterial.horizon=color(99, 255, 0, 255)
    v=scene.camera:add(OrbitViewer, vec3(0,0,0), 100, 0, 200)
    v.rx,v.ry=20,20
    createRect1()
end

function draw()
    update(DeltaTime)
    scene:draw()    
end

function update(dt)
    scene:update(dt)
end

function createRect1() 
    local c1=scene:entity()
    c1.position=vec3(0,0,0)
    c1.model = craft.model.cube(vec3(10,10,10))
    c1.material = craft.material("Dropbox:Checkers")    
end

To be sure, is the only difference between Standard and Pro pricing the ability to also export to Unity? Does the Standard version have everything for use with Codea?

@brianolive I know I’ve answered this on twitter but for anyone else interested in this question: Shade Standard works fine with Codea but lacks both zip and Unity export. The zip option is useful for exporting to other devices but isn’t necessary if you just want to use it with Codea.

@brianolive also it doesn’t matter if you purchase Standard, you can always upgrade to Pro for the price difference later

Thanks @John and @Simeon - I purchased Standard the same day I asked the question. I’ll be getting to work in Shade soon - can’ pull myself away from projects in good ol’ Codea…

@John, may i cheekly request that one of your future shade shaders examples could be an implementation of the @yojimbo2000 @LoopSpace disintegration shader (with gravity), as discussed here: https://codea.io/talk/discussion/6659/explosion-shader-code-video

I would love to have it available in Shade, if that is even possible.

@piinthesky John actually made something like this a while back https://twitter.com/johntwolives/status/1085081157031452678

@John, @Simeon is that shade graph available somewhere? Could it be generalised to ‘explode’ an arbitrary 3D model? (I want to explode my submarine if it crashes into a sphere).

@Simeon I was playing with the latest Shade version and I ran into the below error on 2 different occasions when I selected Close Shader. I couldn’t make it happen trying to retrace what I was doing each time. When I would press Try Again, it worked OK.

@piinthesky This particular effect relies of special information baked into multiple uv channels (I used Houdini to do this).

The original explosion effect that you’re referencing uses custom vertex buffers for storing each triangle origin and trajectory. Craft models don’t support that but we could potentially bake in the origins in Codea when the model is loaded.

I’ll see if I can come up with a working example soon.

@John thanks for considering it

@dave1707 - the demo you published in this thread, regarding loading a shader from Shade, doesn’t work on my system. Do you really load a shader as a craft.material ?

Also I have transferred the Ocean shader, which works fine on Shade into my Dropbox asset folder within the Codea folder and it is there but not visible in Documents accessed through Codea - and there is no sync on the top of the Documents folder window. How do you get the system to recognise the shader does it need renaming, unzipping?

@Bri_G yes use craft.material(). i copied to the codea folder, so it is accessed via “documents:xxx”. No unzipping/renaming necessary. Try exiting codea and restarting, i think it didn’t show up first time for me.