← Back

ofxShader

github.com/patriciogonzalezvivo/ofxShader · @patriciogonzalezvivo
OF 0.12 Graphics Shaders

ofxShader simplifies shader development by providing automatic reloading, include preprocessing, keyword management, GLSL version conversion, and uniform handling.

54 13 Last commit 2y ago Created 8y ago

Forks

Forks pushed to more recently than patriciogonzalezvivo/ofxShader itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

MaxGi/ofxShader by @MaxGi · ★ 0 · pushed 8mo ago
Daandelange/ofxShader by @Daandelange · ★ 0 · pushed 8mo ago

README

ofxShader



This class extends from ofShader and helps on the process to write and mantain shaders. Handles for you:

Automatic reloading: it's based on ofxAutoReloading from Andreas Muller.

Include preprocess: resolve all #include dependencies.

Define keywords: easy to add/remove/toggle #define keywords.

GLSL version conversion: depending if it's using ES, Rendering pipeline or the legacy OpenGL 2.2 version will add/remove the proper #version defines and/or presicion defines.

Note: they only get passed if they are present on the code.

ofxShaderFilter



This class set's a ofFbo and a ofxShader instance inside to Sandbox your shader project to do: simulations or postprocessing filters. It automatically generates multiple buffers following the same pattern propose by glslCanvas and glslViewer so all shaders should work on WebGL through glslCanvas, the on line editor (source code here) or nativelly on on your RaspberryPi, Ubuntu Desktops or MacOS through glslViewer. Check the example multiple_buffers example to see how that works.

ofxShaderMaterial

Get this addon

HTTPS
SSH