Sha256: 0bc9acbb33a9840b787368d58a483054ecf07498e37f89faf41bac7e65216ba9
Contents?: true
Size: 806 Bytes
Versions: 1
Compression:
Stored size: 806 Bytes
Contents
# # Elevated # https://www.shadertoy.com/view/MdX3Rr by inigo quilez # Created by inigo quilez - iq/2013 # License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. # Processing port by Raphaƫl de Courville. # attr_reader :landscape java_alias :background_int, :background, [Java::int] def setup size(640, 360, P2D) no_stroke # The code of this shader shows how to integrate shaders from shadertoy # into Processing with minimal changes. @landscape = load_shader("landscape.glsl") landscape.set("resolution", width.to_f, height.to_f) end def draw background_int 0 landscape.set("time", (millis/1000.0).to_f) shader(landscape) rect(0, 0, width, height) frame.set_title "frame: #{frame_count} - fps: #{format("%.2f", frame_rate)}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-processing-2.4.4 | samples/processing_app/topics/shaders/landscape.rb |