Skip to content

Honor GS COLCLAMP during alpha blending - #230

Open
GTTeancum wants to merge 1 commit into
ran-j:mainfrom
GTTeancum:codex/gs-colclamp
Open

Honor GS COLCLAMP during alpha blending#230
GTTeancum wants to merge 1 commit into
ran-j:mainfrom
GTTeancum:codex/gs-colclamp

Conversation

@GTTeancum

Copy link
Copy Markdown

Summary

  • apply the GS COLCLAMP register to CPU alpha-blend output
  • retain the low eight bits when clamping is disabled
  • saturate channels when clamping is enabled
  • add a regression test covering both modes with identical blend state

Rationale

The GS frontend already records COLCLAMP, but the CPU backend unconditionally used saturating conversion for alpha-blended RGB. This made COLCLAMP=0 behave like COLCLAMP=1 and could turn overflowing effects into saturated colors.

Tests

  • cmake --build out/colclamp-test --config Release --target ps2x_tests --parallel 1
  • out/colclamp-test/ps2xTest/Release/ps2x_tests.exe from repository root: 426 passed, 0 failed

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