CAS/RCAS sharpening: verify placement vs TAA/FSR (currently post-AA but pre-tonemap in HDR); option to sharpen at the end of the chain #434

Open
opened 2026-10-05 12:18:39 +00:00 by sky_line · 0 comments
Owner

Verify where CAS / RCAS sharpening (RenderCASSharpness, Preferences > Graphics / Lightbox) runs relative to TAA and FSR and the rest of the post chain, and consider letting users sharpen at the end (post-TAA/FSR and post-tonemap / post-bloom).

What the code does today (to verify in RenderDoc / with captures)

  • TAA on, no FSR: FSR's RCAS (clean_rcas.comp) runs on the TAA-resolved image as it's written into mHdr (instead of the plain copy). The TAA history stays unsharpened, which is correct: no feedback amplification (llcleanrenderervk.cpp ~14320-14364, #183).
  • FSR on: FSR's own built-in RCAS runs after the upscale (mFsr->record(cmd, f, &sharpened), ~14519); mRcasRan makes the final pass skip its CAS.
  • Neither: the final pass applies CAS (in LDR).
  • RenderVKSharpenOnce (B1/F4a) ensures sharpening happens only once (it used to double-sharpen, and RCAS used to run without TAA).

So with TAA / FSR, sharpening is post-TAA/FSR but pre-tonemap, in HDR, before exposure / tonemapping, bloom, colour grading, the final pass, and any FXAA/SMAA.

Questions

  1. Is HDR-space, pre-tonemap sharpening the right place?
    • RCAS is designed for perceptual (post-tonemap, display-referred) input. Sharpening linear HDR can over-sharpen bright edges / highlights and add halos around light sources and bloom.
    • On the other hand, sharpening before bloom avoids sharpening the bloom.
    • Compare image quality (edges, halos, bloom, specular highlights) for pre- vs post-tonemap.
  2. Does FSR's RCAS strength follow RenderCASSharpness? It should map the same slider to FSR's sharpness parameter consistently; check the mapping and the 0 = off behaviour.
  3. Is the TAA path's RCAS strength consistent with the non-TAA final-pass CAS (the same slider value giving similar perceived sharpness)?
  4. Interaction with FXAA / SMAA: if a post-AA runs after sharpening, it may soften it; decide the order.

Possible change

  • Add a "Sharpen after tone mapping" option (or simply move it), so CAS runs at the end of the chain (after tonemap / bloom / grading, before the UI) on the display-referred image, for the TAA and FSR paths too.
    • With FSR, this means disabling FSR's internal RCAS and running our CAS at output resolution in the final pass.
    • With TAA, it means skipping the HDR RCAS and doing CAS in the final pass.
    • Watch the cost: the final pass may be skipped today when nothing needs it (B1 / F4a).
  • Keep the history unsharpened in all cases.
  • Compare with what other viewers / engines do (FSR's reference places RCAS after upscale, in perceptual space; many engines sharpen post-tonemap).

Done when

  • Documented placement of sharpening for each AA/upscaler mode (verified in a capture).
  • A decision (and option if useful) on pre- vs post-tonemap sharpening, with consistent strength across modes.
  • The wiki graphics page updated.
Verify where **CAS / RCAS sharpening** (`RenderCASSharpness`, Preferences > Graphics / Lightbox) runs relative to **TAA and FSR** and the rest of the post chain, and consider letting users sharpen **at the end** (post-TAA/FSR **and** post-tonemap / post-bloom). ## What the code does today (to verify in RenderDoc / with captures) - **TAA on, no FSR:** FSR's RCAS (`clean_rcas.comp`) runs on the **TAA-resolved** image as it's written into `mHdr` (instead of the plain copy). The TAA **history stays unsharpened**, which is correct: no feedback amplification (`llcleanrenderervk.cpp` ~14320-14364, `#183`). - **FSR on:** FSR's own built-in RCAS runs **after the upscale** (`mFsr->record(cmd, f, &sharpened)`, ~14519); `mRcasRan` makes the final pass skip its CAS. - **Neither:** the **final pass** applies CAS (in LDR). - `RenderVKSharpenOnce` (B1/F4a) ensures sharpening happens only once (it used to double-sharpen, and RCAS used to run without TAA). So with TAA / FSR, sharpening is **post-TAA/FSR but pre-tonemap, in HDR**, before exposure / tonemapping, bloom, colour grading, the final pass, and any FXAA/SMAA. ## Questions 1. **Is HDR-space, pre-tonemap sharpening the right place?** - RCAS is designed for perceptual (post-tonemap, display-referred) input. Sharpening linear HDR can over-sharpen bright edges / highlights and add halos around light sources and bloom. - On the other hand, sharpening before bloom avoids sharpening the bloom. - Compare image quality (edges, halos, bloom, specular highlights) for pre- vs post-tonemap. 2. **Does FSR's RCAS strength follow `RenderCASSharpness`?** It should map the same slider to FSR's sharpness parameter consistently; check the mapping and the 0 = off behaviour. 3. **Is the TAA path's RCAS strength consistent** with the non-TAA final-pass CAS (the same slider value giving similar perceived sharpness)? 4. **Interaction with FXAA / SMAA:** if a post-AA runs after sharpening, it may soften it; decide the order. ## Possible change - Add a **"Sharpen after tone mapping"** option (or simply move it), so CAS runs at the **end of the chain** (after tonemap / bloom / grading, before the UI) on the display-referred image, for the TAA and FSR paths too. - With FSR, this means disabling FSR's internal RCAS and running our CAS at output resolution in the final pass. - With TAA, it means skipping the HDR RCAS and doing CAS in the final pass. - Watch the cost: the final pass may be skipped today when nothing needs it (B1 / F4a). - Keep the history unsharpened in all cases. - Compare with what other viewers / engines do (FSR's reference places RCAS after upscale, in perceptual space; many engines sharpen post-tonemap). ## Done when - [ ] Documented placement of sharpening for each AA/upscaler mode (verified in a capture). - [ ] A decision (and option if useful) on pre- vs post-tonemap sharpening, with consistent strength across modes. - [ ] The wiki graphics page updated.
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#434
No description provided.