Skip to content

refactor(w3dshadermanager): Remove unused flat shroud texture shader - #3474

Draft
bobtista wants to merge 15 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/remove-flat-shroud-shader
Draft

bobtista wants to merge 15 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/remove-flat-shroud-shader

Conversation

@bobtista

@bobtista bobtista commented Oct 11, 2026 •

Copy link
Copy Markdown

W3DShaderManager registers FlatShroudTextureShader as ST_FLAT_SHROUD_TEXTURE. Nothing selects that shader type, so the class never runs. It still holds its own copy of the shroud projection code and calls DX8Wrapper directly.

Now the class, its shader list and the ST_FLAT_SHROUD_TEXTURE value are removed.

Zero Hour save at 60 seconds on top, Generals shell map below. Before on the left, after on the right.

pr3474

Todo:

  • Build win32 and vc6, including W3DView and WorldBuilder
  • Load two skirmish saves and the shell map, open W3DView, and open WorldBuilder. Same result as main

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The change adds rendering operations to the Renderer interface and DX8 backend, then routes WW3D, game, and editor rendering code through that interface. It also removes the flat-shroud shader-list entry and updates river vertex colors based on shroud data when available.

Changes

Renderer API Migration

Layer / File(s) Summary
Renderer interface and DX8 forwarding
Core/Libraries/Source/WWVegas/WW3D2/Renderer.h, Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cpp, Core/Libraries/Source/WWVegas/WW3D2/dx8wrapper.h
Renderer adds device, render-target, state, buffer, draw, transform, lighting, and fog operations. DX8Backend forwards these operations to DX8Wrapper.
WW3D rendering and state callers
Core/Libraries/Source/WWVegas/WW3D2/*, GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/*
WW3D classes use Renderer for rendering state, buffer binding, drawing, transforms, render-target operations, and device queries. Existing sorting paths and draw parameters remain as described.
Terrain, effects, and water rendering
Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h, Core/GameEngineDevice/Source/W3DDevice/GameClient/*, Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/*
Terrain, shader, effect, and water paths use Renderer for rendering operations. The flat-shroud shader is removed from the shader list. River vertex colors use shroud levels when available.
Scene objects and shadows
GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/*
Object, overlay, and shadow rendering paths use Renderer for state setup, resource binding, capability checks, and drawing.
Editor and preview rendering
Core/Tools/W3DView/ScreenCursor.cpp, GeneralsMD/Code/Tools/WorldBuilder/src/*
W3DView and WorldBuilder use Renderer for rendering operations and render-target setup.

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Refactor

Suggested reviewers: xezon

Merge Risk: Minimal · previous review 8e9a8

No merge-blocking issue is established by the available evidence. The river-shroud lookup concern predates this change.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the main change: removal of the unused flat shroud texture shader. The raw summary confirms the class, its shader-list entry, and the ST_FLAT_SHROUD_TEXTURE enum value are removed in W…
Description check Passed The description matches the changeset. It states that FlatShroudTextureShader registered as ST_FLAT_SHROUD_TEXTURE is never selected, and that the class, its shader list, and the enum value are remove…
Full details: Title check

Explanation

The title names the main change: removal of the unused flat shroud texture shader. The raw summary confirms the class, its shader-list entry, and the ST_FLAT_SHROUD_TEXTURE enum value are removed in W3DShaderManager.h and W3DShaderManager.cpp. The title does not mention the large Renderer migration across many files, but the changeset also contains that work, so the title is partially related to the changeset rather than off-topic.

Full details: Description check

Explanation

The description matches the changeset. It states that FlatShroudTextureShader registered as ST_FLAT_SHROUD_TEXTURE is never selected, and that the class, its shader list, and the enum value are removed, which the raw summary confirms. It also reports build and load testing and a follow-up relationship to #3425.

ℹ️ Recent review info

⚙️ Run configuration

  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae7546b0-ca51-481f-9fd2-7350bc1c8e90
📥 Commits

Reviewing files that changed from the base of the PR and between f746af7 and 8e9a8a0280b01296fc64d3862b650ad5d0973195.

📒 Files selected for processing (51)

  • Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/BaseHeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/FlatHeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/HeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDebugIcons.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DScorch.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainBackground.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainTracks.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWater.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/Renderer.h
  • Core/Libraries/Source/WWVegas/WW3D2/dx8polygonrenderer.h
  • Core/Libraries/Source/WWVegas/WW3D2/dx8renderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/dx8wrapper.h
  • Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/streakRender.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/texproject.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp
  • Core/Tools/W3DView/ScreenCursor.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBibBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBridgeBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DRoadBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/camera.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/linegrp.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mapper.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mesh.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/render2d.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/scene.cpp
  • GeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cpp
  • GeneralsMD/Code/Tools/WorldBuilder/src/ObjectPreview.cpp
💤 Files with no reviewable changes (1)

  • Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@bobtista
bobtista force-pushed the bobtista/refactor/remove-flat-shroud-shader branch from 8e9a8a0 to 6a5ce47 Compare October 17, 2026 20:00
@bobtista
bobtista force-pushed the bobtista/refactor/remove-flat-shroud-shader branch from 6a5ce47 to 3b7d477 Compare October 28, 2026 18:07
@bobtista
bobtista force-pushed the bobtista/refactor/remove-flat-shroud-shader branch 3 times, most recently from 07e6122 to 1dd2276 Compare November 15, 2026 19:18
@bobtista
bobtista force-pushed the bobtista/refactor/remove-flat-shroud-shader branch 4 times, most recently from 7c40db4 to 8567676 Compare November 18, 2026 02:35
@bobtista
bobtista force-pushed the bobtista/refactor/remove-flat-shroud-shader branch from 8567676 to c3df6ba Compare November 19, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant