Source Engine Shader Fallbacks: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixed missing code tag)
(→‎Shader Fallbacks: DLed and added HDR fallbacks)
Line 6: Line 6:


===LightmappedGeneric===
===LightmappedGeneric===
{|- width="100%"
; <code>LightmappedGeneric_HDR_DX9</code> : DX9 with [[HDR]]
| width="30%" | <code>LightmappedGeneric_dx9</code> ||  dx9
; <code>LightmappedGeneric_DX9</code> : DX9
|-
; <code>LightmappedGeneric_DX8</code> : DX8.0, DX8.1
| <code>LightmappedGeneric_dx8</code> || dx8.0/dx8.1
; <code>LightmappedGeneric_NoBump_DX8</code> : DX8.0, DX8.1, but only used when <code>mat_reducefillrate 1</code> is set (usually by [[dxsupport.cfg]]). Note that this fallback doesn't actually cause the shader code to do anything different, it's only there to allow a material to specify different parameters.
|-
; <code>LightmappedGeneric_DX6</code> : DX6, DX7
| <code>LightmappedGeneric_NoBump_DX8</code> || dx8.0/dx8.1, but only used when <code>mat_reducefillrate 1</code> is set. Note that this fallback doesn't actually cause the shader code to do anything different, it's only there to allow a .VMT to specify different shader parameters or a fallback material when <code>mat_reducefillrate 1</code> is set.
|-
| <code>LightmappedGeneric_dx6</code> || dx6/dx7
|}


===VertexLitGeneric===
===VertexLitGeneric===
{|- width="100%"
; <code>VertexLitGeneric_HDR_DX9</code> : DX9 with [[HDR]]
| width="30%" | <code>VertexLitGeneric_dx9</code> || dx9
; <code>VertexLitGeneric_DX9</code> : DX9
|-
; <code>VertexLitGeneric_DX8</code> : DX8.0, DX8.1
| <code>VertexLitGeneric_dx8</code> || dx8.0/dx8.1
; <code>VertexLitGeneric_DX7</code> : DX7
|-
; <code>VertexLitGeneric_DX6</code> : DX6
| <code>VertexLitGeneric_dx7</code> || dx7
|-
| <code>VertexLitGeneric_dx6</code> || dx6
|}


===UnlitGeneric===
===UnlitGeneric===
{|- width="100%"
; <code>UnlitGeneric_DX9</code> : DX9
| width="30%" | <code>UnlitGeneric_dx9</code> || dx9
; <code>UnlitGeneric_DX8</code> : DX8.0, DX8.1
|-
; <code>UnlitGeneric_DX6</code> : DX6, DX7
| <code>UnlitGeneric_dx8</code> || dx8.0/dx8.1
|-
| <code>UnlitGeneric_dx6</code> || dx6/dx7
|}


===Refract===
===Refract===
{|- width=%100%"
; <code>Refract_DX90</code> : DX9
| width="30%" | <code>Refract_dx90</code> || dx9
; <code>Refract_DX80</code> : DX8.0, DX8.1
|-
; <code>Refract_DX60</code> : DX6, DX7: refraction isn't supported under DX6 and DX7, this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under DX6 and DX7.
| <code>Refract_dx80</code> || dx8.0/dx8.1
; <code>UnlitGeneric_DX6</code> : DX6, DX7: If you neglect to define a fallback shader, unlit generic is used.
|-
| <code>Refract_dx60</code> || dx6/dx7: refraction isn't supported under dx6 and dx7, this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under dx6 and dx7.
|-
| <code>UnlitGeneric_dx6</code> || dx6/dx7: If you neglect to define a fallback shader, unlit generic is used.
|}


===ShatteredGlass===
===ShatteredGlass===
{|- width=%100%"
; <code>ShatteredGlass</code> : DX9
| width="30%" | <code>ShatteredGlass</code> || dx9
; <code>ShatteredGlass_DX8</code> : DX8.0, DX8.1
|-
; <code>ShatteredGlass_DX7</code> : DX7
| <code>ShatteredGlass_dx8</code> || dx8.0/dx8.1
; <code>Wireframe</code> : DX6: Shattered glass isn't supported under DX6.
|-
| <code>ShatteredGlass_dx7</code> || dx7
|-
| <code>Wireframe</code> || dx6: Shattered glass isn't supported under dx6.
|}


===Water===
===Water===
{|- width=%100%"
; <code>Water_HDR_DX90</code> : DX9 with [[HDR]]
| width="30%" | <code>Water_dx90</code> || dx9
; <code>Water_DX90</code> : DX9
|-
; <code>Water_DX81</code> : DX8.1
| <code>Water_dx81</code> || dx8.1
; <code>Water_DX80</code> : DX8.0
|-
; <code>Water_DX60</code> : DX7/DX6: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under DX6 and DX7.
| <code>Water_dx80</code> || dx8.0
; <code>LightmappedGeneric_DX6</code> : DX7/DX6: This is used if you neglect to define a fallback shader.
|-
| <code>Water_dx60</code> || dx7/dx6: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under dx6 and dx7.
|-
| <code>LightmappedGeneric_dx6</code> || dx7/dx6: This is used if you neglect to define a fallback shader.
|}


===WorldTwoTextureBlend===
===WorldTwoTextureBlend===
{|- width=%100%"
; <code>WorldTwoTextureBlend</code> : DX9
| width="30%" | <code>WorldTwoTextureBlend</code> || dx9
; <code>WorldTwoTextureBlend_DX8</code> : DX8.0, DX8.1
|-
; <code>WorldTwoTextureBlend_DX6</code> : DX6, DX7
| <code>WorldTwoTextureBlend_dx8</code> || dx8.0/dx8.1
|-
| <code>WorldTwoTextureBlend_dx6</code> || dx6/dx7
|}


===WorldVertexTransition===
===WorldVertexTransition===
{|- width=%100%"
; <code>WorldVertexTransition_DX9</code> : DX9
| width="30%" | <code>WorldVertexTransition_dx9</code> || dx9
; <code>WorldVertexTransition_DX8</code> : DX8.0, DX8.1
|-
; <code>WorldVertexTransition_DX6</code> : DX6, DX7
| <code>WorldVertexTransition_dx8</code> || dx8.0/dx8.1
|-
| <code>WorldVertexTransition_dx6</code> || dx6/dx7
|}


===WorldVertexAlpha===
===WorldVertexAlpha===
{|- width=%100%"
; <code>WorldVertexAlpha</code> : DX9
| width="30%" | <code>WorldVertexAlpha</code> || dx9
; <code>WorldVertexAlpha_DX8</code> : DX8.0, DX8.1: Note this shader has no fallbacks to DX7 or below.
|-
| <code>WorldVertexAlpha_dx8</code> || dx8.0/dx8.1: Note this shader has no fallbacks to dx7 or below.
|}


===Cable===
===Cable===
{|- width=%100%"
; <code>Cable</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>Cable</code> || dx8.0/dx8.1/dx9
; <code>UnlitGeneric_DX6</code> : DX6, DX7
|-
| <code>UnlitGeneric_DX6</code> || dx6/dx7
|}


===Eyes===
===Eyes===
{|- width=%100%"
; <code>Eyes</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>Eyes</code> || dx8.0/dx8.1/dx9
; <code>Eyes_DX6</code> : DX6, DX7
|-
| <code>Eyes_dx6</code> || dx6/dx7
|}


===Modulate===
===Modulate===
{|- width=%100%"
; <code>Modulate</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>Modulate</code> || dx8.0/dx8.1/dx9
; <code>Modulate_DX6</code> : DX6, DX7
|-
| <code>Modulate_dx6</code> || dx6/dx7
|}


===MonitorScreen===
===MonitorScreen===
{|- width=%100%"
; <code>MonitorScreen</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>MonitorScreen</code> || dx8.0/dx8.1/dx9
; <code>LightmappedGeneric_DX6</code> : DX6, DX7
|-
| <code>LightmappedGeneric_dx6</code> || dx6/dx7
|}


===Predator===
===Predator===
{|- width=%100%"
; <code>Predator_DX80</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>Predator_dx80</code> || dx8.0/dx8.1/dx9
; <code>Predator_DX60</code> : DX6, DX7: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under DX6 and DX7.
|-
; <code>UnlitGeneric_DX6</code> : DX6, DX7: This is used if you neglect to define a fallback shader.
| <code>Predator_dx60</code> || dx6/dx7: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under dx6 and dx7.
|-
| <code>UnlitGeneric_dx6</code> || dx6/dx7: This is used if you neglect to define a fallback shader.
|}


===Sprite===
===Sprite===
{|- width=%100%"
; <code>Sprite_DX8</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>Sprite_dx8</code> || dx8.0/dx8.1/dx9
; <code>Sprite_DX6</code> : DX6, DX7
|-
| <code>Sprite_dx6</code> || dx6/dx7
|}


===UnlitTwoTexture===
===UnlitTwoTexture===
{|- width=%100%"
; <code>UnlitTwoTexture</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>UnlitTwoTexture</code> || dx8.0/dx8.1/dx9
; <code>UnlitTwoTexture_DX6</code> : DX6, DX7
|-
| <code>UnlitTwoTexture_dx6</code> || dx6/dx7
|}


===WriteZ===
===WriteZ===
{|- width=%100%"
; <code>WriteZ</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>WriteZ</code> || dx8.0/dx8.1/dx9
; <code>WriteZ_DX6</code> : DX6, DX7
|-
| <code>WriteZ_dx6</code> || dx6/dx7
|}


===WindowImposter===
===WindowImposter===
{|- width=%100%"
; <code>WindowImposter_DX80</code> : DX8.0, DX8.1, DX9
| width="30%" | <code>WindowImposter_dx80</code> || dx8.0/dx8.1/dx9
; <code>WindowImposter_DX60</code> : DX6, DX7: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under DX6 and DX7.
|-
; <code>UnlitGeneric_DX6</code> : DX6, DX7: This is used if you neglect to define a fallback shader
| <code>WindowImposter_dx60</code> || dx6/dx7: this fallback shader is only defined to allow you to use the <code>$fallbackmaterial</code> feature to cause the material system to use a different material under dx6 and dx7.
|-
| <code>UnlitGeneric_dx6</code> || dx6/dx7: This is used if you neglect to define a fallback shader
|}


