anchor.diff:            (* (s~ (pos vert) :xy) uv-mult 2)))
   
   (defun-g draw-cube-face-frag ((tc :vec2) &uniform (tex :sampler-cube)
  -                              (mat :mat3))
  -  (texture tex (* mat (v! tc -1))))
  +                              (mat :mat3) (color-scale :vec4))
  +  (* (texture tex (* mat (v! tc -1)))
  +     color-scale))
   
   (def-g-> draw-cube-face-pipeline ()
     #'(draw-cube-face-vert g-pt) #'(draw-cube-face-frag :vec2))
   
   ;;------------------------------------------------------------
   
  -(defun %draw-cube-face (sampler pos-vec2 rotation scale)
  +(defun %draw-cube-face (sampler pos-vec2 rotation scale color-scale)
     (let* ((tex (sampler-texture sampler))
            (tex-res (resolution tex))
            (win-res (resolution (current-viewport)))
  
positive.code: ;;------------------------------------------------------------
  
  (defmethod draw-tex ((tex texture)
                       &key (scale 0.9) (flip-uvs-vertically nil))
    (with-temp-sampler (s tex)
      (draw-tex s :scale scale :flip-uvs-vertically flip-uvs-vertically)))
  
  (defmethod draw-tex ((sampler sampler)
                       &key (scale 0.9) (flip-uvs-vertically nil))
    (cepl-utils:with-setf (depth-test-function *cepl-context*) nil
      (if (eq (sampler-type sampler) :sampler-cube)
          (%draw-cube-face sampler (v! -0 0) 1.5707 scale)
          (%draw-sampler sampler (v! 0 0) 0s0 scale flip-uvs-vertically))))
  
  ;;------------------------------------------------------------
  
  (defun draw-tex-top-left (sampler/tex &key (flip-uvs-vertically nil))
    (draw-tex-tl sampler/tex :flip-uvs-vertically flip-uvs-vertically))
  
  (defmethod draw-tex-tl ((sampler sampler) &key (flip-uvs-vertically nil))
    (if (eq (sampler-type sampler) :sampler-cube)
        (%draw-cube-face sampler (v! -0.5 0.5) 1.5707 0.5)
        (%draw-sampler sampler (v! -0.5 0.5) 0s0 0.5 flip-uvs-vertically)))
  
  ;;------------------------------------------------------------
  
  (defun draw-tex-bottom-left (sampler/tex &key (flip-uvs-vertically nil))
    (draw-tex-bl sampler/tex :flip-uvs-vertically flip-uvs-vertically))
  
  (defmethod draw-tex-bl ((sampler sampler) &key (flip-uvs-vertically nil))
    (if (eq (sampler-type sampler) :sampler-cube)
        (%draw-cube-face sampler (v! -0.5 -0.5) 1.5707 0.5)
        (%draw-sampler sampler (v! -0.5 -0.5) 0s0 0.5 flip-uvs-vertically)))
  
  ;;------------------------------------------------------------
  
  (defun draw-tex-top-right (sampler/tex &key (flip-uvs-vertically nil))
    (draw-tex-tr sampler/tex :flip-uvs-vertically flip-uvs-vertically))
  
  (defmethod draw-tex-tr ((sampler sampler) &key (flip-uvs-vertically nil))
    (if (eq (sampler-type sampler) :sampler-cube)
        (%draw-cube-face sampler (v! 0.5 0.5) 1.5707 0.5)
        (%draw-sampler sampler (v! 0.5 0.5) 0s0 0.5 flip-uvs-vertically)))
  
  ;;------------------------------------------------------------
  
  (defun draw-tex-bottom-right (sampler/tex &key (flip-uvs-vertically nil))
    (draw-tex-br sampler/tex :flip-uvs-vertically flip-uvs-vertically))
  
  (defmethod draw-tex-br ((sampler sampler) &key (flip-uvs-vertically nil))
    (if (eq (sampler-type sampler) :sampler-cube)
        (%draw-cube-face sampler (v! 0.5 -0.5) 1.5707 0.5)
        (%draw-sampler sampler (v! 0.5 -0.5) 0s0 0.5 flip-uvs-vertically)))
  
  ;;------------------------------------------------------------
  
  
negative.code:   (values (* transform (v! (pos vert) 1s0))
            (* (tex vert) (v! 1 uv-y-mult))))
  
  (defun-g draw-texture-frag ((tc :vec2) &uniform (tex :sampler-2d)
                              (color-scale :vec4))
    (* (texture tex tc) color-scale))
  
  (def-g-> draw-texture-pipeline ()
    #'(draw-texture-vert g-pt) #'(draw-texture-frag :vec2))
  