1 monjori = None
2
3 def setup():
4 size(640, 360, P2D)
5 noStroke()
6 global monjori
7 monjori = loadShader("monjori.glsl")
8 monjori.set("resolution", float(width), float(height))
9
10
11 def draw():
12 monjori.set("time", millis() / 1000.0)
13 shader(monjori)
14 # The rect is needed to make the fragment shader go through every pixel of
15 # the screen, but is not used for anything else since the rendering is entirely
16 # generated by the shader.
17 fill(0)
18 rect(0, 0, width, height)
Saturday, 6 April 2013
Processing.py now updated
Thanks to work by Ralf Biedert processing.py has recently been update to use jython-2.7b1 and processing-2.0b8. It might be interesting to follow his fork in the meantime it has been pulled into the original by Jonathan Feinberg. So you can even update it yourself to the development version of vanilla processing if you wish (strange thing is why opengl is still kept in libraries folder instead of alongside core as P2D and P3D are both rendered using opengl). Here is another Shader example translated to processing.py.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment