GlslViewer is a flexible console-base OpenGL Sandbox to display 2D/3D GLSL shaders without the need of an UI. You can definitely make your own UI or wrapper using the Python Module (include) or any other tool that communicates back/forth with glslViewer thought the standard POSIX console In/Out or OSC.
GlslViewer support both 2D shaders and/or 3D shaders when a geometry (PLY, OBJ or GLTF) is provided.
GlslViewer gives support to:
- fragment and vertex shaders on GLSL 120 (compatible with WebGL 1.0 and OpenGL ES 2.0)
- resolve
#include
dependencies - adding/deleting
#defines
, plus a rich set of automatically generated set of defines. - adding/deleting uniforms (float, int, vec2, vec3 and vec4)
- import of Textures
- import of Cubemaps and spherical harmonics
- import PLY, OBJ or GLTF files (and their dependencies)
- default vert/frag shaders with PBR lighting model
- hot reload of files on changes
- One default light and one default camera
- Interactive commands thought POSIX console IN/OUT or OSC
- headless rendering and image export
- PNG sequence export
-
Convensions: over all GlslViewer is designed to be flexible, that means that sticks very close to GLSL language. There is not extra languages or meta data on top. The only conventions comes on the native uniform names and defines GlslViewer use to send information like time, resolution, lights, vertex attributes, material properties, platform type, shadowmap name, etc.
[ ] Support for GL (Full KMS) or GL (Fake KMS) on RaspberryPi
[ ] Depth frag shader for scene depthmap ( u_sceneDepth
) instead of rendering to multiple targets ( only on RPI )
[ ] Depth frag shader for light's shadowMap, to work on RPI
Patricio Gonzalez Vivo: github | twitter | instagram | website
Thanks to:
-
Mihai Sebea for making the Windows compile happen
-
Karim Naaki lot of concept and code was inspired by this two projects: fragTool and hdreffects
-
Doug Moen he help to add the compatibility to ShaderToy shaders and some RayMarching features were added for his integration with his project: curv.
-
Wray implement the OSC listener feature, opening GlslViewer to an entire new ways of communicating and interacting with other apps, devices and ecosystems.
-
Yvan Sraka for putting the code in shape and setting it up for TravisCI.
-
Andsz for Spherical Harmonics code from Spherical Harmonics Playground
-
Syoyo Fujita for the work on tinyobjloader v1.0.x
-
Morgan McGuire's for the OBJ models on Computer Graphics Archive
-
Philip Rideout and Romain Guy general generosity to share their code and experience
-
Mihai Sebea for porting it to windows(TM)