Skip to content

Misc Shading

fallenoak edited this page Nov 11, 2016 · 11 revisions

WMO Shading

In Mists of Panderia:

Batch A batches are rendered in 2 passes. Batch B and C batches are rendered in 3 passes. If shaders aren't used, batch B and C batches are rendered in 4 passes.

In Cataclysm:

Batch A batches are rendered in 2 passes. Batch B and C batches are rendered in ? passes.

Rendering Logic

Pass 1

Batch Type A

Batch Type B & C

Pass 2

Batch Type A

Lighting Mode Group Flags Material Flags
0 `0x08
1 `0x08
2 !0x08 && !0x40 !0x20
3 !0x08 && !0x40 0x20

Batch Type B & C

Lighting Mode Group Flags Material Flags
0 Any 0x01
1 Any !0x01 && !0x20
2* Not Used Not Used
3 Any !0x01 && 0x20

* Lighting mode 2 is not used for batch types B & C in pass 2.

Pass 3

Batch Type A

Rendered with 2 passes only.

Batch Type B & C

Lighting Mode Group Flags Material Flags
0* Not Used Not Used
1* Not Used Not Used
2** Any Any
3* Not Used Not Used

* Lighting modes 0, 1, and 3 are not used for batch types B & C in pass 3.

** Lighting mode 2 is always used for batch types B & C in pass 3.

Junk Drawer

Blending

Batch Type A Pass 1

Seems to not put down vertex colors.

  • ALPHATESTENABLE: False
  • ALPHABLENDABLE: True
  • SEPARATEALPHABLENDENABLE: False
  • ALPHAFUNC: D3DCMP_GREATEREQUAL
  • BLENDOP: D3DBLENDOP_ADD
  • SRCBLEND: D3DBLEND_SRCALPHA
  • DESTBLEND: D3DBLEND_ZERO

Batch Type A Pass 2

Seems to put down vertex colors.

  • ALPHATESTENABLE: False
  • ALPHABLENDABLE: True
  • SEPARATEALPHABLENDENABLE: False
  • ALPHAFUNC: D3DCMP_GREATEREQUAL
  • BLENDOP: D3DBLENDOP_ADD
  • SRCBLEND: D3DBLEND_INVSRCALPHA
  • DESTBLEND: D3DBLEND_ONE