Jump to content

Sonic the Hedgehog (2006) Shaders: Difference between revisions

From HedgeDocs
Document morph/skin shaders
Cell cleanup
Line 183: Line 183:
| AcrobataPrimitive
| AcrobataPrimitive
| Used in rendering of Acroarts particle effects.
| Used in rendering of Acroarts particle effects.
|
|-
|-
| Air00
| Air00
Line 196: Line 195:
|-
|-
| Animal01
| Animal01
|
|
|
|-
|-
| Animal02
| Animal02
|
|
|
|-
|-
| AqaScene00
| AqaScene00
|
|
|
|-
|-
| AqaScene01
| AqaScene01
|
|
|
|-
|-
| AqaScene02
| AqaScene02
|
|
|
|-
|-
Line 221: Line 215:
|-
|-
| Artifact00
| Artifact00
|
|
|
|-
|-
| Artifact01
| Artifact01
|
|
|
|-
|-
| Artifact02
| Artifact02
|
|
|
|-
|-
| Artifact03
| Artifact03
|
|
|
|-
|-
| Artifact06
| Artifact06
|
|
|
|-
|-
| Artifact07
| Artifact07
|
|
|
|-
|-
| BackGround
| BackGround
|
|
|
|-
|-
| balloonicon
| balloonicon
| Used for rendering quest "balloons" in hub worlds.
| Used for rendering quest "balloons" in hub worlds.
|
|-
|-
| Billboard00
| Billboard00
Line 289: Line 275:
| Billboard07
| Billboard07
| Unused. Pixel lighting, CSM sampling and point lights.
| Unused. Pixel lighting, CSM sampling and point lights.
|
|-
|-
| BillboardSp00
| BillboardSp00
Line 307: Line 292:
|-
|-
| BloomFilter
| BloomFilter
|
|
|
|-
|-
Line 322: Line 306:
| BurnoutBlurFilter
| BurnoutBlurFilter
| Responsible for the radial "motion" blur seen in the final game. Likely named after the Burnout racing series.
| Responsible for the radial "motion" blur seen in the final game. Likely named after the Burnout racing series.
|
|-
|-
| ChaosDrive
| ChaosDrive
Line 335: Line 318:
|-
|-
| ColorCopyFilter
| ColorCopyFilter
|
|
|
|-
|-
| ColorCorrectionFilter
| ColorCorrectionFilter
|
|
|
|-
|-
| ColorOutFilter
| ColorOutFilter
| Outputs a solid colour. Used for bright areas of spotlights in White Acropolis stealth sections.
| Outputs a solid colour. Used for bright areas of spotlights in White Acropolis stealth sections.
|
|-
|-
| Common
| Common
|
|
|
|-
|-
| conditional_rendering
| conditional_rendering
| Used in rendering of lens flare effect.
| Used in rendering of lens flare effect.
|
|-
|-
| CopyFilter
| CopyFilter
|
|
|
|-
|-
| core_circle
| core_circle
|
|
|
|-
|-
Line 368: Line 344:
|-
|-
| CscGlass01
| CscGlass01
|
|
|
|-
|-
Line 387: Line 362:
|-
|-
| CscScene02
| CscScene02
|
|
|
|-
|-
| CscScene03
| CscScene03
|
|
|
|-
|-
| csd
| csd
| Used in rendering of CSD (UI) scenes.
| Used in rendering of CSD (UI) scenes.
|
|-
|-
| csd3D
| csd3D
| Used for world-space UI like enemy health gauges.
| Used for world-space UI like enemy health gauges.
|
|-
|-
| csdBG
| csdBG
|
|
|
|-
|-
| cyl
| cyl
|
|
|
|-
|-
| DepthOfFieldFilter
| DepthOfFieldFilter
| Unused in the final game. Likely a depth of field effect similar to the one in Sonic Unleashed.
| Unused in the final game. Likely a depth of field effect similar to the one in Sonic Unleashed.
|
|-
|-
| DtdSand00
| DtdSand00
|
|
|
|-
|-
Line 429: Line 396:
|-
|-
| DtdSand03
| DtdSand03
|
|
|
|-
|-
| DtdSand04
| DtdSand04
|
|
|
|-
|-
Line 442: Line 407:
|-
|-
| DtdScene01
| DtdScene01
|
|
|
|-
|-
Line 461: Line 425:
|-
|-
| DtdScene05
| DtdScene05
|
|
|
|-
|-
Line 510: Line 473:
|-
|-
| en_laser00
| en_laser00
|
|
|
|-
|-
Line 574: Line 536:
|-
|-
| FlcScene01
| FlcScene01
|
|
|
|-
|-
Line 589: Line 550:
| font
| font
| Used in font rendering for CSD.
| Used in font rendering for CSD.
|
|-
|-
| fsol_armor
| fsol_armor
Line 598: Line 558:
| fsol_eye
| fsol_eye
|
|
|✓
|-
|-
| fsol_fluid
| fsol_fluid
|
|
|✓
|-
|-
| Gadget_Glider
| Gadget_Glider
|
|
|
|-
|-
Line 614: Line 571:
|-
|-
| gindows
| gindows
|
|
|
|-
|-
Line 628: Line 584:
|-
|-
| Glass02
| Glass02
|
|
|
|-
|-
| Glass03
| Glass03
|
|
|
|-
|-
Line 652: Line 606:
| iblis02_eye
| iblis02_eye
| Unused, <code>iblis02.xno</code> uses <code>iblis01_eye</code>. They seem more or less identical.
| Unused, <code>iblis02.xno</code> uses <code>iblis01_eye</code>. They seem more or less identical.
|✓
|-
|-
| iblis02_lava
| iblis02_lava
Line 695: Line 648:
|-
|-
| Ice03
| Ice03
|
|
|
|-
|-
Line 714: Line 666:
|-
|-
| KdvAqua00
| KdvAqua00
|
|
|
|-
|-
Line 728: Line 679:
|-
|-
| KdvRope
| KdvRope
|
|
|
|-
|-
| KdvWindRoad
| KdvWindRoad
|
|
|
|-
|-
Line 741: Line 690:
|-
|-
| Laser00
| Laser00
|
|
|
|-
|-
Line 760: Line 708:
|-
|-
| lensflare
| lensflare
|
|
|
|-
|-
Line 784: Line 731:
|-
|-
| LightmapSp01
| LightmapSp01
|
|
|
|-
|-
Line 793: Line 739:
|-
|-
| LightmapSp03
| LightmapSp03
|
|
|
|-
|-
Line 837: Line 782:
|-
|-
| Luminous07
| Luminous07
|
|
|
|-
|-
| lzout_pt
| lzout_pt
|
|
|✓
|-
|-
| lzout
| lzout
|
|
|✓
|-
|-
| Mantle00
| Mantle00
Line 864: Line 806:
|-
|-
| MarathonSpeedTree
| MarathonSpeedTree
|
|
|
|-
|-
| MaskCopyFilter
| MaskCopyFilter
|
|
|
|-
|-
Line 887: Line 827:
|-
|-
| Mercury
| Mercury
|
|
|
|-
|-
Line 907: Line 846:
| MotionBlurFilter
| MotionBlurFilter
| BurnoutBlurFilter is used in retail rather than this shader.
| BurnoutBlurFilter is used in retail rather than this shader.
|
|-
|-
| movie
| movie
|
|
|
|-
|-
| movieARGB
| movieARGB
|
|
|
|-
|-
| movieYUV420
| movieYUV420
|
|
|
|-
|-
| no_shader
| no_shader
|
|
|✓
|-
|-
| OpticalCamouflage
| OpticalCamouflage
| Used for rendering camouflaged enemies.
| Used for rendering camouflaged enemies.
|✓
|-
|-
| pe
| pe
|
|
|
|-
|-
| PhaseShiftFilter
| PhaseShiftFilter
|
|
|
|-
|-
| physicsviewer
| physicsviewer
|
|
|
|-
|-
| player_homing
| player_homing
|
|
|
|-
|-
| primitive
| primitive
|
|
|
|-
|-
Line 960: Line 888:
|-
|-
| rt_clear
| rt_clear
|
|
|
|-
|-
| rt_restoration
| rt_restoration
|
|
|
|-
|-
Line 973: Line 899:
|-
|-
| SampleFilter
| SampleFilter
|
|
|
|-
|-
Line 988: Line 913:
| simple
| simple
|
|
|✓
|-
|-
| Sky00
| Sky00
Line 1,041: Line 965:
|-
|-
| Stone04
| Stone04
|
|
|
|-
|-
Line 1,060: Line 983:
|-
|-
| Terrain03
| Terrain03
|
|
|
|-
|-
Line 1,074: Line 996:
|-
|-
| Terrain06
| Terrain06
|
|
|
|-
|-
| Terrain07
| Terrain07
|
|
|
|-
|-
| Tex_Phone
| Tex_Phone
|
|
|
|-
|-
| Tex_Spec_Phone
| Tex_Spec_Phone
|
|
|
|-
|-
Line 1,100: Line 1,018:
|-
|-
| TwnFence00
| TwnFence00
|
|
|
|-
|-
Line 1,109: Line 1,026:
|-
|-
| TwnGlass00
| TwnGlass00
|
|
|
|-
|-
| TwnGlideWire
| TwnGlideWire
|
|
|
|-
|-
Line 1,122: Line 1,037:
|-
|-
| TwnScene01
| TwnScene01
|
|
|
|-
|-
Line 1,131: Line 1,045:
|-
|-
| TwnScene03
| TwnScene03
|
|
|
|-
|-
| vout
| vout
|
|
|
|-
|-
Line 1,144: Line 1,056:
|-
|-
| WapScene01
| WapScene01
|
|
|
|-
|-
Line 1,153: Line 1,064:
|-
|-
| Water00
| Water00
|
|
|
|-
|-
Line 1,162: Line 1,072:
|-
|-
| Water02
| Water02
|
|
|
|-
|-
Line 1,176: Line 1,085:
|-
|-
| Water05
| Water05
|
|
|
|-
|-
Line 1,201: Line 1,109:
| ZakoressBillboard
| ZakoressBillboard
| Billboarded approximation for distant Zakoress.
| Billboarded approximation for distant Zakoress.
|
|-
|-
| zout_pt
| zout_pt
| Used for rendering depth pre-pass for punchthrough.
| Used for rendering depth pre-pass for punchthrough.
|✓
|-
|-
| zout
| zout
| Used for rendering depth pre-pass.
| Used for rendering depth pre-pass.
|✓
|}
|}

