• Stars
    star
    180
  • Rank 212,008 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 4 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A few experiments with watercolour-like shader effects made using Shader Graph. Unity 2020.1.2f1, URP 8.2.0

Watercolour Shader Experiments (for Universal RP)

A few experiments with watercolour-like shader effects made using Shader Graph. Unity 2020.1.2f1, URP 8.2.0

Watercolour

Includes scene shown in image (though slightly edited/updated), 3 main watercolour shaders, as well as a skybox shader.

β€’ Object Shader : Objects/Meshes in the scene have a shader which uses a noise texture with the Triplanar node. This samples the texture 3 times, "projecting" it onto objects from each axis. This is more expensive but prevents the noise having obvious seams that could be produced with regular model uvs. The shader also samples the main light's shadowmap to apply a watercolour shadow effect (which looks best with smooth shadows enabled).
β€’ Image Effect / Blit Shader : There’s an image effect shader over the entire screen which uses a Blit Renderer Feature to apply it. This shader is responsible for the outlines effect, slight distortion and the noisy white vignette to give the effect of the watercolour paint fading out at the edges of the screen.
β€’ Decal Shader : A few watercolour paint splodges have also been placed around the scene using a shader that reconstructs the world position from the Scene Depth, and transforms it into object space to project textures/noise onto other meshes – essentially what a decal is, but probably not the best way to achieve decals. If this was used in an actual game it would also project on the player as it walks through. Also be aware that the camera cannot go into the decal mesh or the effect disappears.

A breakdown of the shader graphs can be found here : https://cyangamedev.wordpress.com/watercolour-shader-experiments

@Cyanilux
:)

More Repositories

1

URP_BlitRenderFeature

Blit Render Feature for Universal RP's Forward Renderer. Set specific source/destination via camera source, ID string or RenderTexture asset. Also options for _InverseView matrix and _CameraNormalsTexture generation.
C#
565
star
2

URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
HLSL
524
star
3

URP_ShaderCodeTemplates

A few shader code templates/examples for Unity, Universal Render Pipeline (URP v10 / Unity 2020.3). ShaderLab & HLSL.
ShaderLab
267
star
4

ShaderGraphVariables

Adds 'Register Variable' and 'Get Variable' nodes to Shader Graph, allowing you to link sections of a graph without connection wires. <3
C#
251
star
5

BakeShader

Unity editor tool for baking shaders to textures. Texture2D, Texture3D, Flipbook, or MeshRenderer (uses model UV)
C#
163
star
6

URP_RetroCRTShader

A shader graph which replicates some retro tv/monitor effects. CRT (cathode-ray tube) warping, scanlines, static, distortion, etc.
C#
141
star
7

Cards

A few scripts which controls interactions for a hand of cards. Card model, shadergraph and example setup included.
C#
128
star
8

ShaderGraphToPNG

Screenshots a Shader Graph in multiple sections, stitches them together and saves the result as a PNG
C#
117
star
9

ToDo

Unity in-editor to-do list, attached as a component and uses a custom inspector based on ReorderableList. Also see branches for ScriptableObject / cross-scene reference version.
C#
81
star
10

URP_GrassGeometryShader

Example of a Grass Geometry Shader for Unity, Universal Render Pipeline. Based on https://github.com/IronWarrior/UnityGrassGeometryShader
HLSL
63
star
11

cyanilux.github.io

Tutorial/blog site, generated using Hugo
HTML
2
star