You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
1.1 KiB

#version 450
#extension GL_EXT_shader_explicit_arithmetic_types: require
#extension GL_KHR_shader_subgroup_arithmetic: require
in;
struct ImageFormat {
uint32_t channel_stride;
uint32_t width;
uint32_t width_stride;
uint32_t height;
uint32_t height_stride;
};
layout(set = 0, binding = 0) buffer ImF {
ImageFormat image_format;
};
layout(set = 0, binding = 1) buffer GoalImage
{
float goal_image[];
};
struct Transform {
f32mat3 color_matrix;
u32vec2 from_corner;
u32vec2 from_extents;
f32vec2 to_corner;
f32mat2 to_extents;
};
layout(set = 0, binding = 2) buffer Tfs {
Transform transforms[];
};
uvec3 get_pixel_offsets(uint x, uint y) {
uint base_offset = x * image_format.width_stride + y * image_format.height_stride;
return uvec3(base_offset, base_offset + image_format.channel_stride, base_offset + image_format.channel_stride + image_format.channel_stride);
}
vec3 get_goal_pixel(uint x, uint y) {
uvec3 offsets = get_pixel_offsets(x, y);
return vec3(goal_image[offsets.x], goal_image[offsets.y], goal_image[offsets.z]);
}
void main() {
}