Revision as of 23:40, 27 October 2026

Shaders in Sonic the Hedgehog (2006) are compiled GPU programs that control the appearance of objects and effects. Most shaders have several different variants with different feature support. Multiplayer shaders may have additional optimisations, like replacing real-time planar reflections with cubemaps.

In the Xbox 360 version of the game, shaders are stored in the following archives:

Type Location
Singleplayer /game/xenon/archives/shader.arc
Multiplayer /game/xenon/archives/shader_lt.arc

Within the archives, shaders variants are stored in a number of sub-folders.

Folder Description
std Standard
np Standard without point lights
lm Replaces CSM with baked lightmaps and shadows.
lm_np Same as lm without point lights
morph, morph_np Morph targets (only affects vertex shaders)
skin, skin_np Skined meshes (only affects vertex shaders)

Many of the shaders within the sub-folders are exact duplicates of the standard variant.

Each of the shaders listed below are in the .fxo format in the 360 version of the game. Each shader can contain multiple techniques, which hold the respective vertex and fragment shaders.

The shader and specific technique used are defined per mesh set in XNO files. Some shaders are not referenced in XNO files, either because they are used internally or because they are unused altogether.

Shader Inputs

All shaders used for rendering 3D objects use a common input block format.

Registers Parameter Description
c0-c3 g_Material NinjaNext material parameters. Not always used as described.
c4 g_Misc
c5-c6 g_OffsetUV
c8-c13 g_OLS
c14 g_RTDimensions
c15 g_ClipInfo
c16 g_KhronosParam
c28-c30 g_LightMisc
c31-c34 g_DirectionalLights[2]
c39-c44 g_PointLights[2]
c64-c66 g_MatW World matrix
c68-c70 g_MatWV World * View matrix
c72-c75 g_MatWVP World * View * Projection matrix
c76-c78 g_MatV View matrix
c80-c82 g_MatVI Inverse View matrix
c84-c87 g_MatP Projection matrix
c88-c91 g_MatVP View * Projection matrix
c92-c95 g_mtxCSMViewProj CSM View * Projection matrix
c96-c191 g_BoneMtx[32]
c192 g_Morph
c193 g_MorphFlags
c194 g_SystemLightMapWork
c210+ Shader-specific constants
b0 bReflection CharacterMaterial only
b1 bCubeReflection
s0-s3 Material textures
s8 g_smpEnvMap
s9 g_smpDepth0 Packed linear depth
s10 g_smpDynamicEnvMap Planar reflection
s11 g_smpCSM CSM array
s13 g_smpFB Resolved framebuffer

