Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. WalkthroughThe change adds capability and rendering operations to Renderer and implements them in DX8Backend. Rendering paths across WW3D, game clients, and tools now use Renderer. The change also adds a checked-cast template and updates debug macro definitions in GameText.cpp. ChangesRenderer interface migration
Utility and Autorun updates
Estimated code review effort: 4 (Complex) | ~50 minutes Change: Refactor Possibly related PRs
Suggested reviewers: Merge Risk:
|
| // Draws until End_Shroud_Overlay multiply the frame by the shroud at the drawn world position. | ||
| // Only pixels at the depth already in the depth buffer change. | ||
| static void Begin_Shroud_Overlay(const RenderShroudOverlay & overlay); | ||
| static void End_Shroud_Overlay(); |
There was a problem hiding this comment.
Why is this moved into the Renderer? Will the implementation always differ between renderer backends and there is no way it can be higher up? Why?
There was a problem hiding this comment.
The backend hides the DX8 camera-space texture generation, texture transform and depth state. Another backend would do this in its shader instead. The shroud texture and map projection stay in W3DShaderManager. I renamed the interface to Begin_Projected_Overlay with RenderProjectedOverlay, so it is a general projected multiply pass and shroud is just the caller.
There was a problem hiding this comment.
Would agree it needs to be higher up, or the function should be made more generic, like there are some specific choices in DX8Wrapper backend I would expect in GameEngineDevice and not in WW3D2:
Get_Preset(PRELIT_DIFFUSE)
Set_Texture(0, overlay.texture)
Set_Shader(_PresetMultiplicativeSpriteShader)
ZFUNC = EQUAL
There was a problem hiding this comment.
@xezon @stephanmeesters At first I only reworded the comment and renamed Begin_Shroud_Overlay to Begin_Projected_Overlay to make it sound more generic. After your comments I reworked it. Begin_Projected_Overlay is gone. The shroud pass is back in W3DShaderManager. It sets the material, texture, shader and depth test itself and builds the texture matrix from Renderer::Get_Transform. Renderer only gained generic calls for what it couldn't express yet - Set_Texture_Coord_Source, Set_Texture_Transform_Count and Set_Depth_Compare.
…_cast in BaseFunctions.h
58d0787 to
50f9297
Compare
…ture coordinate and depth compare primitives to Renderer
[High impact] The PR appears safe to merge; no actionable issues were found.
|
Follow up for #2613
Merge after #3700
This change routes the shroud texture pass states through Renderer.
W3DShaderManager keeps the pass and picks the material, texture, shader and depth test itself. Renderer gains Set_Texture_Coord_Source, Set_Texture_Transform_Count and Set_Depth_Compare for the states it could not set before. The texture matrix is built from Renderer::Get_Transform.
Testing