Source Shader Editor - Post processing node types

From Valve Developer Community
Jump to: navigation, search

This article will provide an overview of post processing nodes of the shader editor. Like it behaves for HLSL nodes, you can hover with your mouse pointer over them to show a tooltip with some more information ingame. The executable flow on a post processing graph cannot be forked. This constraint is realized through the 'master' connections of each node.

Master nodes

Post processing input

This is the initial node of a post processing graph. You must connect your first node to this one, it does not have any specific configuration options.

Post processing output

The destination node of a post processing graph. Your graph needs to end here or it will be deemed invalid and won't get drawn.

Rendering nodes

Draw material

Draws a material onto the current Rendertarget. The reference input RTs are used for automated scaling and viewport correction, they do not represent input and output 'textures'. You can furthermore perform custom corrections in the nodes properties and also push the target reference RT onto the stack automatically, this means, that the material will be drawn onto that RT.

Clear buffers

Clears the current color and or depth buffer. You must not try to clear depth if the active setup uses a 'no depth' RT, doing that will make this operation fail.

Render view

Renders the current scene with a custom draw setup onto the current RT. The rendering operations of this node are defined in the client code, you can create arbitrary drawing operations there.

Update FB

Copies the current content of the backbuffer onto the framebuffer copy texture, that's the texture that shaders reference by the 'Framebuffer' parameter for textures.

Viewport nodes

The current entry of the viewport stack defines which Rendertarget and depth buffer to target for rendering. It also allows you to only select a sub rect of that RT.

Push viewport

Pushes a specified RT onto the stack and sets its full dimensions for the viewport. This node must be followed by a Pop viewport node.

Pop viewport

Pops the last RT and viewport from the stack, the earlier one will become active. This nodes must be preceded by a Push viewport.

Set Rendertarget

Overrides the current RT with the specified one. The last RT will be lost.

Resource nodes

Create Rendertarget

Find an RT by name or select one from the combobox.

Create Material

Create a material unique to the graph (allocated procedurally) or load a vmt. Both can be edited ingame, saving the node while having a vmt loaded will save to the vmt too!

Copy Rendertarget

Blits the current RT to another one.