Filters with Visor
Getting to grips with coding for Visor, and yes JRubyArt is a great prototyping tool. Here is this JRubyArt glsl filter sketch translated for Visor.
# ===== Default : Default
@home = ENV['HOME']
@origin = Time.now
@my_image = load_image(File.join(@home, 'texture.jpg'))
@my_filter = load_shader(File.join(@home,'droste.glsl'))
@my_filter.set('sketchSize', width.to_f, height.to_f)
def time
Time.now - origin
end
def draw
background(0)
# Draw the image on the scene
image(my_image, 0, 0)
my_filter.set('globalTime', time)
filter(my_filter)
end
Screenshot:-