summaryrefslogtreecommitdiff
path: root/cnn_v3/shaders/gbuf_deferred.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'cnn_v3/shaders/gbuf_deferred.wgsl')
-rw-r--r--cnn_v3/shaders/gbuf_deferred.wgsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/cnn_v3/shaders/gbuf_deferred.wgsl b/cnn_v3/shaders/gbuf_deferred.wgsl
index bcc42cc..7257122 100644
--- a/cnn_v3/shaders/gbuf_deferred.wgsl
+++ b/cnn_v3/shaders/gbuf_deferred.wgsl
@@ -40,9 +40,9 @@ fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f {
let normal = oct_decode(vec2f(bx.y, ny_d.x));
let diffuse = max(0.0, dot(normal, KEY_LIGHT));
- // feat_tex1[3] = pack4x8unorm(dif.r, dif.g, dif.b, spare) — dif = diffuse*shadow
+ // feat_tex1[2] = pack4x8unorm(mip2.g, mip2.b, dif, transp) — dif at byte 2
let t1 = textureLoad(feat_tex1, coord, 0);
- let dif = unpack4x8unorm(t1.w).x;
+ let dif = unpack4x8unorm(t1.z).z;
return vec4f(albedo * (AMBIENT + dif), 1.0);
}