diff options
Diffstat (limited to 'workspaces/main/shaders/cnn/cnn_layer.wgsl')
| -rw-r--r-- | workspaces/main/shaders/cnn/cnn_layer.wgsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/workspaces/main/shaders/cnn/cnn_layer.wgsl b/workspaces/main/shaders/cnn/cnn_layer.wgsl index 73816c6..cbd1686 100644 --- a/workspaces/main/shaders/cnn/cnn_layer.wgsl +++ b/workspaces/main/shaders/cnn/cnn_layer.wgsl @@ -8,6 +8,7 @@ #include "common_uniforms" #include "cnn_activation" #include "cnn_conv3x3" +#include "cnn_conv5x5" #include "cnn_weights_generated" struct CNNLayerParams { @@ -32,12 +33,12 @@ struct CNNLayerParams { let uv = (p.xy - 0.5) / (uniforms.resolution - 1.0); let original_raw = textureSample(original_input, smplr, uv); let original = (original_raw - 0.5) * 2.0; // Normalize to [-1,1] - let gray = dot(original.rgb, vec3<f32>(0.2126, 0.7152, 0.0722)); + let gray = (dot(original_raw.rgb, vec3<f32>(0.2126, 0.7152, 0.0722)) - 0.5) * 2.0; var result = vec4<f32>(0.0); // Layer 0: 7→4 (RGBD output, normalizes [0,1] input) if (params.layer_index == 0) { - result = cnn_conv3x3_7to4_src(txt, smplr, uv, uniforms.resolution, weights_layer0); + result = cnn_conv5x5_7to4_src(txt, smplr, uv, uniforms.resolution, weights_layer0); result = cnn_tanh(result); } else if (params.layer_index == 1) { |
