CustomShader_v2 Op
Write your own custom shader
Summary (oneliner)
Write your own custom shader and use it as a material.
Click the edit button to edit the fragment or vertex shader.
To turn it into a texture use it together with the Ops.Gl.Shader.Shader2Texture op.
UNIFORMS
UNI float variableFloatName; //Use to create a uniform float
UNI sampler2D variableTextureName; // use to create a texture input port
IN vec2 texCoord; // Gives the UV co-ordinates from 0-1
To display a texture on the screen
Vec4 texIn = texture(variableTextureName,texCoord);
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Caniuse query
Inputs
Trigger in
Source Code
A string can be passed in as a fragment shader. It's better to use an attachment
A string can be passed in as a vertex shader. It's better to use an attachment
Options
Enable to use as a material
Outputs
Trigger out
Shader/material out
Patches using CustomShader_v2
Changelog
created op 2019-05-13 - pandur | |
Ops.Exp.Gl.Shader.CustomShader2 renamed to Ops.Gl.Shader.CustomShader_v2 2020-04-20 - pandur | |
added core lib: cgl_shadergraph 2022-09-19 - pandur | |
removed core lib: cgl_shadergraph 2022-09-20 - pandur |