Sha256: d708958571055a486c09a71b5c2b183e40fa3cbf9e3b921c5e929b0de456a263
Contents?: true
Size: 458 Bytes
Versions: 6
Compression:
Stored size: 458 Bytes
Contents
attr_reader :nebula def setup size(512, 384, P2D) @nebula = load_shader('nebula.glsl') nebula.set('resolution', width.to_f, height.to_f) end def draw nebula.set('time', millis / 1000.0) shader(nebula) # The rect is needed to make the fragment shader go through every pixel of # the screen, but is not used for anything else since the rendering is entirely # generated by the shader. no_stroke fill(0) rect(0, 0, width, height) end
Version data entries
6 entries across 6 versions & 1 rubygems