Asset Store How to start Forum Effects Nodes Tutorials

Basic Knowledge


- Post Processing shader is a program that filters every single screen pixel

- Every pixel contains 3 subpixels - Red, Green and Blue

- Subpixel illuminates differently depending on its value (0 - 1 range)

Screen pixel (CameraOutput) comes from game (CameraInput) which is mapped by texture coords (DefaultUV)

Texture coords - DefaultUV output

Animations


- Animations are created by using Time data, it's also very handy to use built-in SinTime

Depth


Depth is easy, just replace CameraInput with CameraDepth

Pro Tip!

In most cases, mobile devices don't support depth

Render Queue


- PPU supports multi-pass, what means that You can store multiple programs in one shader file

- Create temp textures to handle passing data between render passes

- Select input and output textures for each render pass, set shader pass and iterations using fixed value or global variable (Int or IntSlider)

More Information...

Global Variable


- Add new property in the left panel

- Create new Input node suitable to data type and assign variable by name

Pro Tip!

It's important to care about unique properties naming!

- Create Spline in the same way as normal property

- _Spline node returns a value of a curve in a given position of X axis

More Information...

VR


VR for single-pass rendering is simple, just replace DefaultUV with StereoUV

Functions


- Open Function Editor, create Your function

- Open Shader Editor, create Custom node and select created function

More Information...

Logic


- Logic output is represented by true (1) or false (0)

- Every value different than 1 is treated as false

- AND returns true when both inputs are true

- OR returns true when at least one of inputs is true

- NOT return an opposite of input

Predefined Macros


- Target is a Shader Model without dots, for example Shader Model 3.0 means Target = 30

- Version is a Unity version without dots, for example Unity version 5.6.0 means Version = 560, Unity 2017.1.0 means version = 201710

More Information...

Local Variables


- Local variables allow organizing code into effective commands

- The popup with number value determines variable position in compile queue, CameraOutput is always the last one

Reusing Passes


- Render effect into tempRT using RenderQueue

- Add TempTex node and select destined tempRT to reuse

Picker


- Add Post Processing Volume to a camera.

- Add Unity Color Grading effect to the Volume profile.

- Set effect Mode to Low Definition Range.

- Open picker (Window/Post Processing Ultimate/LUT Picker), select camera and find the most suitable LUT texture.

Blender


- Add Post Processing Volume to a camera.

- Add Unity Color Grading effect to the Volume profile.

- Set effect Mode to Low Definition Range.

- Open blender (Window/Post Processing Ultimate/LUT Blender), select camera.

- Select LUT textures and blend them.

- Save new texture, You can save it inside PPU_LUTs folder, so You texture will be avaiable in LUT Picker.

Loops


- Simple loop with arithmetic operations.

- This sample shows how to create and average of a 5 pixels with different coords, loops are very useful in blur type shaders where it's easier to sum a lot of elements at once.

- Advanced usage of a loop in a blur shader. Manually adding 90 pixels would take a lot more space, this solution is easy and scalable.