• Stars
    star
    141
  • Rank 258,668 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 4 years ago

Reviews

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

Repository Details

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

Retro CRT Shader (for Universal RP)

A shader graph which replicates some retro tv/monitor effects.

Retro

Most effects can be toggled on and off, uses shader_feature keywords to create multiple shader variants. Only used variants will be included in build. If you want to be able to toggle effects at runtime (using material.EnableKeyword), switch them to multi_compile keywords in the shadergraph blackboard instead.

Effects include :
• CRT (cathode-ray tube) monitor warping
• Scanlines
• Image Distortion
• Static
• Scrolling glitchy static
• Vertical RGB subpixel / phosphor stripes

Example also includes a multi-camera setup to render the scene to a low-resolution render texture, to achieve a pixelated look. The main camera's culling mask is set to nothing, so the scene isn't rendered twice, and it uses a different forward renderer which uses the Retro CRT Shader/material in an Blit render feature to apply it as an image effect, before additional post processing (Vignette, Film Grain, Chromatic Aberration). It could likely be applied to a regular mesh renderer too though, e.g. if you wanted to use it for a TV monitor.

@Cyanilux
:)

If you aren't using URP / shadergraph but are interested in what the graph looks like, here's a high quality image instead : RetroGraph I've also written up a blog post to attempt to explain parts of the graph a bit more :
https://cyangamedev.wordpress.com/2020/09/10/retro-crt-shader-breakdown/

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

URP_WatercolourShaders

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

BakeShader

Unity editor tool for baking shaders to textures. Texture2D, Texture3D, Flipbook, or MeshRenderer (uses model UV)
C#
163
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