Screenspace General: Difference between revisions
(Mark as stub and add context/information its intended purpose) |
(Add pixshader to the parameters section, because it may require a DX8 fallback (as seen in dev/bloomadd)) |
||
Line 16: | Line 16: | ||
== Parameters == | == Parameters == | ||
{{todo|List parameters from {{file|screenspace_general|cpp}}}} | {{todo|List parameters from {{file|screenspace_general|cpp}}}} | ||
{{MatParam|$PIXSHADER|string|Name of the pixel shader to use. | |||
{{note|If you intent to draw your shader on DX8, you'll have to add the following code your material file (inside the "screenspace_general" keyvalue.){{CodeBlock|<nowiki> "screenspace_general_dx8" | |||
{ | |||
"$PIXSHADER" "YOUR_DX8_PIXSHADER_HERE" | |||
}</nowiki>}}}} | |||
}} | |||
== Tools == | == Tools == |
Revision as of 16:23, 26 December 2024


screenspace_general
is a Vertex shader available in all Source games since
Source 2007.[confirm] It is most commonly used to draw generic screenspace effects.
Unlike other shaders using screenspaceeffect as its vertex shader, screenspace_general allows developers to easily access and modify its pixel shader, 4 texture samplers and 4 shader register constants.[Clarify]
This can be useful for quickly iterating and testing screen effects, without having to reload all shaders, or recompile stdshaders to define/modify parameters.
Notable usage
dev/halo_add_to_screen
Used by the TF2 Glow Effect (2013 SDK) to help create an outline around models using stencils. It uses the haloaddoutline_ps20 pixel shader to apply cheap blur. $C0_X controls the glow fade value (restricted to 1.0f in code.)
Parameters

screenspace_general.cpp
Tools
An SDK to easily create custom pixel shaders for any Source game is available here: ficool2/sdk_screenspace_shaders.
