port: draw the plate's highlight additive, and find my harness poses it where it cannot be seen
blend-bit-vs-oracle.txt entry 2: ptbtn00 alpha-over, ptbtn00f ADDITIVE -- the PRESS (A) plate and its own highlight, one bit apart. Entry 4, the whole title, is alpha-over throughout including ptlogo_back2/ptlogo_back2eff, which independently kills the "frame-shaped and mostly transparent means additive" rule I declined to adopt. Bands are now per DRAW OP rather than per paint-order entry: one band per element cannot express base alpha-over with its own focus record additive. The change reported zero three times and each zero had a different cause. First, additive_elements was assigned to `view` in three places and to `overlay` in none, and the plate is an overlay -- every other decoded rule on that page goes to both. Second, I then measured that the element is never drawn, suppressing its sprite at six times across the cycle for 0 px every time, and was one commit from filing "the port never draws the plate highlight" as a defect. That sweep was invalid: I varied --time while passing --loop-phase=0 in every run, and --loop-phase pins exactly the clock a looping record runs on. Six samples of one phase. Third, swept properly, ptbtn00f contributes 0 px at phase 0 and 22-29k px at phases 20-100 -- and verify-capture's title_plate row poses at loop-phase 0. The row that validates the plate is blind to the plate's pulse by construction. It correctly reports 13.03 / 0.09 % unchanged while the fix moves 26 319 px at phase 20. Stated in the tool next to the pose. Not verified against the oracle: every title-plate capture we hold is at the blind phase, so no capture here can confirm the port now draws it right. Asked.
This commit is contained in:
@@ -1396,6 +1396,14 @@ func _raise_overlay(name: String) -> void:
|
||||
# the announcement to cover the overlay -- the guard's first use.
|
||||
overlay.leaf_time_units = view.leaf_time_units
|
||||
overlay.draw_leaf_for = _draw_leaf_for
|
||||
# 🔴 THE OVERLAY IS A SECOND ScreenView AND IT WAS NOT GETTING THIS. Every
|
||||
# other decoded rule on this page is assigned to `view` AND to `overlay`, and
|
||||
# `additive_elements` was assigned to `view` in three places and to `overlay`
|
||||
# in none -- so the PRESS (A) plate, which is an overlay, kept drawing its
|
||||
# focus record alpha-over after the blend was wired in. The change reported
|
||||
# EXACTLY ZERO against the capture, which is what a change that never reached
|
||||
# the renderer looks like.
|
||||
overlay.additive_elements = _additive_elements
|
||||
overlay.loop_leaf = _loop_leaf_screens.has(name)
|
||||
overlay.holding = true
|
||||
overlay.time_units = 0.0
|
||||
|
||||
@@ -782,15 +782,29 @@ func _draw() -> void:
|
||||
var additive_here: Array = additive_elements.get(
|
||||
String(screen.get("name", "")), [])
|
||||
var order: Array = screen.get("paint_order", [])
|
||||
# 🔴 BANDS ARE PER DRAW OP, NOT PER ELEMENT, and the plate is why. `ptbtn00` is
|
||||
# drawn alpha-over and its own focus record `ptbtn00f` ADDITIVE -- same screen,
|
||||
# same element, adjacent draws, measured off the GPU. One band per paint-order
|
||||
# entry cannot express that, and the first version of this file could not draw
|
||||
# the PRESS (A) plate's pulse at all: both halves went through the base's band.
|
||||
var band_of := {}
|
||||
var band_additive: Array[bool] = []
|
||||
var prev := -1
|
||||
for index: int in order:
|
||||
var add_it: bool = additive_here.has(String(elements[index].get("id", "")))
|
||||
if prev == -1 or add_it != band_additive[prev]:
|
||||
band_additive.append(add_it)
|
||||
prev += 1
|
||||
band_of[index] = prev
|
||||
var el: Dictionary = elements[index]
|
||||
var eid := String(el.get("id", ""))
|
||||
var parts: Array = [[index, "base"], [index, "focus"]] if el.has("focus") \
|
||||
else [[index, "base"]]
|
||||
for part: Array in parts:
|
||||
var pid := eid
|
||||
if part[1] == "focus":
|
||||
var fes: Array = el.get("focus", {}).get("elements", [])
|
||||
pid = String(fes[0].get("id", eid)) if not fes.is_empty() else eid
|
||||
var add_it: bool = additive_here.has(pid)
|
||||
if prev == -1 or add_it != band_additive[prev]:
|
||||
band_additive.append(add_it)
|
||||
prev += 1
|
||||
band_of[[index, part[1]]] = prev
|
||||
for i in band_additive.size():
|
||||
_band(i, band_additive[i])
|
||||
# Runs left over from a screen with more of them would still hold last
|
||||
@@ -800,7 +814,7 @@ func _draw() -> void:
|
||||
for index: int in order:
|
||||
var element: Dictionary = elements[index]
|
||||
var id: String = element.get("id", "")
|
||||
_target = _bands[band_of[index]]
|
||||
_target = _bands[band_of[[index, "base"]]]
|
||||
if ghosts.has(index):
|
||||
skipped.append("%s (template instance)" % id)
|
||||
continue
|
||||
@@ -838,6 +852,7 @@ func _draw() -> void:
|
||||
# A FOCUSED button draws its record INSTEAD of its base sprite -- measured,
|
||||
# the focused sprite covers the base at 100.0 % of base-visible pixels.
|
||||
if focused_id == id and element.has("focus"):
|
||||
_target = _bands[band_of[[index, "focus"]]]
|
||||
_draw_focus(element)
|
||||
continue
|
||||
# 🔴 A LOOPING record draws IN ADDITION to the base, not instead of it.
|
||||
@@ -869,6 +884,7 @@ func _draw() -> void:
|
||||
_draw_quad(tex, placement(pose, pivot, tex.get_size()), colour, pivot, pos, rot)
|
||||
drawn.append(id)
|
||||
if loops_focus:
|
||||
_target = _bands[band_of[[index, "focus"]]]
|
||||
_draw_focus(element)
|
||||
elif element.get("role", "") == "primitive" and element.has("size"):
|
||||
# A primitive has no texture; the quad is its declared size and its
|
||||
|
||||
Reference in New Issue
Block a user