Skip to content

[agc] Reset transparent Chowdren effect-layer fills - #83

Merged
par274 merged 1 commit into
sharpemu:mainfrom
xnetcat:codex/dreaming-sarah-effect-layers
Jul 12, 2026
Merged

[agc] Reset transparent Chowdren effect-layer fills#83
par274 merged 1 commit into
sharpemu:mainfrom
xnetcat:codex/dreaming-sarah-effect-layers

Conversation

@xnetcat

@xnetcat xnetcat commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize Chowdren’s untextured transparent-black premultiplied fill as an effect-layer reset
  • prevent Dreaming Sarah fog and vignette render targets from accumulating across frames
  • provide SHARPEMU_DISABLE_TRANSPARENT_FILL_CLEAR=1 to restore the previous behavior

Scope

This is the minimal rendering portion of the earlier Dreaming Sarah investigation: 51 additions and one call-site change in AgcExports.cs. It deliberately excludes the unrelated guest-image synchronization and diagnostics work.

Validation

  • $HOME/.dotnet/dotnet build SharpEmu.slnx --no-restore

Treat the exact untextured transparent-black premultiplied fill used by Chowdren as an overwrite. This prevents Dreaming Sarah fog and vignette render targets from accumulating across frames; SHARPEMU_DISABLE_TRANSPARENT_FILL_CLEAR=1 restores prior behavior.
Copilot AI review requested due to automatic review settings July 12, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the AGC draw translation path to recognize a specific Chowdren “transparent black premultiplied fill” pattern as an effect-layer reset, preventing render-target accumulation across frames (notably for Dreaming Sarah fog/vignette). It also adds an opt-out environment variable to restore prior behavior.

Changes:

  • Wraps the computed VulkanGuestRenderState with a new heuristic (ApplyTransparentPremultipliedFillClear) before creating TranslatedGuestDraw.
  • Detects the “untextured + no vertex inputs + transparent RGBA + premultiplied One/OneMinusSrcAlpha” draw shape and disables blending to force an overwrite.
  • Adds SHARPEMU_DISABLE_TRANSPARENT_FILL_CLEAR=1 to disable this behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/SharpEmu.Libs/Agc/AgcExports.cs
@par274
par274 merged commit 8c15077 into sharpemu:main Jul 12, 2026
4 checks passed
@xnetcat
xnetcat deleted the codex/dreaming-sarah-effect-layers branch July 13, 2026 23:37
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.

3 participants