Crave For Games

You are in the Article list. If you want a full list of the StoneDrop develompent log notes you can go to the DevLog page.
Effects is Unity through graphics pipeline customization

Key points from a Unite talk about customizing Unity rendering pipeline (primarily deferred rendering).

Video 1. Lights, Cameras, Effects: Unlocking the Power of the Unity Renderer. June 2016, Unite Europe

General ideas:

- visual effects production: requirements -> develop graphics pipeline -> develop production pipeline (UI and tools for graphics artist)

- take into consideration interaction of an effect with Unity systems (enlighten, light probes, VR, etc.)

- effects are essentially tools for other people to tweak them.


Programmer's tools for effects:

- shaders and materials

- Graphics class - low-level functions but no interaction with Unity graphics pipeline

- MaterialPropertyBlock - light-weighted structure for passing parameters for shaders

- CommandBuffer - low-level API to integrate your code into Unity graphics pipeline ([1])

- CullingGroup - allows to integrate you FX into Unity culling code (before rendering).


Deferred decals demo:

- decals are pasted into G-buffer after the scene was rendered to emulate small pieces of geometry/textures on top of existing scene

- simple script on Camera adds (each frame) a new command buffer at CameraEvent.BeforeReflections

- this buffer is cleared and filled up in OnPreRender script event by drawing meshes with specific material to specific G-buffer channel(s)

- it's possible to write one global DecalsManager which will handle decals for all cameras and will use one material but different MaterialPropertyBlocks to alter per-decal input data (texture, color, smoothness)

- it's also can be supplemented by per-decal CullingGroups to skip rendering of a decal if it's not visible in camera, the CullingGroup should be updated every frame

- area lights example - almost the same: use the same decals code but different shader, different CameraEvent and different G-buffer output channel.


Exponential Shadow Maps (ESM) example:

- lights (like cameras) may hook into Unity graphic pipeline (LightEvents) and have a CommandBuffer associated with them

- so the script adds a command buffer after the Unity shadow map was generated and generates a blurred version of the shadow map

- starting from 5.4 you can override internal hidden shaders by GraphicsSettings.SetShaderMode(..., UseCustom) and SetCustomShader() functions.


"Vapor" (volumetric rendering) overview:

- use frustum-aligned 3D textures for integrating volumetric light ("froxel" - frustum-aligned voxel)

- this system uses ESM as well (standard shadowmaps results in too aliased image)

- will be available here:[2]


Link 1:

Link 2:

This article in social networks: