Enables

From wowdev
Revision as of 14:20, 30 May 2023 by Karliky (talk | contribs) (→‎Offsets & Default Values)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rendering flags control how the WoW rendering engine paints the world onto the screen. We call them Enables, because that's what the reverse engineering suggests.

This is how a normal render pipeline works for any WoW version (pseudocode):

Wow.exe-> StormStaticEntryPoint
 Wow.exe-> PaintScreen 
   Wow.exe-> OnPaint
   Wow.exe-> CGWorldFrame::RenderWorld 
       Wow.exe-> CGWorldFrame::OnWorldRender 
       Wow.exe-> CWorld::Render
           WoW.exe.DayNightRenderSky
               WoW.exe.GxSceneClear
               WoW.exe.DNSky::Render
               WoW.exe.DNStars::Render
               WoW.exe.DNPlanet::Render
               WoW.exe.DNPlanet::Render
               WoW.exe.DNClouds::Render
           WoW.exe.CWorldScene::RenderHorizon
           WoW.exe.CWorldScene::RenderChunks
           WoW.exe.CWorldScene::RenderMapObjDefGroups
           WoW.exe.CWorldScene::RenderOcean
           WoW.exe.CWorldScene::RenderWater
           WoW.exe.CWorldScene::RenderMagma
           WoW.exe.GxXformPop
           WoW.exe.GxRsPop
           WoW.exe.CWorldScene::RenderDoodads
           WoW.exe.CWorldScene::RenderObjects
Start rendering again

As you can see, the stars, planets, clouds and environment stuff is painted first, then the map ADTs are drawn, RenderMapObjDefGroups are WMOs and get painted after ADTs, then every liquid is painted, after that every M2 (Doodads) are painted too, and finally NPC/Players (RenderObjects).

Offsets & Default Values

The flags are stored in 4 Bytes (= 32 Bits) at a static offset which differs every version. Changing Enables may crash your client - especially earlier versions pre Wrath of the Lich King are prone to this. The following list contains data in the format: [version], offset, default value

[0.5.3]
0x00A4046C
0x07104B73
[0.8.0]
0x00A96C30
0x1F900B77
[1.1.2]
0x0069FE7C
0x1F110F77
[1.8.0]
0x007EC93C
0x9F110F77
[1.12.0]
0x0087B2A4
0x9F910F77
[2.4.3]
0x009A4510
0x1F104F73
[3.3.5a]
0x008D774C
0x1F104F73
[4.3.4]
0x00A741A8
0x0001BFFF
[5.4.8]
0x00E371D4
0x0001BFFF
[6.2.3]
0x00F8422C
0x00011FFF
[7.2.5]
0x0102FF3C
0x7FF7FFFF
[7.3.5]
0x01252CC0
0x7FF7FFFF

For every line in WoW.exe, there exists a specific version that incorporates an offset where the instruction set for 'Enables' is situated. By disassembling the memory address corresponding to this offset, one can locate the exact offset that directs to the rendering values. These values go from WoW Alpha 0.5.3 to Legion 7.2:

  • Enables set of instructions WoW_3368-orig_32bit.exe at offset 0x2552480
  • Enables set of instructions WoW_3494-orig_32bit.exe at offset 0x2623600
  • Enables set of instructions WoW_3592-orig_32bit.exe at offset 0x2621920
  • Enables set of instructions WoW_3734-orig_32bit.exe at offset 0x2692640
  • Enables set of instructions WoW_3810-orig_32bit.exe at offset 0x2792640
  • Enables set of instructions WoW_3702-orig_32bit.exe at offset 0x2655984
  • Enables set of instructions WoW_3712-orig_32bit.exe at offset 0x2656624
  • Enables set of instructions WoW_3694-orig_32bit.exe at offset 0x2654608
  • Enables set of instructions WoW_3807-orig_32bit.exe at offset 0x2792256
  • Enables set of instructions WoW_3892-orig_32bit.exe at offset 0x2850624
  • Enables set of instructions WoW_3925-orig_32bit.exe at offset 0x2570576
  • Enables set of instructions WoW_3980-orig_32bit.exe at offset 0x2628992
  • Enables set of instructions WoW_4044-orig_32bit.exe at offset 0x2639040
  • Enables set of instructions WoW_3988-orig_32bit.exe at offset 0x2629024
  • Enables set of instructions WoW_4062-orig_32bit.exe at offset 0x2630736
  • Enables set of instructions WoW_4150-orig_32bit.exe at offset 0x2650880
  • Enables set of instructions WoW_4211-orig_32bit.exe at offset 0x2657520
  • Enables set of instructions WoW_4222-orig_32bit.exe at offset 0x2659616
  • Enables set of instructions WoW_4262-orig_32bit.exe at offset 0x2698576
  • Enables set of instructions WoW_4341-orig_32bit.exe at offset 0x2715296
  • Enables set of instructions WoW_4500-orig_32bit.exe at offset 0x2454464
  • Enables set of instructions WoW_4544-orig_32bit.exe at offset 0x2455152
  • Enables set of instructions WoW_4671-orig_32bit.exe at offset 0x2480208
  • Enables set of instructions WoW_4983-orig_32bit.exe at offset 0x2558192
  • Enables set of instructions WoW_4735-orig_32bit.exe at offset 0x2499344
  • Enables set of instructions WoW_4937-orig_32bit.exe at offset 0x2553664
  • Enables set of instructions WoW_4996-orig_32bit.exe at offset 0x2558192
  • Enables set of instructions WoW_5059-orig_32bit.exe at offset 0x2554464
  • Enables set of instructions WoW_5086-orig_32bit.exe at offset 0x2554432
  • Enables set of instructions WoW_5195-orig_32bit.exe at offset 0x2590448
  • Enables set of instructions WoW_5462-orig_32bit.exe at offset 0x2610656
  • Enables set of instructions WoW_5428-orig_32bit.exe at offset 0x2610592
  • Enables set of instructions WoW_5464-orig_32bit.exe at offset 0x2612480
  • Enables set of instructions WoW_5595-orig_32bit.exe at offset 0x2644464
  • Enables set of instructions WoW_5875-orig_32bit.exe at offset 0x2646016
  • Enables set of instructions WoW_6180-orig_32bit.exe at offset 0x2926832
  • Enables set of instructions WoW_6299-orig_32bit.exe at offset 0x2994368
  • Enables set of instructions WoW_6320-orig_32bit.exe at offset 0x2994656
  • Enables set of instructions WoW_6337-orig_32bit.exe at offset 0x2994400
  • Enables set of instructions WoW_6383-orig_32bit.exe at offset 0x2999200
  • Enables set of instructions WoW_6403-orig_32bit.exe at offset 0x2999840
  • Enables set of instructions WoW_6546-orig_32bit.exe at offset 0x3000400
  • Enables set of instructions WoW_6448-orig_32bit.exe at offset 0x3000368
  • Enables set of instructions WoW_6692-orig_32bit.exe at offset 0x2291648
  • Enables set of instructions WoW_6729-orig_32bit.exe at offset 0x2291248
  • Enables set of instructions WoW_6739-orig_32bit.exe at offset 0x2291760
  • Enables set of instructions WoW_6803-orig_32bit.exe at offset 0x2296768
  • Enables set of instructions WoW_6898-orig_32bit.exe at offset 0x2298880
  • Enables set of instructions WoW_7272-orig_32bit.exe at offset 0x2374928
  • Enables set of instructions WoW_7359-orig_32bit.exe at offset 0x2375248
  • Enables set of instructions WoW_7318-orig_32bit.exe at offset 0x2377568
  • Enables set of instructions WoW_7561-orig_32bit.exe at offset 0x2600352
  • Enables set of instructions WoW_7741-orig_32bit.exe at offset 0x2616144
  • Enables set of instructions WoW_7799-orig_32bit.exe at offset 0x2616272
  • Enables set of instructions WoW_8089-orig_32bit.exe at offset 0x1106752
  • Enables set of instructions WoW_8125-orig_32bit.exe at offset 0x1106576
  • Enables set of instructions WoW_8278-orig_32bit.exe at offset 0x1107088
  • Enables set of instructions WoW_8606-orig_32bit.exe at offset 0x2693856
  • Enables set of instructions WoW_8874-orig_32bit.exe at offset 0x3146688
  • Enables set of instructions WoW_9056-orig_32bit.exe at offset 0x3141728
  • Enables set of instructions WoW_9183-orig_32bit.exe at offset 0x3144864
  • Enables set of instructions WoW_9464-orig_32bit.exe at offset 0x3143200
  • Enables set of instructions WoW_9506-orig_32bit.exe at offset 0x3143200
  • Enables set of instructions WoW_9551-orig_32bit.exe at offset 0x3144208
  • Enables set of instructions WoW_9806-orig_32bit.exe at offset 0x1008160
  • Enables set of instructions WoW_9767-orig_32bit.exe at offset 0x1008256
  • Enables set of instructions WoW_9835-orig_32bit.exe at offset 0x1008160
  • Enables set of instructions WoW_9901-orig_32bit.exe at offset 0x1011728
  • Enables set of instructions WoW_9947-orig_32bit.exe at offset 0x1011088
  • Enables set of instructions WoW_10958-orig_32bit.exe at offset 0x3571344
  • Enables set of instructions WoW_11403-orig_32bit.exe at offset 0x3573152
  • Enables set of instructions WoW_11685-orig_32bit.exe at offset 0x1121936
  • Enables set of instructions WoW_10192-orig_32bit.exe at offset 0x3445840
  • Enables set of instructions WoW_11723-orig_32bit.exe at offset 0x1121936
  • Enables set of instructions WoW_10314-orig_32bit.exe at offset 0x3446896
  • Enables set of instructions WoW_12213-orig_32bit.exe at offset 0x3731312
  • Enables set of instructions WoW_10482-orig_32bit.exe at offset 0x3448464
  • Enables set of instructions WoW_10505-orig_32bit.exe at offset 0x3448928
  • Enables set of instructions WoW_11159-orig_32bit.exe at offset 0x3572112
  • Enables set of instructions WoW_12340-orig_32bit.exe at offset 0x3730080
  • Enables set of instructions WoW_15050-orig_32bit.exe at offset 0x3271856
  • Enables set of instructions WoW_15211-orig_32bit.exe at offset 0x3278704
  • Enables set of instructions WoW_15354-orig_32bit.exe at offset 0x3276416
  • Enables set of instructions WoW_15595-orig_32bit.exe at offset 0x3282560
  • Enables set of instructions WoW_15890-orig_32bit.exe at offset 0x7136112
  • Enables set of instructions WoW_16016-orig_32bit.exe at offset 0x7255696
  • Enables set of instructions WoW_16048-orig_32bit.exe at offset 0x7254000
  • Enables set of instructions WoW_16057-orig_32bit.exe at offset 0x7254000
  • Enables set of instructions WoW_16135-orig_32bit.exe at offset 0x7254000
  • Enables set of instructions WoW_16309-orig_32bit.exe at offset 0x7469760
  • Enables set of instructions WoW_16357-gluexmlOff_32bit.exe at offset 0x7469504
  • Enables set of instructions WoW_16650-orig_32bit.exe at offset 0x7716000
  • Enables set of instructions WoW_16357-orig_32bit.exe at offset 0x7469504
  • Enables set of instructions WoW_16669-orig_32bit.exe at offset 0x7716688
  • Enables set of instructions WoW_16683-orig_32bit.exe at offset 0x7716624
  • Enables set of instructions WoW_16685-orig_32bit.exe at offset 0x7713232
  • Enables set of instructions WoW_16701-orig_32bit.exe at offset 0x7714416
  • Enables set of instructions WoW_16709-orig_32bit.exe at offset 0x7713664
  • Enables set of instructions WoW_16716-orig_32bit.exe at offset 0x7716784
  • Enables set of instructions WoW_16733-orig_32bit.exe at offset 0x7717072
  • Enables set of instructions WoW_16760-orig_32bit.exe at offset 0x7713584
  • Enables set of instructions WoW_16826-orig_32bit.exe at offset 0x7715536
  • Enables set of instructions WoW_16769-orig_32bit.exe at offset 0x7713584
  • Enables set of instructions WoW_16965-orig_32bit.exe at offset 0x5904555
  • Enables set of instructions WoW_16977-orig_32bit.exe at offset 0x5905645
  • Enables set of instructions WoW_16981-orig_32bit.exe at offset 0x5905645
  • Enables set of instructions WoW_16983-orig_32bit.exe at offset 0x5906909
  • Enables set of instructions WoW_16992-orig_32bit.exe at offset 0x5907029
  • Enables set of instructions WoW_17055-orig_32bit.exe at offset 0x5907167
  • Enables set of instructions WoW_17116-orig_32bit.exe at offset 0x5907521
  • Enables set of instructions WoW_17128-orig_32bit.exe at offset 0x5905171
  • Enables set of instructions WoW_17345-orig_32bit.exe at offset 0x6156827
  • Enables set of instructions WoW_17359-orig_32bit.exe at offset 0x6154712
  • Enables set of instructions WoW_17371-orig_32bit.exe at offset 0x6154705
  • Enables set of instructions WoW_17399-orig_32bit.exe at offset 0x6154705
  • Enables set of instructions WoW_17538-orig_32bit.exe at offset 0x6145925
  • Enables set of instructions WoW_17645-orig_32bit.exe at offset 0x6209436
  • Enables set of instructions WoW_17658-orig_32bit.exe at offset 0x6209775
  • Enables set of instructions WoW_17688-orig_32bit.exe at offset 0x6209775
  • Enables set of instructions WoW_17898-orig_32bit.exe at offset 0x6214023
  • Enables set of instructions WoW_17930-orig_32bit.exe at offset 0x6214420
  • Enables set of instructions WoW_17956-orig_32bit.exe at offset 0x6215776
  • Enables set of instructions WoW_18019-orig_32bit.exe at offset 0x6215809
  • Enables set of instructions WoW_18273-orig_32bit.exe at offset 0x6215863
  • Enables set of instructions WoW_18291-orig_32bit.exe at offset 0x6214413
  • Enables set of instructions WoW_18414-orig_32bit.exe at offset 0x6214716
  • Enables set of instructions WoW_19027-orig_32bit.exe at offset 0x5207450
  • Enables set of instructions WoW_19033-orig_32bit.exe at offset 0x5208516
  • Enables set of instructions WoW_19034-orig_32bit.exe at offset 0x5208064
  • Enables set of instructions WoW_19085-orig_32bit.exe at offset 0x5213453
  • Enables set of instructions WoW_19102-orig_32bit.exe at offset 0x5213327
  • Enables set of instructions WoW_19103-orig_32bit.exe at offset 0x5213453
  • Enables set of instructions WoW_19116-orig_32bit.exe at offset 0x5215333
  • Enables set of instructions WoW_19227-orig_32bit.exe at offset 0x5215289
  • Enables set of instructions WoW_19243-orig_32bit.exe at offset 0x5215068
  • Enables set of instructions WoW_19342-orig_32bit.exe at offset 0x5214871
  • Enables set of instructions WoW_19678-orig_32bit.exe at offset 0x5347733
  • Enables set of instructions WoW_19702-orig_32bit.exe at offset 0x5347110
  • Enables set of instructions WoW_19802-orig_32bit.exe at offset 0x5359909
  • Enables set of instructions WoW_19831-orig_32bit.exe at offset 0x5359909
  • Enables set of instructions WoW_19865-orig_32bit.exe at offset 0x5360262
  • Enables set of instructions WoW_20173-orig_32bit.exe at offset 0x5627865
  • Enables set of instructions WoW_20182-orig_32bit.exe at offset 0x5628333
  • Enables set of instructions WoW_20201-orig_32bit.exe at offset 0x5629075
  • Enables set of instructions WoW_20216-orig_32bit.exe at offset 0x5629133
  • Enables set of instructions WoW_20253-orig_32bit.exe at offset 0x5629031
  • Enables set of instructions WoW_20338-orig_32bit.exe at offset 0x5629050
  • Enables set of instructions WoW_20444-orig_32bit.exe at offset 0x5668827
  • Enables set of instructions WoW_20490-orig_32bit.exe at offset 0x5669545
  • Enables set of instructions WoW_20574-orig_32bit.exe at offset 0x5669536
  • Enables set of instructions WoW_20726-orig_32bit.exe at offset 0x5669698
  • Enables set of instructions WoW_20779-orig_32bit.exe at offset 0x5669713
  • Enables set of instructions WoW_21336-orig_32bit.exe at offset 0x5658546
  • Enables set of instructions WoW_20886-orig_32bit.exe at offset 0x5669666
  • Enables set of instructions WoW_21345-orig_32bit.exe at offset 0x5659509
  • Enables set of instructions WoW_21348-orig_32bit.exe at offset 0x5659237
  • Enables set of instructions WoW_21355-orig_32bit.exe at offset 0x5659005
  • Enables set of instructions WoW_21463-orig_32bit.exe at offset 0x5659281
  • Enables set of instructions WoW_21676-orig_32bit.exe at offset 0x5659268
  • Enables set of instructions WoW_21742-orig_32bit.exe at offset 0x5659281
  • Enables set of instructions WoW_22900-orig_32bit.exe at offset 0x6195449
  • Enables set of instructions WoW_22908-orig_32bit.exe at offset 0x6196141
  • Enables set of instructions WoW_22950-orig_32bit.exe at offset 0x6197613
  • Enables set of instructions WoW_22989-orig_32bit.exe at offset 0x6197573
  • Enables set of instructions WoW_22995-orig_32bit.exe at offset 0x6197700
  • Enables set of instructions WoW_22996-orig_32bit.exe at offset 0x6197609
  • Enables set of instructions WoW_23222-orig_32bit.exe at offset 0x6198037
  • Enables set of instructions WoW_23360-orig_32bit.exe at offset 0x6203794
  • Enables set of instructions WoW_23420-orig_32bit.exe at offset 0x6205204
  • Enables set of instructions WoW_23826-orig_32bit.exe at offset 0x6562532
  • Enables set of instructions WoW_23835-orig_32bit.exe at offset 0x6560575
  • Enables set of instructions WoW_23836-orig_32bit.exe at offset 0x6561884
  • Enables set of instructions WoW_23846-orig_32bit.exe at offset 0x6562391
  • Enables set of instructions WoW_23852-orig_32bit.exe at offset 0x6562391
  • Enables set of instructions WoW_23857-orig_32bit.exe at offset 0x6562193
  • Enables set of instructions WoW_23877-orig_32bit.exe at offset 0x6562593
  • Enables set of instructions WoW_23905-orig_32bit.exe at offset 0x6563323
  • Enables set of instructions WoW_23911-orig_32bit.exe at offset 0x6563323
  • Enables set of instructions WoW_23937-orig_32bit.exe at offset 0x6563694
  • Enables set of instructions WoW_24015-orig_32bit.exe at offset 0x6563983
  • Enables set of instructions WoW_24330-orig_32bit.exe at offset 0x6541587
  • Enables set of instructions WoW_24367-orig_32bit.exe at offset 0x6540884
  • Enables set of instructions WoW_24414-orig_32bit.exe at offset 0x6540859
  • Enables set of instructions WoW_24415-orig_32bit.exe at offset 0x6540942
  • Enables set of instructions WoW_24430-orig_32bit.exe at offset 0x6540727
  • Enables set of instructions WoW_24461-orig_32bit.exe at offset 0x6543835
  • Enables set of instructions WoW_24742-orig_32bit.exe at offset 0x6543563

Flag Positions

Throughout all the years of development the list of available Enables and their respective positions has changed a lot. Certain Bits might not have any effect at all or their purpose hasn't been determined yet. A video explaining each flag for 3.3.5a can be found here.

[1.12.1]
0x00000001 PixelShaders
0x00000002 Specular
0x00000004 MapObjectTextures
0x00000008 
0x00000010 
0x00000020 ShowQuery
0x00000040 MapObjectLighting
0x00000080 PortalDisplay
0x00000100 TerrainLowDetail
0x00000200 TerrainShadows
0x00000400 TriangleStrips
0x00000800 TerrainLOD
0x00001000 TerrainDoodadCollisionVisuals
0x00002000 TerrainDoodadAABoxVisuals
0x00004000 
0x00008000 TrilinearFiltering
0x00010000 FootPrints
0x00020000 Water
0x00040000 Anisotropic
0x00080000 WaterParticulates
0x00100000 
0x00200000 TerrainCulling
0x00400000 PortalVisual
0x00800000 DoodadAnimation
0x01000000 CrappyBatches
0x02000000 BSPRender
0x04000000 MapObjects
0x08000000 Terrain
0x10000000 TerrainDoodads
0x20000000 DisableDoodadFullAlpha
0x40000000 DetailDoodads
0x80000000 ZoneBoundaryVisuals
[3.3.5a]
0x00000001 M2
0x00000002 Terrain
0x00000004 
0x00000008 
0x00000010 
0x00000020 Terrain Culling
0x00000040 M2 / WMO Shadows
0x00000080 
0x00000100 WMO
0x00000200 WMO Lighting
0x00000400 Footprints
0x00000800 WMO Textures
0x00001000 WMO Portals
0x00002000 Occluders
0x00004000 M2 Fade
0x00008000 
0x00010000 
0x00020000 
0x00040000 
0x00080000 
0x00100000 Ground Clutter
0x00200000 Collision
0x00400000 
0x00800000 
0x01000000 Liquid Surface
0x02000000 Liquid Particles
0x04000000 Mountains
0x08000000 Specular Lighting
0x10000000 RenderObject Shadows
0x20000000 Wireframe
0x40000000 Normals
0x80000000 
[6.0.1]
0x00000001 showDoodads
0x00000002 showTerrain
0x00000004 
0x00000008 
0x00000010 showShadow
0x00000020 showMapObjs
0x00000040 showFootPrints
0x00000080 showDetailDoodads
0x00000100 showLowDetail
0x00000200 showWater
0x00000400 showParticulates
0x00000800 projectedTextures
0x00001000 occlusion
0x00002000 
0x00004000 
0x00008000 terrainTextureLod
0x00010000 hardware PCF
0x00020000 
0x00040000 
0x00080000 
0x00100000 showPortals
0x00200000 showCollision
0x00400000 showOccluders
0x00800000 showTerrainOccluders
0x01000000 showChunkBatches
0x02000000 debugShowZoneBounds
0x04000000 showQuery
0x08000000 showTris
0x10000000 showNormals
0x20000000 showFlightBounds
0x40000000 terrainHoles
0x80000000

WoW Alpha 0.5.3

This version is quite special in terms of Enables, as some rendering flags don't exist in Vanilla and beyond. One great thing about these Enables is, that they can be used to illuminate some parts of WoW that weren't illumated properly, like Dun Garok.

M2 Collision Boxes
Looking for the "Lisa" wall
Pikes over M2
Dun Garok
Dun Garok with lightning