Shader List

Shader Notes Morph/Skin Used in XNOs
AcrobataPrimitive Used in rendering of Acroarts particle effects.
Air00 ✓
Animal00 Used for Kingdom Valley eagle. ✓ ✓
Animal01
Animal02
AqaScene00
AqaScene01
AqaScene02
Aqua00 ✓
Artifact00
Artifact01
Artifact02
Artifact03
Artifact06
Artifact07
BackGround
balloonicon Used for rendering quest "balloons" in hub worlds.
Billboard00 No lighting, CSM sampling or point lights support. ✓ ✓
Billboard01 Vertex lighting and point lights, no CSM sampling. ✓ ✓
Billboard02 By far the most used shader. Vertex lighting with no CSM sampling or point lights support. ✓ ✓
Billboard03 Vertex lighting, CSM sampling and point lights. ✓ ✓
Billboard04 Pixel lighting, CSM sampling, no point lights. ✓
Billboard05 Pixel lighting, no CSM sampling or point lights. ✓
Billboard06 Pixel lighting and point lights, no CSM sampling. ✓
Billboard07 Unused. Pixel lighting, CSM sampling and point lights.
BillboardSp00 ✓
BillboardSp01 ✓
BillboardSp02 ✓
BloomFilter
bod_light Used by "Book of Darkness" aka Scepter of Darkness. ✓
bod_metal Used by "Book of Darkness" aka Scepter of Darkness. ✓
BurnoutBlurFilter Responsible for the radial "motion" blur seen in the final game. Likely named after the Burnout racing series.
ChaosDrive ✓
CharacterMaterial Responsible for rendering playable characters, NPCs, and many random hub world objects. By far the densest shader in the game, including many unused techniques. ✓ ✓
ColorCopyFilter
ColorCorrectionFilter
ColorOutFilter Outputs a solid colour. Used for bright areas of spotlights in White Acropolis stealth sections.
Common
conditional_rendering Used in rendering of lens flare effect.
CopyFilter
core_circle
CscGlass00 ✓
CscGlass01
CscGlass02 ✓
CscScene00 ✓
CscScene01 ✓
CscScene02
CscScene03
csd Used in rendering of CSD (UI) scenes.
csd3D Used for world-space UI like enemy health gauges.
csdBG
cyl
DepthOfFieldFilter Unused in the final game. Likely a depth of field effect similar to the one in Sonic Unleashed.
DtdSand00
DtdSand01 ✓
DtdSand02 ✓
DtdSand03
DtdSand04
DtdScene00 ✓
DtdScene01
DtdScene02 ✓
DtdScene03 ✓
DtdScene04 ✓
DtdScene05
ecb_light Used for Egg Cerberus. ✓
ecb_metal Used for Egg Cerberus. ✓
Effect00 ✓ ✓
egen_light Used for Egg Genesis. ✓
egen_metal Used for Egg Genesis. ✓
egen_slight Used for Egg Genesis. ✓
emob_light Used for Egg Mobile. ✓
emob_metal Used for Egg Mobile. ✓ ✓
en_bullet ✓
en_laser00
en_lava ✓ ✓
en_light ✓ ✓
en_lightani ✓ ✓
en_metal ✓ ✓
en_plating ✓
en_rock ✓ ✓
EndSky00 ✓
FBTex_NrmMap Used by esp_ripple and esp_Sphere ✓
Fence00 ✓
Fence01 ✓
FlcCore00 ✓ ✓
FlcScene00 ✓
FlcScene01
Fluff00 ✓ ✓
Fog00 ✓
font Used in font rendering for CSD.
fsol_armor ✓ ✓
fsol_eye
fsol_fluid
Gadget_Glider
Gadget ✓
gindows
Glass00 ✓
Glass01 ✓
Glass02
Glass03
iblis01_eye ✓ ✓
iblis01_lava ✓ ✓
iblis01_rock ✓
iblis02_eye Unused, iblis02.xno uses iblis01_eye. They seem more or less identical.
iblis02_lava ✓ ✓
iblis02_rock ✓ ✓
iblis03_eye ✓ ✓
iblis03_lava ✓ ✓
iblis03_rock ✓ ✓
Ice00 ✓
Ice01 ✓
Ice02 ✓
Ice03
Item_Board Crisis City snowboard. Separate from White Acropolis board. ✓ ✓
ItemGlass00 ✓ ✓
ItemMetal00 ✓ ✓
KdvAqua00
KdvAqua01 ✓
KdvMist00 ✓
KdvRope
KdvWindRoad
Kyozoress Likely referring to "巨像", the large monsters in Mephiles' final boss fight. ✓ ✓
Laser00
Laser01 ✓ ✓
Leaf00 ✓
Leaf01 ✓
lensflare
LightCore ✓
Lightmap00 ✓
Lightmap01 ✓
LightmapSp00 ✓
LightmapSp01
LightmapSp02 ✓
LightmapSp03
LightmapSp04 ✓
Luminous00 ✓ ✓
Luminous01 ✓ ✓
Luminous02 ✓ ✓
Luminous03 ✓ ✓
Luminous04 ✓ ✓
Luminous05 ✓ ✓
Luminous06 ✓
Luminous07
lzout_pt
lzout
Mantle00 ✓
Mantle01 ✓ ✓
Mantle02 ✓ ✓
MarathonSpeedTree
MaskCopyFilter
Mefiress ✓ ✓
MefiressSpecific ✓
MefiressSpecific2 ✓
Mercury
Metal00 ✓ ✓
Metal01 ✓
Metal02 ✓
MotionBlurFilter BurnoutBlurFilter is used in retail rather than this shader.
movie
movieARGB
movieYUV420
no_shader
OpticalCamouflage Used for rendering camouflaged enemies.
pe
PhaseShiftFilter
physicsviewer
player_homing
primitive
psi_effect Used for rendering Silver's psychokinesis effects. ✓ ✓
Ring ✓
rt_clear
rt_restoration
Rust00 ✓ ✓
SampleFilter
scr_metal ✓
Shield ✓
simple
Sky00 Used for Egg Wyvern fight and E0026 skybox. ✓
Sky01 Used for Egg Wyvern fight skybox. ✓
Sky02 Used for every other skybox not previously mentioned. ✓
Snow00 ✓
Snow01 ✓
Snow02 ✓
Stone00 ✓ ✓
Stone01 ✓ ✓
Stone02 ✓
Stone03 ✓ ✓
Stone04
Terrain00 Only used by kdv_obj_D_bridge01 ✓
Terrain01 Only used by tpj_obj_oldtree and tpj_obj_sphere ✓
Terrain02 Only used by csc_obj_groundA, csc_obj_groundB, and tpj_obj_sphere ✓
Terrain03
Terrain04 Only used by e0125_map02_nos_ and tpj_mapA_roadlm ✓
Terrain05 Used extensively (91 times). ✓ ✓
Terrain06
Terrain07
Tex_Phone
Tex_Spec_Phone
TpjWater00 ✓
TpjWater01 ✓
TwnFence00
TwnGate Used for warp gates. ✓
TwnGlass00
TwnGlideWire
TwnScene00 ✓
TwnScene01
TwnScene02 ✓
TwnScene03
vout
WapScene00 ✓
WapScene01
WapScene02 ✓
Water00
Water01 ✓
Water02
Water03 ✓
Water04 ✓
Water05
Waterrise Unused Kingdom Valley object. Some kind of rippling water/mist. ✓
Wood00 ✓ ✓
Wood01 ✓
Zakoress Referring to "雑魚" small-fry crowd of NPCs, the tiny shadow minions in Mephiles' boss fight. ✓
ZakoressBillboard Billboarded approximation for distant Zakoress.
zout_pt Used for rendering depth pre-pass for punchthrough.
zout Used for rendering depth pre-pass.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.