Patch Editor Advanced

Hi, I’ve been out for a while but I’m back and I’m trying to delve deeper into the Patch Editor to create more advanced effects.

Do you have any advice on what to look for to go deeper? I’m reading The Book of Shaders to understand some more concepts.
And speaking of concepts, could you talk about the concepts of some functions (just to make it easier to understand), if you can even give examples of situations using shader patches.

Color space, Composition , Fallback, Fragment Stage, Vertex Attribute and Vertex Transform.

1 Like

Color space is used to convert between RGB, HSV, and HSL. You can use this to modify the hue, saturation, lightness, or value (brightness) of a texture.

Composition is simpler than it seems. It’s really just a texture sampler that outputs a texture. If you use the normal texture sampler, it outputs a color, which can’t be sampled again (unless you pass it through a render pass, which returns a texture).

Fallback is mostly just used for patch assets. If the user doesn’t select a texture, you can use it to provide a default value.

Fragment stage forces all subsequent operations to work on pixels (instead of vertices). The first stage of a shader is the vertex stage, which works on vertices. It’s generally faster than fragment stage because it has less points to work on. If you find yourself in a situation where your shader is lacking precision, try adding fragment stage to force it to work on the pixels.

The vertex attribute and vertex transform stuff is just a collection of common built-in values. They are mostly used for writing shaders for 3D objects as opposed to flat textures