1#version 450 2#extension GL_QCOM_image_processing : require 3#extension GL_QCOM_image_processing2 : require 4 5precision highp float; 6 7// fragment shader inputs and outputs 8layout (location = 0) in vec4 v_texcoord; 9 10layout (location = 0) out vec4 fragColor; 11 12// fragment shader resources 13layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; 14layout(set = 0, binding = 1) uniform texture2D tex2D_src1; 15layout(set = 0, binding = 2) uniform texture2D tex2D_src2; 16layout(set = 0, binding = 3) uniform sampler samp; 17layout(set = 0, binding = 4) uniform sampler2D target_samp; 18layout(set = 0, binding = 5) uniform sampler2D ref_samp; 19 20void main() 21{ 22 23 uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); 24 uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); 25 uvec2 blockSize = uvec2(4, 4); 26 fragColor = textureBlockMatchWindowSSDQCOM( 27 sampler2D(tex2D_src1, samp), // target texture 28 tgt_coords, // target coords 29 sampler2D(tex2D_src2, samp), // reference texture 30 ref_coords, // reference coords 31 blockSize); // block size 32 fragColor = textureBlockMatchWindowSSDQCOM( 33 target_samp, // target texture 34 tgt_coords, // target coords 35 ref_samp, // reference texture 36 ref_coords, // reference coords 37 blockSize); // block size 38} 39 40 41