==See Also==
==See Also==


* [[DirectX Versions]] - includes screenshots visually comparing different DirectX levels.
* [[DirectX Versions]] - includes screenshots visually comparing different DirectX levels.

Revision as of 09:05, 17 September 2008

Introduction

The following a list of the shader fallbacks for the materials shipped with Half-Life 2. For a description of how shader fallbacks are used, see the Material choices and rendering performance in Controlling Geometry Visibility and Compile Times.

Shader Fallbacks

LightmappedGeneric

LightmappedGeneric_HDR_DX9
DX9 with HDR
LightmappedGeneric_DX9
DX9
LightmappedGeneric_DX8
DX8.0, DX8.1
LightmappedGeneric_NoBump_DX8
DX8.0, DX8.1, but only used when mat_reducefillrate 1 is set (usually by dxsupport.cfg). Note that this fallback doesn't actually cause the shader code to do anything different, it's only there to allow a material to specify different parameters.
LightmappedGeneric_DX6
DX6, DX7

VertexLitGeneric

VertexLitGeneric_HDR_DX9
DX9 with HDR
VertexLitGeneric_DX9
DX9
VertexLitGeneric_DX8
DX8.0, DX8.1
VertexLitGeneric_DX7
DX7
VertexLitGeneric_DX6
DX6

UnlitGeneric

UnlitGeneric_DX9
DX9
UnlitGeneric_DX8
DX8.0, DX8.1
UnlitGeneric_DX6
DX6, DX7

Refract

Refract_DX90
DX9
Refract_DX80
DX8.0, DX8.1
Refract_DX60
DX6, DX7: refraction isn't supported under DX6 and DX7, this fallback shader is only defined to allow you to use the $fallbackmaterial feature to cause the material system to use a different material under DX6 and DX7.
UnlitGeneric_DX6
DX6, DX7: If you neglect to define a fallback shader, unlit generic is used.

ShatteredGlass

ShatteredGlass
DX9
ShatteredGlass_DX8
DX8.0, DX8.1
ShatteredGlass_DX7
DX7
Wireframe
DX6: Shattered glass isn't supported under DX6.

Water

Water_HDR_DX90
DX9 with HDR
Water_DX90
DX9
Water_DX81
DX8.1
Water_DX80
DX8.0
Water_DX60
DX7/DX6: this fallback shader is only defined to allow you to use the $fallbackmaterial feature to cause the material system to use a different material under DX6 and DX7.
LightmappedGeneric_DX6
DX7/DX6: This is used if you neglect to define a fallback shader.

WorldTwoTextureBlend

WorldTwoTextureBlend
DX9
WorldTwoTextureBlend_DX8
DX8.0, DX8.1
WorldTwoTextureBlend_DX6
DX6, DX7

WorldVertexTransition

WorldVertexTransition_DX9
DX9
WorldVertexTransition_DX8
DX8.0, DX8.1
WorldVertexTransition_DX6
DX6, DX7

WorldVertexAlpha

WorldVertexAlpha
DX9
WorldVertexAlpha_DX8
DX8.0, DX8.1: Note this shader has no fallbacks to DX7 or below.

Cable

Cable
DX8.0, DX8.1, DX9
UnlitGeneric_DX6
DX6, DX7

Eyes

Eyes
DX8.0, DX8.1, DX9
Eyes_DX6
DX6, DX7

Modulate

Modulate
DX8.0, DX8.1, DX9
Modulate_DX6
DX6, DX7

MonitorScreen

MonitorScreen
DX8.0, DX8.1, DX9
LightmappedGeneric_DX6
DX6, DX7

Predator

Predator_DX80
DX8.0, DX8.1, DX9
Predator_DX60
DX6, DX7: this fallback shader is only defined to allow you to use the $fallbackmaterial feature to cause the material system to use a different material under DX6 and DX7.
UnlitGeneric_DX6
DX6, DX7: This is used if you neglect to define a fallback shader.

Sprite

Sprite_DX8
DX8.0, DX8.1, DX9
Sprite_DX6
DX6, DX7

UnlitTwoTexture

UnlitTwoTexture
DX8.0, DX8.1, DX9
UnlitTwoTexture_DX6
DX6, DX7

WriteZ

WriteZ
DX8.0, DX8.1, DX9
WriteZ_DX6
DX6, DX7

WindowImposter

WindowImposter_DX80
DX8.0, DX8.1, DX9
WindowImposter_DX60
DX6, DX7: this fallback shader is only defined to allow you to use the $fallbackmaterial feature to cause the material system to use a different material under DX6 and DX7.
UnlitGeneric_DX6
DX6, DX7: This is used if you neglect to define a fallback shader

See Also

  • DirectX Versions - includes screenshots visually comparing different DirectX levels.