imageBShader :: HasColor c => ImageB c -> (R1 :=> ShaderVF Point)
imageBShader imb = liftA2 ShaderVF vert frag
 where
   vert :: R1 :=> (Point :-^ Point)
   frag :: R1 :=> (Point :-* ())
   vert _t p@(x :+ y) = (vec4 x y 0 1, p)
   frag t p = (colorToR4 (toColor (imb t p)), ())
   -- frag t p = (colorToR4 white, ())

-- | GLSL program for an 'ImageB'.
imageBShader :: HasColor c => ImageB c -> (R1 :=> ShaderVF Point)
imageBShader imb = liftA2 ShaderVF vert frag
 where
   vert :: R1 :=> (Point :-^ Point)
   frag :: R1 :=> (Point :-* ())
   vert _t p@(x :+ y) = (vec4 x y 0 1, p)
   frag t p = (colorToR4 (toColor (imb t p)), ())
   -- frag t p = (colorToR4 white, ())

-- | GLSL program for an 'ImageB'.
imageBShader imb = liftA2 ShaderVF vert frag
 where
   vert :: R1 :=> (Point :-^ Point)
   frag :: R1 :=> (Point :-* ())
   vert _t p@(x :+ y) = (vec4 x y 0 1, p)
   frag t p = (colorToR4 (toColor (imb t p)), ())
   -- frag t p = (colorToR4 white, ())

-- | GLSL program for an 'ImageB'.