Smooth look on WebGPU: WGSL port fed by GPU inputs and CPU overrides (t88 phase 2c)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -1328,8 +1328,14 @@ with launch(viewport={'width': 1280, 'height': 800}) as (b, pg, url):
|
||||
check('fog toggle shows the same rock', fp.evaluate(sample) != 0)
|
||||
fp.evaluate("SET.fog = true; SET.look = 'smooth'; SM.t0 = performance.now() + 100000")
|
||||
fp.wait_for_timeout(500)
|
||||
check('fog draws in the smooth look', fp.evaluate('R.smoothOn && SM.ok'))
|
||||
check('unseen smooth grains have no terrain shape', fp.evaluate("(() => {const k=(235-R.vy0)*R.bw+300-R.vx0;return R.px[k]===0x04000000 && R.backPx[k]===0 && R.treePx[k]===0 && R.fieldPx[k]===255})()"))
|
||||
check('fog draws in the smooth look', fp.evaluate('R.smoothOn && (R.gpuOn ? GPU.ok : SM.ok)'))
|
||||
fp.add_script_tag(path=str(root / 'test/gpu-readback.js'))
|
||||
check('unseen smooth grains have no terrain shape', fp.evaluate("""async () => {
|
||||
const k=(235-R.vy0)*R.bw+300-R.vx0;
|
||||
const inputs=R.gpuOn ? Array.from((await testSmoothInputs()).slice(k*4,k*4+4)) :
|
||||
[R.px[k],R.backPx[k],R.treePx[k],R.fieldPx[k]];
|
||||
return inputs[0]===0x04000000 && inputs[1]===0 && inputs[2]===0 && inputs[3]===255;
|
||||
}"""))
|
||||
fp.screenshot(path=str(out / 'fog-smooth.png'))
|
||||
fog_context.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user