shade :: DG.DiffGeometry -> EXR.PixelRGBF
shade dg = {-EXR.PixelRGBF matte matte matte-}  EXR.PixelRGBF (realToFrac (DG.u dg)) (realToFrac (DG.v dg)) 0
        where matte = realToFrac $ (0.90*(max 0 $ dot (normalize n) (normalize (V3 0.5 0.5 1))) + 0.1)
              p = DG.point dg
              (N3 n) = DG.normal dg
              (V3 x y z) = n


-- serial rendering
shade :: DG.DiffGeometry -> EXR.PixelRGBF
shade dg = {-EXR.PixelRGBF matte matte matte-}  EXR.PixelRGBF (realToFrac (DG.u dg)) (realToFrac (DG.v dg)) 0
        where matte = realToFrac $ (0.90*(max 0 $ dot (normalize n) (normalize (V3 0.5 0.5 1))) + 0.1)
              p = DG.point dg
              (N3 n) = DG.normal dg
              (V3 x y z) = n


-- serial rendering
shade dg = {-EXR.PixelRGBF matte matte matte-}  EXR.PixelRGBF (realToFrac (DG.u dg)) (realToFrac (DG.v dg)) 0
        where matte = realToFrac $ (0.90*(max 0 $ dot (normalize n) (normalize (V3 0.5 0.5 1))) + 0.1)
              p = DG.point dg
              (N3 n) = DG.normal dg
              (V3 x y z) = n


-- serial rendering