Skip to content

panmar/playsh

Repository files navigation

playsh

A GLSL fragment shader playground, inspired by Shadertoy.

example

Installation

pip install playsh

Builtin shader uniforms

  • uniform vec3 iResolution
  • uniform float iTime
  • iuniform float TimeDelta
  • uniform int iFrame
  • uniform vec4 iMouse
  • uniform Texture2D iChannel0
  • uniform Texture2D iChannel1
  • uniform Texture2D iChannel2
  • uniform Texture2D iChannel3
  • uniform vec3 iChannelResolution[4]

Dependencies

  • glfw
  • PyOpenGL
  • PyGLM
  • numpy
  • pillow
  • injector

Example

from playsh import PlaySh, TextureDesc, Filter, Wrap

app = PlaySh(
    width=1920,
    height=1200,
    fragment_shader_path="examples/example.fs",
    channel0=TextureDesc(
        path="examples/noise.png", filter=Filter.LINEAR, wrap=Wrap.REPEAT
    ),
)
app.run()

About

A shader playground.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages