Allow shadow fidelity option, fix bug in rendering box shadows

This commit is contained in:
2023-03-25 17:22:58 +00:00
parent cdc4a84d4b
commit d989acd6f2
26 changed files with 410 additions and 258 deletions
+17 -1
View File
@@ -25,11 +25,25 @@ data ShadowFidelity = FullShadowFidelity
| NoShadowFidelity
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Size = Huge
| Large
| Medium
| Small
| Tiny
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Importance = Essential
| Important
| Typical
| Unimportant
| Superfluous
deriving (Eq, Ord, Show, Read, Enum, Bounded) --Generic, Flat)
data Surface = Surface
{ _sfType :: ShapeType
, _sfVs :: [Point3]
, _sfColor :: Point4
, _sfShadowFidelity :: ShadowFidelity
, _sfShadowImportance :: Importance
, _sfSize :: Size
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
@@ -46,4 +60,6 @@ shapeVerxSizes = [4,4,4]
deriveJSON defaultOptions ''ShadowFidelity
deriveJSON defaultOptions ''ShapeType
deriveJSON defaultOptions ''Size
deriveJSON defaultOptions ''Importance
deriveJSON defaultOptions ''Surface