mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
spirv_demote turned every OpKill inside a selection into OpDemoteToHelperInvocation on AMD's Windows driver. A demoted fragment runs the rest of the shader, so every alpha-tested draw (grass, foliage, hair) paid for its discarded pixels. The cloud fringe of #164 came from OpImageQueryLod after the discard. Now a discard is demoted only when an OpImageQueryLod, an explicit derivative or a function call follows it in its function; the rest keep the plain discard, as before 0.4.1. On the field save 1 of 128 shaders with a discard is demoted, and the picture keeps the fix. demote has a row in the settings table and a description in totk.ini.example, so demote = 0 or 1 in the ini no longer logs an unknown key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>