struct Picture { rect: vec4, look: vec4, } struct Uniforms_quad_picture { screen: vec2, rect: vec4, look: Picture, } struct Vertex_io { @builtin(position) v0_: vec4, @location(0) v1_: vec2, @location(1) v2_: vec2, } struct VertexIndex { index: u32, } struct ClipPosition { position: vec4, } struct Vertex { position: ClipPosition, uv: vec2, pixel: vec2, } struct picture_out { @location(0) color0_: vec4, } @group(0) @binding(1) var image: texture_2d; @group(0) @binding(2) var linear: sampler; @group(0) @binding(0) var u: Uniforms_quad_picture; @vertex fn quad(@builtin(vertex_index) input0_: u32) -> Vertex_io { var corners: array, 6>; let v0_ = VertexIndex(input0_); let _e5 = vec2(1f, 0f); let _e6 = vec2(0f, 1f); corners = array, 6>(vec2(0f, 0f), _e5, _e6, _e6, _e5, vec2(1f, 1f)); let v21_ = corners[v0_.index]; let v22_ = u.rect; let v24_ = u.rect; let _e23 = (v22_.xy + (v24_.zw * v21_)); let v30_ = u.screen.x; let v37_ = u.screen.y; let _e43 = Vertex(ClipPosition(vec4((((_e23.x / v30_) * 2f) - 1f), (1f - ((_e23.y / v37_) * 2f)), 0f, 1f)), v21_, _e23); return Vertex_io(_e43.position.position, _e43.uv, _e43.pixel); } @fragment fn picture(varyings: Vertex_io) -> picture_out { let v0_1 = Vertex(ClipPosition(varyings.v0_), varyings.v1_, varyings.v2_); let v1_ = u.look.rect; let _e10 = v1_.zw; let v4_ = u.look.rect; let v66_ = textureSample(image, linear, ((v0_1.pixel - v4_.xy) / _e10)); let v13_ = u.look.rect; let _e30 = (_e10 * vec2(0.5f)); let v26_ = u.look.look.y; let _e40 = (abs(((v0_1.pixel - v13_.xy) - _e30)) - (_e30 - vec2(v26_))); let v41_ = u.look.look.y; let v48_ = u.look.look.x; let _e63 = (saturate((0.5f - ((length(max(_e40, vec2(0f))) + min(max(_e40.x, _e40.y), 0f)) - v41_))) * v48_); let v52_ = u.look.look.z; let _e73 = ((v66_.xyz * vec3(v52_)) * vec3(_e63)); return picture_out(vec4(_e73.x, _e73.y, _e73.z, (v66_.w * _e63))); }