Sha256: eef7e399d7163ed466679a21dab0b37a616652b2deffc281f47d2a025a9f5d0e

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 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 = loadShader("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

4 entries across 4 versions & 1 rubygems

Version Path
ruby-processing-2.4.4 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.4.3 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.4.2 samples/processing_app/topics/shaders/monjori.rb
ruby-processing-2.4.1 samples/processing_app/topics/shaders/monjori.rb