Sha256: 3b329abdc53e2ef873073d431197981004caf590b4e3170af31450da98e0cc18

Contents?: true

Size: 732 Bytes

Versions: 6

Compression:

Stored size: 732 Bytes

Contents

##
# Monjori. 
# 
# GLSL version of the 1k intro Monjori from the demoscene 
# (http://www.pouet.net/prod.php?which=52761)
# Ported from the webGL version available in ShaderToy:
# http://www.iquilezles.org/apps/shadertoy/
# (Look for Monjori under the Plane Deformations Presets) 

 
attr_reader :monjori

def setup
  size(640, 360, P2D)
  no_stroke
  @monjori = load_shader('monjori.glsl')
  monjori.set('resolution', width.to_f, height.to_f)
end

def draw
  monjori.set('time', millis / 1000.0)
  shader(monjori)
  # This kind of effects are entirely implemented in the
  # fragment shader, they only need a quad covering the
  # entire view area so every pixel is pushed through the 
  # shader.
  rect(0, 0, width, height)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.6.2 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.6.1 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.6.0 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.5.1 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.5.0 samples/processing_app/topics/shaders/monjori.rb