Files
behind_glass/.superpowers/sdd/surface-reflection/task-1-review-package.md
T
2026-10-06 12:16:46 +09:00

3.4 KiB
Raw Blame History

Task 1 review package

This workspace is not a Git repository. Review the exact files below as the file-based equivalent of a task diff.

Required inputs

  • Task brief: D:/project/behind_glass/.superpowers/sdd/surface-reflection/task-1-brief.md
  • Implementer report: D:/project/behind_glass/docs/qa-surface-reflection/implementation-report.md
  • Pre-edit shader: D:/project/behind_glass/docs/qa-surface-reflection/baseline-mosaic.frag
  • Current shader: D:/project/behind_glass/src/shaders/mosaic.frag
  • New regression: D:/project/behind_glass/scripts/test-surface-reflection.mjs

Shader diff (git diff --no-index --unified=10)

@@ -258,17 +258,17 @@ void main(){
     vec2 historyTexel=clamp(floor(fract(gridUv)*8.),vec2(0.),vec2(7.));
     vec2 historyUv=(cell*8.+historyTexel+.5)/uRegionAtlasSize;
     vec4 splitHistory=texture2D(uRegionHistory,historyUv);
     vec3 splitColor=splitHistory.a>.00001?splitHistory.rgb/splitHistory.a:radialColor;
     vec3 candidateColor=mix(radialColor,splitColor,splitHistory.a);
     color.rgb=mix(color.rgb,candidateColor,clamp(uRegionStrength*clamp(uStrength,0.,1.)*regionSurfaceValid(finalSceneUv,gh),0.,1.));
   }
 #endif
 #ifndef REGION_ATLAS
   color.a=1.;
-  vec3 v=normalize(uContentCameraPosition-gh),reflected=reflect(-v,nCurved); float lightT=(uLightPosition.z-gh.z)/safeZ(reflected.z); vec2 lightHit=gh.xy+reflected.xy*lightT; vec2 halfSize=vec2(.32,.42)*min(uPaneSize.x,uPaneSize.y); vec2 windowCoord=abs(lightHit-uLightPosition.xy)/halfSize; vec2 windowMask=1.-smoothstep(vec2(.45),vec2(1.15),windowCoord); float spec=windowMask.x*windowMask.y*step(.0001,reflected.z)*step(0.,lightT); float gloss=spec*clamp(uGlossStrength,0.,1.)*.12*edgeWeight*clamp(uStrength,0.,1.); color.rgb=mix(color.rgb,vec3(1.),gloss); gl_FragColor=color;
+  vec3 v=normalize(uContentCameraPosition-gh),reflected=reflect(-v,nCurved); float lightT=(uLightPosition.z-gh.z)/safeZ(reflected.z); vec2 lightHit=gh.xy+reflected.xy*lightT; vec2 halfSize=vec2(.32,.42)*min(uPaneSize.x,uPaneSize.y); vec2 windowCoord=abs(lightHit-uLightPosition.xy)/halfSize; vec2 windowMask=1.-smoothstep(vec2(.45),vec2(1.15),windowCoord); float surfaceReflectionWeight=mix(.35,1.,edgeWeight); float glossStrength=clamp(uGlossStrength,0.,1.); float spec=windowMask.x*windowMask.y*step(.0001,reflected.z)*step(0.,lightT); float specGloss=spec*glossStrength*.12*surfaceReflectionWeight*clamp(uStrength,0.,1.); vec2 broadWindowMask=1.-smoothstep(vec2(.15),vec2(1.75),windowCoord); float broadFacing=pow(max(dot(nCurved,v),0.),2.); float broadReflection=broadWindowMask.x*broadWindowMask.y*broadFacing*glossStrength*.035*surfaceReflectionWeight*clamp(uStrength,0.,1.); color.rgb=mix(color.rgb,vec3(1.),specGloss+broadReflection); gl_FragColor=color;
   #include <colorspace_fragment>
 #else
   color.a=atlasEvidence;
   gl_FragColor=color;
 #endif
 }

The test and report are new files and must be read in full. The exact shader baseline hash reported by the implementer is CEE5F75C7A62A9146CBE451C661C2E0066EE57EB8963A7B0F56C281873F37E35.

Controller visual evidence so far

  • docs/qa-surface-reflection/before-default.png
  • docs/qa-surface-reflection/after-default.png
  • Same 1280×720 dog1/AI-depth/default-condition capture.
  • Frame-interior pixel comparison: mean absolute channel difference 0.3106/255, max channel difference 14, changed channels 13.85%.
  • This confirms a change but does not establish that the requested glass-surface improvement is visually sufficient.