vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio); vec2 display_size_b = vec2((pattern_br_b.x ...
// x is 1 if it's on top, 0 for ground. // y is 1 if the normal points up, and 0 if it points to side. // z is sign of ny: 1 for positive, 0 for values <= 0. mediump vec3 top_up_ny = ...