Custom Postprocessing Effects

From Valve Developer Community
Revision as of 14:26, 14 February 2009 by ChrysalisX (talk | contribs)
Jump to navigation Jump to search
Warning.pngWarning:This article is a work in progress and may not be up to normal wiki standards

Introduction

Postprocess effects are a common type of effect, typically applied as a full screen overlay. In the Source engine, this is achieved by rendering a full screen quad with a material that either contains an animated texture to blend with the screen, as with blood spattes, or a custom shader that reads from a framebuffer texture, usually __rt_fullframeFB. This techique is used to create a number of different graphical effects, from film grain or color correction to image based edge highlighting and certain types of toon shading.

This tutorial will cover all of the aspects of setting up and running a postprocess effect with a custom shader. The information can also be used to apply full screen textures using built-in shaders such as UnlitGeneric For more information on creating custom shaders, see Shader Authoring. Episode one engine is also assumed, since as of this writing it is the only engine version to support custom shaders.

Creating a custom texture

Creating a Screen Space Effect

Custom Render Targets

see : Render Targets