New to shaders - mirror/kaleidoscope effect

Hi

I am quite new to shaders, but am very interested in applying mirror/kaleidoscope effects to my existing sketches.

I want to be able to achieve effects similar to the one in this video from Benjamin Fox https://vimeo.com/126321193.

Does anybody have good references or links to examples?

Hints for good tutorials (for Processing users) for learning more about how to write my own shaders would also be much appreciated!

Cheers Andreas

Answers

  • edited February 2016

    Jason K. Smith has a really nice kaleidoscope on his site beautifulprogramming.com.

    http://beautifulprogramming.com/endless-kaleidoscope/

    He helpfully includes his code.

  • Great, thanks!

    I was also thinking something along the lines of GLSL shaders. How would you actually do write such a shader and implement it to an existing sketch?

  • edited March 2016 Answer ✓

    check the texture shader example in the glsl tutorial:

    https://processing.org/tutorials/pshader/ (Code listing 5.1)

    you can see the vert shader calculating vertTexCoord and passing it to the frag shader and the frag shader working out the colour from the texture based on that.

    you could probably modify either the vert shader or the frag shader so that the texture coords map to a rotation and/or a reflection of the texture for the original triangle.

    but i can't really see much benefit tbh. i've written tiled kaleidoscopes before and each triangle uses the same three texture coordinates in slightly different orders. each hexagon is identical, the tiling is just a displacement. i used opengl display lists for the first one (2003...) and just standard vertex and texture coord lists for the android version (2014).

    vimeo.com/40643944
    vimeo.com/40291692
    

    (um, vimeo links aren't showing. have added them as 'code')

Sign In or Register to comment.