struct Emblem { centre: vec2, origin: vec2, ems: f32, alpha: f32, reveal: f32, width: f32, } struct Uniforms_quad_emblem { screen: vec2, rect: vec4, look: Emblem, } 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 emblem_out { @location(0) color0_: vec4, } struct Over { color: vec4, } @group(0) @binding(1) var ink: texture_2d; @group(0) @binding(0) var u: Uniforms_quad_emblem; @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 emblem(varyings: Vertex_io) -> emblem_out { var local: f32; let v0_1 = Vertex(ClipPosition(varyings.v0_), varyings.v1_, varyings.v2_); let v63_ = u.look.centre.x; let v65_ = u.look.centre.y; let v69_ = u.look.ems; local = 0.7f; let _e31 = local; let v6_ = u.look.origin; let _e41 = vec2((v0_1.pixel - v6_)); let v81_ = textureLoad(ink, vec2(i32(_e41.x), i32(_e41.y)), 0u); let v15_ = u.look.width; let _e57 = ((((vec2((v0_1.pixel.x - v63_), (v65_ - v0_1.pixel.y)) / vec2(v69_)) + vec2(0f, (_e31 * 0.5f))).x / v15_) + 0.5f); let v19_ = u.look.reveal; let _e65 = ((v19_ * 1.45f) - 0.15f); let _e72 = ((_e57 - _e65) * 9f); let _e75 = exp((-(_e72) * _e72)); let _e83 = mix(vec3(0.9f, 0.91f, 0.92f), vec3(1f), vec3(_e75)); let v55_ = u.look.alpha; return emblem_out(Over(vec4(_e83.x, _e83.y, _e83.z, ((v81_.x * max(saturate(((_e65 - _e57) / 0.25f)), _e75)) * v55_))).color); }