Create textures from ShaderToy shaders on Blender 3.0.
This is a slight modification of glslTexture from Patricio Gonzalez Vivo to follow the ShaderToy shader conventions.
Supported shader inputs:
- iResolution - viewport resolution (in pixels)
- iTime - shader playback time (in seconds)
- iTimeDelta - render time (in seconds)
- iFrame - shader playback frame
- iChannelTime[4] - channel playback time (in seconds)
- iChannelResolution[4] - channel resolution (in pixels)
- iMouse - mouse pixel coords. xy: current (if MLB down), zw: click
- iChannel0..3 - input channel. XX = 2D/Cube
- iDate - (year, month, day, time in seconds)
- iSampleRate - sound sample rate (i.e., 44100)
- Click on "Clone or Download"
- Click on "Download ZIP"
- Click "Edit" > "Preferences..." > "Add-ons"
- Click install and load the zip file you just download
- Check the box next to "GlslTexture"
- Operator Search:
F3
(orSpaceBar
depending on your setup). TypeGlslTexture
- Change
width
andheight
size andSource
file (which can be a path to an external file).
- Use the Image on your materials. The Image name will be based on the name of the source file.
- Go to the Text Editor (or an external editor if your source file is external) and edit the shader. It will hot reload.
The uniform specs will be the same that:
- The Book of Shaders: gentel guide into shaders
- PixelSpirit Deck: esoteric tarot deck, where each card builds on top of each other a portable library of generative GLSL code.
- glslCanvas: Js/WebGL
- glslEditor: Js/WebGL/Electron editor
- glslViewer: C++/OpenGL ES 2.0 native app for win/osx/linux/raspberry pi
- ofxshader: Openframeworks addon
- vscode-glsl-canvas: live WebGL preview of GLSL shaders for VSCode made by Luca Zampetti
- shader-doodle: A friendly web-component for writing and rendering shaders made by @halvves
So far the supported uniforms are:
uniform vec2 u_resolution;
: 2D vector with the width and height of the target textureuniform float u_time;
: float variable with the amount of seconds of the timeline
[ ] Reaload GlslTextures (actually any image with the same name that a text on a project) [ ] Improve performance for animation [ ] it's possible to make this a node to pass uniforms in? [ ] Multi buffers?