Allow independent distortion of rgb channels
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
|
||||
module Dodge.Distortion (updateDistortion) where
|
||||
|
||||
import Dodge.Data.Distortion
|
||||
import Control.Lens
|
||||
|
||||
updateDistortion :: Distortion -> Maybe Distortion
|
||||
updateDistortion = \case
|
||||
RadialDistortion a b c d e f t
|
||||
| t > 0 -> Just $ RadialDistortion a b c d e f $ t-1
|
||||
| otherwise -> Nothing
|
||||
updateDistortion rd
|
||||
| rd ^. rdTime > 0 = Just $ rd & rdTime .~ 1
|
||||
| otherwise = Nothing
|
||||
|
||||
Reference in New Issue
Block a user