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 PR expands Renderer with capability, state, buffer, draw, transform, blend, and render-target APIs, implements them in DX8Backend, and migrates rendering and capability checks across WW3D, game-client, and editor code. Existing conditions and draw arguments are generally retained; selected direct DX8 state operations remain. ChangesRenderer interface migration
Estimated code review effort: 4 (Complex) | ~60 minutes Change: Refactor Suggested reviewers: Merge Risk:
|
| static void Apply_Render_State_Changes(); | ||
|
|
||
| static void Set_Alpha_Blend_Enable(bool enable); | ||
| static void Set_Blend_Factors(RenderBlend src, RenderBlend dest); |
There was a problem hiding this comment.
Are source and dest always set in pairs? There is no use case ever for setting just one?
There was a problem hiding this comment.
Ok so yes and no. Yes for every site in this PR, both are set. Outside it, W3DWater river blending and the dx8renderer force-multiply path set only the source factor - but the other factor is known at both, so I changed them to set both. That's also how the modern backends take blend state, src and dest together (bgfx, D3D11+, Metal, Vulkan).
…_cast in BaseFunctions.h
5028a80 to
9e9e3a4
Compare
Follow up for #2613
Merge after #3700
This change routes the blend state set by game code through
Renderer.RenderergetsSet_Alpha_Blend_Enable,Set_Blend_FactorsandSet_Blend_Op. Source and destination factors are set in one call. The backend translatesRenderBlendandRenderBlendOpto the D3D8 values explicitly.Routed call sites are the stenciled player color pass in
W3DSceneand the script fade inW3DStatusCircle. The calls and values are the same as before.The single-factor blend sets in river water, trapezoid water edge feathering and the force-multiply path in
DX8TextureCategoryClass::Rendernow set both factors. The other factor is the one already applied by the preceding shader. Other blend states in the shader manager, terrain, water and shadows are left for the effect pass changes.ShaderClass::Applystays in WW3D2.Golden Replay #1 is pixel identical to #3700 at 120, 150 and 180 seconds.