Compare commits
407 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eac80d2b43 | |||
| f6e0514408 | |||
| 851b26262a | |||
| bf8c538491 | |||
| 2b923cd4b6 | |||
| 23949b02af | |||
| 928eab3fd7 | |||
| 8b028c7f94 | |||
| 9e98cdc34b | |||
| 79f86a3158 | |||
| 6e5d2f147a | |||
| 1d53ff4277 | |||
| b18ccf12bf | |||
| 126fe4d4e7 | |||
| 189c3da84f | |||
| f9ce58b409 | |||
| a4f8369420 | |||
| 4777b94dfc | |||
| 0a34db312f | |||
| 14d50c4242 | |||
| fd401db97f | |||
| 22646d1702 | |||
| b2cb8cfe11 | |||
| 984a114310 | |||
| 5dbb67349b | |||
| 5d0fc10372 | |||
| 8f208189cc | |||
| bd50262ca4 | |||
| c89d5af6a3 | |||
| 25efce7a89 | |||
| 1635ce0176 | |||
| 6ebf3f4ef7 | |||
| 974f3e96c9 | |||
| c5c494522c | |||
| 2a4fc97125 | |||
| a613870d77 | |||
| 331d0cce73 | |||
| 4cc8f05407 | |||
| 1d177a7e16 | |||
| c0cfadbdd3 | |||
| f5a972d9e2 | |||
| 65d7b93a32 | |||
| 5f29c20d39 | |||
| 92e4552f66 | |||
| 581d832569 | |||
| 2cffe81b75 | |||
| 74c02291c1 | |||
| 229350120a | |||
| 4e6876c983 | |||
| b1bd52b09e | |||
| a381633dc8 | |||
| 54ca961496 | |||
| 4d245fe232 | |||
| 9796ec576f | |||
| 3e86b6e20a | |||
| 94dce64f29 | |||
| dc1dca8aa0 | |||
| 8bc2d6961f | |||
| 71e7b51c88 | |||
| 2500a01cb3 | |||
| f9f4fc02ea | |||
| 9c94e1b3f3 | |||
| 3ceff22f36 | |||
| ed6ebc930e | |||
| f63b47d6c4 | |||
| 86794d1da9 | |||
| 80957d5470 | |||
| 8f65a652ce | |||
| 4e7bd4831d | |||
| 5c5d9ef0e3 | |||
| d28e3bef6c | |||
| d0aef5cf39 | |||
| cb64be4eeb | |||
| bbb682242d | |||
| 602b162d41 | |||
| 1f1fa36b72 | |||
| 0491a71da1 | |||
| 6563d87247 | |||
| 10dbb238c8 | |||
| 610936a5fa | |||
| 8759431fec | |||
| b633b9d55f | |||
| 8428f08ebd | |||
| 1205823ddb | |||
| d436b853eb | |||
| 5dfc97a683 | |||
| 60a2054cd5 | |||
| a24ee66f51 | |||
| 9fc36ec54c | |||
| 91917dbddd | |||
| 836fefb9a5 | |||
| 0eb2fe50a6 | |||
| db62de75d8 | |||
| 16eb356e31 | |||
| 21c6e3afb4 | |||
| bfd7aa619e | |||
| 292a1c3f42 | |||
| c79e5df683 | |||
| 295a5f7e1d | |||
| cffa75c014 | |||
| 836c0ba772 | |||
| ec1216e7eb | |||
| 227f09eeda | |||
| 71ae82ee4d | |||
| b6ab281842 | |||
| a7a11ccc03 | |||
| 0ea7af4bdd | |||
| 56aa8c6697 | |||
| 8dee93991a | |||
| b012d3c41e | |||
| 5e9d337288 | |||
| cdf998a1e2 | |||
| be64e786f9 | |||
| 383beeae82 | |||
| 409180959c | |||
| ce1937c78e | |||
| 4121bfb468 | |||
| ce438b7ecd | |||
| 7f6e7d2741 | |||
| f136d0cd19 | |||
| ceba6fd533 | |||
| 4d59d521ac | |||
| c5034b3c4c | |||
| 219c574931 | |||
| a65a1cab93 | |||
| 36d5edc0a6 | |||
| 1a85d9d562 | |||
| 1f01147821 | |||
| 1546caa6a3 | |||
| df435819eb | |||
| 5e93c7631d | |||
| 187751ec26 | |||
| 7ae50adb55 | |||
| 658da193b7 | |||
| cd7a5dcbb5 | |||
| 6f3632d495 | |||
| 5a40eac4e2 | |||
| 09f7cc309b | |||
| 397980a83f | |||
| dd4ac80159 | |||
| e20cc593fc | |||
| e9ffeeaea7 | |||
| 7c62479f30 | |||
| 05c530eeb1 | |||
| 833d4562e2 | |||
| 55252bfe22 | |||
| 8d79e96798 | |||
| cf6cd3cd83 | |||
| 2f0487a424 | |||
| 0d0c1a72e0 | |||
| d35a41944c | |||
| 71006e24fd | |||
| c2e5aaa7a0 | |||
| 40c1907689 | |||
| c9ec962575 | |||
| a3b343dfab | |||
| e8d2407367 | |||
| 5f0ab2223d | |||
| 042bd6bc01 | |||
| 10503da955 | |||
| d6c4d3d609 | |||
| 20042fcf8d | |||
| 7c40db7153 | |||
| 323a50ed31 | |||
| 329fcc237b | |||
| 0946ee1310 | |||
| c88fc1c729 | |||
| 437f5d44d8 | |||
| c676005219 | |||
| aa82519e05 | |||
| c641cbaa69 | |||
| 0adf3f57b4 | |||
| c55c3e874d | |||
| b8536e2929 | |||
| 61910785c4 | |||
| cbf0f47b9b | |||
| 7585531dd1 | |||
| ff03efc41f | |||
| 5fce0772f8 | |||
| 0da3816664 | |||
| c2cc38a642 | |||
| 3f5f5d2c6b | |||
| b4012af312 | |||
| b6736e2735 | |||
| 6457f00ba7 | |||
| f94b914ceb | |||
| b0d519c69d | |||
| 95b4105f52 | |||
| ffea3a1694 | |||
| ccb809a090 | |||
| 488428b1ef | |||
| 0eeae7e6bc | |||
| 9eed2706b0 | |||
| 7b622c8e31 | |||
| 27569ed8f3 | |||
| 18ab89d3f2 | |||
| c39f99e146 | |||
| 9a3c642684 | |||
| b2265297b5 | |||
| 8f17582889 | |||
| cba0f36ac5 | |||
| 3c6d269d00 | |||
| 819f0d37ea | |||
| fc7c4d6468 | |||
| 9e6534b8f4 | |||
| 0fd7ba46b5 | |||
| 151c037763 | |||
| 59472b16d2 | |||
| d5f985f3ab | |||
| af245fb5bf | |||
| f8073381ee | |||
| 30da635990 | |||
| 2f06c56185 | |||
| fdee74ff0c | |||
| 39677c3a02 | |||
| 2f3a00a971 | |||
| fcffbd5f43 | |||
| 1918fc8c56 | |||
| 6742241e5d | |||
| 0b997579ad | |||
| c250448d57 | |||
| b2fd0543dd | |||
| 2056d8ba0e | |||
| b8f6a29e28 | |||
| 4542a6cea6 | |||
| 11c7b25fe9 | |||
| 4ee389efb1 | |||
| b43168ae33 | |||
| ebc4b9d715 | |||
| f3fafc6bf2 | |||
| f969056912 | |||
| c533e88d24 | |||
| 5ba642c20a | |||
| 0481f6e6f2 | |||
| 0f43e1ad8f | |||
| 3bfe6f5dfd | |||
| df85624a49 | |||
| 315e6b1c04 | |||
| b8006b44cf | |||
| fe95bf381b | |||
| 4d12d6cf2b | |||
| 5e6ed1d793 | |||
| 57ca53638a | |||
| f9bcac915f | |||
| a0c4d62018 | |||
| e139499ed2 | |||
| 365821e969 | |||
| 7a431f6eec | |||
| cadaf00797 | |||
| 3d602b4f57 | |||
| c3a0cb0527 | |||
| 6b5090e697 | |||
| 9e7b7a3f76 | |||
| 8b44538048 | |||
| 408b39f160 | |||
| 5e5b24cad0 | |||
| 3206cdebf6 | |||
| 675f8ade59 | |||
| f312cc41ff | |||
| bbda28cbc1 | |||
| 33de1f79b6 | |||
| 8245115763 | |||
| d598d28652 | |||
| 75e93dfcd5 | |||
| 4949d98789 | |||
| 49fb982877 | |||
| 98ece551c7 | |||
| e00bb0b26e | |||
| 3ea14a4646 | |||
| f1ddcaa497 | |||
| 031f07f14c | |||
| 1e73565900 | |||
| 4e651fcded | |||
| 77fcf8353a | |||
| 477bb8b4b2 | |||
| 709195ed6a | |||
| e9178f9643 | |||
| 4cc5477f07 | |||
| 43db5a2ebc | |||
| b3924fb8b8 | |||
| 993f00ada1 | |||
| b519c835fa | |||
| 6eac8fbcf1 | |||
| 861d749665 | |||
| 31f659e3aa | |||
| 39fb1963c8 | |||
| 731552fe08 | |||
| aba855e0a6 | |||
| a642198bfc | |||
| cba3ca784a | |||
| 2d44809900 | |||
| a8348a3515 | |||
| 4d1d2f36bc | |||
| 5c22ca6662 | |||
| 7e3614c9c8 | |||
| 013f50f0bc | |||
| 2973ad6eed | |||
| a2eb0e026b | |||
| bf9a2250da | |||
| 9ed6d75853 | |||
| f5a3486f72 | |||
| 23f61081cf | |||
| fcb02850d0 | |||
| 1f14f3d0c3 | |||
| f51868c84c | |||
| eab27fea8b | |||
| 91e67e37dc | |||
| da8230fe00 | |||
| eb068f5335 | |||
| 96b95907f2 | |||
| a83186e6dd | |||
| 87f1444f5c | |||
| 398b3a1342 | |||
| 6984a34c19 | |||
| 4074c40083 | |||
| 60fdd138e3 | |||
| a6ca90d7d8 | |||
| ef90e5702b | |||
| a9ecd7de2e | |||
| 5ee78ceffc | |||
| d1bb8a985b | |||
| 4179115023 | |||
| b270e18556 | |||
| b837e6a798 | |||
| d4f2cdd3fd | |||
| 2d856ddf9e | |||
| e017a92892 | |||
| 4494e47b43 | |||
| 1564b1c721 | |||
| f12ae3533c | |||
| 8721b31811 | |||
| 103f1e7e99 | |||
| 81d6727d8e | |||
| 203919933c | |||
| f278af0f30 | |||
| dc13c61dca | |||
| 7b28ec15d1 | |||
| f279494a02 | |||
| 380c0f6938 | |||
| 2261556c16 | |||
| 7fcaac2a01 | |||
| a478ee0a2a | |||
| 8398f0b852 | |||
| cbcc7e4fd6 | |||
| 89c9337822 | |||
| 85591424fd | |||
| 01228ed2f1 | |||
| 6c3c023ed9 | |||
| 291a35f538 | |||
| 2a0e6d1e6e | |||
| 3c2369d979 | |||
| 871d695574 | |||
| dda0526180 | |||
| 40d2d316cb | |||
| 86696deb56 | |||
| 9d2a2e6730 | |||
| 2e6b7a1b41 | |||
| 5cb8be1363 | |||
| 5280d428a9 | |||
| 5880bd8b8c | |||
| 1ef5534bc2 | |||
| 7581c86d93 | |||
| 79a0137d54 | |||
| 06d50ac752 | |||
| 49efe62910 | |||
| e5473d1028 | |||
| 1ebdbdd8ae | |||
| b87c3380b8 | |||
| 9034c409e1 | |||
| 596880f76a | |||
| f7fd747a7c | |||
| 004c4d1950 | |||
| 5b95bcbf3b | |||
| 58c645041f | |||
| a2c32907f0 | |||
| 65803c11c9 | |||
| ee884899ef | |||
| 79abdfb33a | |||
| 3f6f1b4019 | |||
| 25e64d5378 | |||
| d776c91cfd | |||
| c2daa86463 | |||
| 94f6d5c630 | |||
| 22b4be440a | |||
| c38d03165f | |||
| 7336177edf | |||
| fcccd63844 | |||
| 32d7120177 | |||
| f641805845 | |||
| e7b52f4487 | |||
| befe24e038 | |||
| 21460ceaa8 | |||
| 3936e1a386 | |||
| 9de2a22001 | |||
| 8557724fb5 | |||
| 4bf9ce59d5 | |||
| 9daa27ee8b | |||
| 68cd362aa4 | |||
| 084210ea7d | |||
| a373b31152 | |||
| 1cfb581e15 | |||
| e1cfe7e163 | |||
| 5ccbfa1f91 | |||
| b07280e50c | |||
| 2f9cea1b69 | |||
| b8581a7862 | |||
| 2f4fcb42e5 |
@@ -4,3 +4,7 @@
|
||||
loop.cabal
|
||||
*.lock
|
||||
keys.json
|
||||
log/*
|
||||
generated/*
|
||||
tags
|
||||
ghcidOutput
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Changelog for loop
|
||||
|
||||
## Unreleased changes
|
||||
@@ -1,39 +1,30 @@
|
||||
module Main (
|
||||
main,
|
||||
) where
|
||||
module Main (main) where
|
||||
|
||||
import Dodge.SoundSelection
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Control.Parallel
|
||||
import qualified Data.Map.Strict as M
|
||||
--import Data.Preload.Render
|
||||
import qualified Data.Text as T
|
||||
import Dodge.Concurrent
|
||||
import Dodge.Config.Load
|
||||
import Dodge.Config.Update
|
||||
import Dodge.Config
|
||||
import Dodge.Data
|
||||
import Dodge.Event
|
||||
import Dodge.Initialisation
|
||||
import Dodge.LoadSeed
|
||||
import Dodge.Menu
|
||||
import Dodge.Render
|
||||
import Dodge.SoundLogic.LoadSound
|
||||
import Dodge.StartNewGame
|
||||
import Dodge.TestString
|
||||
import Dodge.Update
|
||||
--import qualified IntMapHelp as IM
|
||||
import Loop
|
||||
--import Picture
|
||||
import Preload
|
||||
import Preload.Render
|
||||
--import Render
|
||||
|
||||
import SDL (($=))
|
||||
import qualified SDL
|
||||
--import qualified SDL.Mixer as Mix
|
||||
import Sound
|
||||
import System.Directory
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
-- load the config to get the window size and position
|
||||
@@ -74,7 +65,7 @@ winConfig x y winpos =
|
||||
theCleanup :: Universe -> IO ()
|
||||
theCleanup uv = SDL.cursorVisible $= True >> cleanUpPreload (_preloadData uv)
|
||||
|
||||
firstWorldLoad :: Configuration -> IO Universe
|
||||
firstWorldLoad :: Config -> IO Universe
|
||||
firstWorldLoad theConfig = do
|
||||
SDL.cursorVisible $= False
|
||||
pdata <- doPreload >>= applyWorldConfig theConfig
|
||||
@@ -97,22 +88,28 @@ firstWorldLoad theConfig = do
|
||||
, _uvDebug = mempty
|
||||
, _uvDebugFloat1 = 10
|
||||
, _uvDebugFloat2 = 0
|
||||
, _uvDebugV2_1 = 0
|
||||
, _uvDebugV2_2 = 1
|
||||
, _uvDebugPut = mempty
|
||||
, _uvDebugMessageOffset = 0
|
||||
, _uvSoundQueue = mempty
|
||||
, _uvDebugPathShowType = PathBetweenDebugV2s
|
||||
}
|
||||
return $ u & uvScreenLayers .~ [splashMenu u]
|
||||
--return $ u & uvScreenLayers .~ [splashMenu u]
|
||||
return $ startNewGameInSlot 0 u
|
||||
|
||||
theUpdateStep :: SDL.Window -> Universe -> IO Universe
|
||||
theUpdateStep win = doSideEffects <=< updateRenderSplit win
|
||||
|
||||
updateRenderSplit :: SDL.Window -> Universe -> IO Universe
|
||||
updateRenderSplit win u = do
|
||||
updateUniverse u `par` void (doDrawing win u)
|
||||
--updateUniverse u `par` void (doDrawing win u)
|
||||
updateUniverse u `par` doDrawing win u
|
||||
return $! updateUniverse u
|
||||
|
||||
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
|
||||
playSoundUnlessRewinding u = case w ^. timeFlow of
|
||||
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (_toPlaySounds w)
|
||||
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (newSoundsToPlay u)
|
||||
_ -> stopAllSounds >> return M.empty
|
||||
where
|
||||
w = _uvWorld u
|
||||
@@ -139,13 +136,13 @@ doPreload = do
|
||||
putStrLn "Start sound preload"
|
||||
lChunks <- loadSounds
|
||||
putStrLn "Skip music preload!"
|
||||
-- lMusic <- loadMusic
|
||||
-- Mix.playMusic Mix.Forever (lMusic IM.! 0)
|
||||
-- lMusic <- loadMusic
|
||||
-- Mix.playMusic Mix.Forever (lMusic IM.! 0)
|
||||
putStrLn "Return PreloadData"
|
||||
return
|
||||
PreloadData
|
||||
{ _renderData = rData
|
||||
, _soundData = lChunks
|
||||
--, _musicData = MusicData{_loadedMusic = lMusic}
|
||||
, _musicData = mempty
|
||||
, --, _musicData = MusicData{_loadedMusic = lMusic}
|
||||
_musicData = mempty
|
||||
}
|
||||
|
||||
@@ -1,483 +0,0 @@
|
||||
{- |
|
||||
Weapon effects when pulling the trigger. -}
|
||||
module Dodge.Item.Weapon.TriggerType
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Creature.Action (startReloadingWeapon)
|
||||
import Dodge.WorldEvent (muzzleFlashAt,tempLightForAt)
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.Particle.Bullet.Spawn
|
||||
import Dodge.Item.Attachment.Data
|
||||
import Dodge.Item.Data
|
||||
import Geometry
|
||||
|
||||
import System.Random
|
||||
import Control.Lens
|
||||
import Control.Monad.State
|
||||
import Data.Maybe
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Data.Foldable
|
||||
|
||||
withThinSmoke
|
||||
:: (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withThinSmoke eff cr w = eff cr $ foldl' (flip $ makeThinSmokeAt . (+.+ pos)) w ps
|
||||
where
|
||||
dir = _crDir cr
|
||||
pos = _crPos cr +.+ (_crRad cr +0.5) *.* unitVectorAtAngle dir
|
||||
ps = (replicateM 5 . randInCirc) 8 & evalState $ _randGen w
|
||||
|
||||
withThickSmoke
|
||||
:: (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withThickSmoke eff cr w = eff cr $ foldl' (flip $ makeThickSmokeAt . (+.+ pos)) w ps
|
||||
where
|
||||
dir = _crDir cr
|
||||
pos = _crPos cr +.+ (_crRad cr + 15) *.* unitVectorAtAngle dir
|
||||
ps = (replicateM 20 . randInCirc) 8 & evalState $ _randGen w
|
||||
{- |
|
||||
Fires at an increasing rate.
|
||||
Has different effect after first fire.
|
||||
Applies ammo check and use cooldown check. -}
|
||||
rateIncAB
|
||||
:: Int -- ^ Start rate
|
||||
-> Int -- ^ End rate
|
||||
-> (Creature -> World -> World) -- ^ Effect on first fire
|
||||
-> (Creature -> World -> World) -- ^ Effect on continued fire
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
rateIncAB startRate fastRate shooteff1 shooteff2 cr w
|
||||
| repeatFire = w
|
||||
& pointItem %~ ( (itUseRate .~ max fastRate (currentRate - 1))
|
||||
. (wpLoadedAmmo -~ 1)
|
||||
. (itUseTime .~ currentRate) )
|
||||
& shooteff2 cr
|
||||
| firstFire = w
|
||||
& pointItem %~ ( (itUseRate .~ startRate - 1)
|
||||
. (wpLoadedAmmo -~ 1)
|
||||
. (itUseTime .~ startRate) )
|
||||
& shooteff1 cr
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| otherwise = w
|
||||
where
|
||||
cid = _crID cr
|
||||
itRef = _crInvSel cr
|
||||
item = _crInv cr IM.! itRef
|
||||
pointItem = creatures . ix cid . crInv . ix itRef
|
||||
currentRate = _itUseRate item
|
||||
repeatFire = _wpReloadState item == 0
|
||||
&& _itUseTime item == 1
|
||||
&& _wpLoadedAmmo item > 0
|
||||
firstFire = _wpReloadState item == 0
|
||||
&& _itUseTime item == 0
|
||||
&& _wpLoadedAmmo item > 0
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
{- |
|
||||
Shoot a weapon rapidly after a warm up.
|
||||
Applies ammo check as well. -}
|
||||
withWarmUp
|
||||
:: Int -- ^ Warm up time (in frames)
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Shoot effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withWarmUp t f cr w
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| _wpReloadState item /= 0 = w
|
||||
| fState == 0 = w
|
||||
& pointerToItem %~ ( (itUse .~ (\_ -> withWarmUp 100 f)) . (itUseTime .~ 2) )
|
||||
| t > 2 = w
|
||||
& pointerToItem %~ ( (itUse .~ (\_ -> withWarmUp (t-1) f)) . (itUseTime .~ 2) )
|
||||
& soundFrom (CrWeaponSound cid) 26 2 0
|
||||
| t > 0 = w
|
||||
& pointerToItem %~ ( (itUse .~ (\_ -> withWarmUp (t-1) f)) . (itUseTime .~ 2) )
|
||||
| otherwise = w
|
||||
& pointerToItem %~ ( (itUse .~ (\_ -> withWarmUp 1 f)) . (wpLoadedAmmo -~ 1) . (itUseTime .~ 2) )
|
||||
& f cr
|
||||
& soundFrom (CrWeaponSound cid) 28 2 0
|
||||
where
|
||||
cid = _crID cr
|
||||
itRef = _crInvSel cr
|
||||
item = _crInv cr IM.! itRef
|
||||
pointerToItem = creatures . ix cid . crInv . ix itRef
|
||||
fState = _itUseTime item
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
{- | Adds a sound to a creature based world effect.
|
||||
The sound is emitted from the creature's position. -}
|
||||
withSound
|
||||
:: Int -- ^ Sound id
|
||||
-> (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World -> World
|
||||
withSound soundid f cr = soundOncePos soundid (_crPos cr) . f cr
|
||||
|
||||
withRecoil
|
||||
:: Float -- ^ Recoil amount
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying world effect, takes creature id as input
|
||||
-> Creature
|
||||
-> World -> World
|
||||
withRecoil recoilAmount eff cr = eff cr . over (creatures . ix cid) pushback
|
||||
where
|
||||
cid = _crID cr
|
||||
pushback = over crPos (+.+ rotateV (_crDir cr) (V2 ((-recoilAmount) / _crMass cr ) 0))
|
||||
{- | Pushes a creature sideways by a random amount.
|
||||
Applied before the underlying effect. -}
|
||||
withSidePush
|
||||
:: Float -- ^ Maximal possible side push amount
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying world effect, takes creature id as input
|
||||
-> Creature
|
||||
-> World -> World
|
||||
withSidePush maxSide eff cr w = eff cr . over (creatures . ix cid) push $ w
|
||||
where
|
||||
cid = _crID cr
|
||||
push = over crPos (+.+ rotateV (_crDir cr) (V2 0 (pushAmount / _crMass cr)))
|
||||
(pushAmount, _) = randomR (-maxSide,maxSide) $ _randGen w
|
||||
-- consider unifying the pushes using a direction vector
|
||||
{- | Pushes a creature sideways by a random amount.
|
||||
Applied after the underlying effect. -}
|
||||
withSidePushAfter
|
||||
:: Float -- ^ Maximal possible side push amount
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying world effect, takes creature id as input
|
||||
-> Creature -- ^ Creature id
|
||||
-> World -> World
|
||||
withSidePushAfter maxSide eff cr w = over (creatures . ix cid) push . eff cr $ w
|
||||
where
|
||||
cid = _crID cr
|
||||
push = over crPos (+.+ rotateV (_crDir cr) (V2 0 (pushAmount / _crMass cr)))
|
||||
(pushAmount, _) = randomR (-maxSide,maxSide) $ _randGen w
|
||||
{- | Applies a world effect and sound effect after an ammo check. -}
|
||||
shootWithSound
|
||||
:: Int -- ^ Sound identifier
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Shoot effect, takes creature id as input
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
shootWithSound soundid f cr w
|
||||
| fireCondition = over (pointerToItem . wpLoadedAmmo) (\ammo -> ammo-1)
|
||||
$ soundOncePos soundid (_crPos cr)
|
||||
$ set (pointerToItem . itUseTime) (_itUseRate item)
|
||||
$ f cr w
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| otherwise = w
|
||||
where
|
||||
cid = _crID cr
|
||||
itRef = _crInvSel cr
|
||||
item = _crInv cr IM.! itRef
|
||||
pointerToItem = creatures . ix cid . crInv . ix itRef
|
||||
fireCondition = _wpReloadState item == 0
|
||||
&& _itUseTime item == 0
|
||||
&& _wpLoadedAmmo item > 0
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
{- | Applies a world effect and sound effect after an ammo check. -}
|
||||
shootWithSoundI
|
||||
:: Int -- ^ Sound identifier
|
||||
-> (Item -> Creature -> World -> World)
|
||||
-- ^ Shoot effect, takes creature id as input
|
||||
-> Item
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
shootWithSoundI soundid f item cr w
|
||||
| fireCondition = over (pointerToItem . wpLoadedAmmo) (\ammo -> ammo-1)
|
||||
$ soundOncePos soundid (_crPos cr)
|
||||
$ set (pointerToItem . itUseTime) (_itUseRate item)
|
||||
$ f item cr w
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| otherwise = w
|
||||
where
|
||||
cid = _crID cr
|
||||
itRef = _crInvSel cr
|
||||
pointerToItem = creatures . ix cid . crInv . ix itRef
|
||||
fireCondition = _wpReloadState item == 0
|
||||
&& _itUseTime item == 0
|
||||
&& _wpLoadedAmmo item > 0
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
{- |
|
||||
Applies a world effect after an item use cooldown check. -}
|
||||
useTimeCheck
|
||||
:: (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
useTimeCheck f cr w = case theItem ^? itUseTime of
|
||||
Just 0 -> f cr $ setUseTime w
|
||||
_ -> w
|
||||
where
|
||||
cid = _crID cr
|
||||
setUseTime = creatures . ix cid . crInv . ix (_crInvSel cr) . itUseTime +~ useRate
|
||||
theItem = _crInv cr IM.! _crInvSel cr
|
||||
useRate = fromMaybe 0 $ theItem ^? itUseRate
|
||||
{- | Applies a world effect after a hammer position check. -}
|
||||
hammerCheck
|
||||
:: (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
hammerCheck f cr w = case (_crInv cr IM.! _crInvSel cr) ^? itHammer of
|
||||
Just HammerUp -> f cr $ setHammerDown w
|
||||
_ -> setHammerDown w
|
||||
where
|
||||
cid = _crID cr
|
||||
setHammerDown = creatures . ix cid . crInv . ix (_crInvSel cr) . itHammer .~ HammerDown
|
||||
{- | Applies a world effect after a hammer position check. -}
|
||||
hammerCheckI
|
||||
:: (Item -> Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Item
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
hammerCheckI f it cr w = case it ^? itHammer of
|
||||
Just HammerUp -> f it cr $ setHammerDown w
|
||||
_ -> setHammerDown w
|
||||
where
|
||||
cid = _crID cr
|
||||
setHammerDown = creatures . ix cid . crInv . ix (_crInvSel cr) . itHammer .~ HammerDown
|
||||
{- | Applies a world effect after an ammo check. -}
|
||||
shoot
|
||||
:: (Creature -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
shoot f cr w
|
||||
| fireCondition = f cr w & pointerToItem %~
|
||||
( (wpLoadedAmmo -~ 1) . (itUseTime .~ _itUseRate item) )
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| otherwise = w
|
||||
where
|
||||
cid = _crID cr
|
||||
itRef = _crInvSel cr
|
||||
item = _crInv cr IM.! itRef
|
||||
pointerToItem = creatures . ix cid . crInv . ix itRef
|
||||
fireCondition = _wpReloadState item == 0
|
||||
&& _itUseTime item == 0
|
||||
&& _wpLoadedAmmo item > 0
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
{- | Applies a world effect after a hammer position check.
|
||||
Arbitrary inventory position. -}
|
||||
hammerCheckL
|
||||
:: (Creature -> Int -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> Int
|
||||
-> World
|
||||
-> World
|
||||
hammerCheckL f cr invid w = case (_crInv cr IM.! invid) ^? itHammer of
|
||||
Just HammerUp -> f cr invid $ setHammerDown w
|
||||
_ -> setHammerDown w
|
||||
where
|
||||
cid = _crID cr
|
||||
setHammerDown = creatures . ix cid . crInv . ix invid . itHammer .~ HammerDown
|
||||
{- | Applies a world effect after an ammo check.
|
||||
Arbitrary inventory position. -}
|
||||
shootL
|
||||
:: (Creature -> Int -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Creature
|
||||
-> Int -- ^ Inventory position
|
||||
-> World
|
||||
-> World
|
||||
shootL f cr invid w
|
||||
| fireCondition = f cr invid w & pointerToItem %~
|
||||
( (wpLoadedAmmo -~ 1) . (itUseTime .~ _itUseRate item) )
|
||||
| reloadCondition = fromMaybe w $ startReloadingWeapon cr w
|
||||
| otherwise = w
|
||||
where
|
||||
cid = _crID cr
|
||||
item = _crInv cr IM.! invid
|
||||
pointerToItem = creatures . ix cid . crInv . ix invid
|
||||
fireCondition = _wpReloadState item == 0
|
||||
&& _itUseTime item == 0
|
||||
&& _wpLoadedAmmo item > 0
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
|
||||
withMuzFlare
|
||||
:: (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withMuzFlare f cr w = tempLightForAt 3 pos . muzzleFlashAt pos2 $ f cr w
|
||||
where
|
||||
pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr)
|
||||
pos2 = _crPos cr +.+ (2 * _crRad cr) *.* unitVectorAtAngle (_crDir cr)
|
||||
|
||||
withMuzFlareI
|
||||
:: (Item -> Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Item
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withMuzFlareI f it cr w = tempLightForAt 3 pos . muzzleFlashAt pos2 $ f it cr w
|
||||
where
|
||||
pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr)
|
||||
pos2 = _crPos cr +.+ (2 * _crRad cr) *.* unitVectorAtAngle (_crDir cr)
|
||||
{- | Applies the effect to a randomly rotated creature. -}
|
||||
withRandomDir
|
||||
:: Float -- ^ Max possible rotation
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withRandomDir acc f cr w = f (cr & crDir +~ a) $ set randGen g w
|
||||
where
|
||||
(a, g) = randomR (-acc,acc) $ _randGen w
|
||||
{- | Applies the effect to a randomly rotated creature. -}
|
||||
withRandomDirI
|
||||
:: Float -- ^ Max possible rotation
|
||||
-> (Item -> Creature -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Item
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withRandomDirI acc f it cr w = f it (cr & crDir +~ a) $ set randGen g w
|
||||
where
|
||||
(a, g) = randomR (-acc,acc) $ _randGen w
|
||||
{- | Creates a bullet with a given velocity, width, and 'HitEffect' -}
|
||||
withVelWthHiteff
|
||||
:: Point2 -- ^ Velocity, x direction is forward with respect to the creature
|
||||
-> Float -- ^ Bullet width
|
||||
-> HitEffect -- ^ Bullet effect when hitting creature, wall etc
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
withVelWthHiteff vel width hiteff cr = over particles (newbul : )
|
||||
where
|
||||
cid = _crID cr
|
||||
newbul = aGenBulAt (Just cid) pos (rotateV dir vel) hiteff width
|
||||
dir = _crDir cr
|
||||
pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr)
|
||||
{- | Apply the effect to a translated creature. -}
|
||||
withRandomOffset
|
||||
:: Float -- ^ Max possible translate
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
withRandomOffset offsetAmount f cr w = f (cr & crPos %~ (+.+ offV)) $ set randGen g w
|
||||
where
|
||||
(offsetVal , g) = randomR (-offsetAmount,offsetAmount) $ _randGen w
|
||||
offV = rotateV (_crDir cr) (V2 0 offsetVal)
|
||||
-- | Rotates a creature with minimum rotation at least 0.1.
|
||||
-- Rotates the player creature before applying the effect, other creatures after.
|
||||
torqueBeforeForced
|
||||
:: Float -- ^ Max possible rotation (less the 0.1 forced rotation)
|
||||
-> (Creature -> World -> World)
|
||||
-- ^ Underlying effect
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
torqueBeforeForced torque feff cr w
|
||||
| cid == 0 = feff (cr & crDir +~ rot') $ w
|
||||
& randGen .~ g
|
||||
& creatures . ix cid . crDir +~ rot'
|
||||
& cameraRot +~ rot'
|
||||
| otherwise = feff cr $ set randGen g $ over (creatures . ix cid . crDir) (+rot') w
|
||||
where
|
||||
cid = _crID cr
|
||||
(rot, g) = randomR (-torque,torque) $ _randGen w
|
||||
rot' | rot < 0 = rot - 0.1
|
||||
| otherwise = rot + 0.1
|
||||
-- | Rotates the player creature before applying an effect.
|
||||
-- Note this currently (29/4/2021) rotates other creatures /after/ applying the effect.
|
||||
torqueBefore
|
||||
:: Float -- ^ Max possible rotation
|
||||
-> (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
torqueBefore torque feff cr w
|
||||
| cid == 0 = feff (cr & crDir +~ rot) $ w
|
||||
& randGen .~ g
|
||||
& creatures . ix cid . crDir +~ rot
|
||||
& cameraRot +~ rot
|
||||
| otherwise = set randGen g $ over (creatures . ix cid . crDir) (+rot) $ feff cr w
|
||||
where
|
||||
cid = _crID cr
|
||||
(rot, g) = randomR (-torque,torque) $ _randGen w
|
||||
-- | Rotate a randomly creature after applying an effect.
|
||||
torqueAfter
|
||||
:: Float -- ^ Max possible rotation
|
||||
-> (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
torqueAfter torque feff cr w
|
||||
| cid == 0 = rotateScope $ set randGen g $ over cameraRot (+rot) $ feff cr w
|
||||
| otherwise = set randGen g $ over (creatures . ix cid . crDir) (+rot) $ feff cr w
|
||||
where
|
||||
cid = _crID cr
|
||||
(rot, g) = randomR (-torque,torque) $ _randGen w
|
||||
rotateScope = creatures . ix 0 . crInv . ix (_crInvSel (_creatures w IM.! 0))
|
||||
. itAttachment . _Just . scopePos %~ rotateV rot
|
||||
{- | Create multiple bullets with a given spread, a given amount, given velocity,
|
||||
given width and given 'HitEffect'. -}
|
||||
spreadNumVelWthHiteff
|
||||
:: Float -- ^ Spread
|
||||
-> Int -- ^ Number of bullets
|
||||
-> Point2 -- ^ Velocity, x is direction of creature
|
||||
-> Float -- ^ Bullet width
|
||||
-> HitEffect -- ^ Effect when hitting creature, wall etc
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
spreadNumVelWthHiteff spread num vel wth eff cr w = over particles (newbuls ++) w
|
||||
where
|
||||
cid = _crID cr
|
||||
newbuls = zipWith
|
||||
(\pos d -> aGenBulAt (Just cid) pos (rotateV d vel) eff wth)
|
||||
poss dirs
|
||||
poss = map ((+.+) $ _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr))
|
||||
$ (replicateM num . randInCirc) 5 & evalState $ _randGen w
|
||||
dirs = map (_crDir cr +) $ zipWith (+)
|
||||
[-spread,-spread+(2*spread/fromIntegral num)..]
|
||||
(randomRs (0,spread/5) (_randGen w))
|
||||
{- | Create a number of bullets side by side with a given velocity,
|
||||
given width and given 'HitEffect'. -}
|
||||
numVelWthHitEff
|
||||
:: Int -- ^ Amount of bullets
|
||||
-> Point2 -- ^ Velocity, x axis is direction of creature
|
||||
-> Float -- ^ Bullet width
|
||||
-> HitEffect -- ^ Effect when hitting creature, wall etc
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
numVelWthHitEff num vel wth eff cr = over particles (newbuls ++)
|
||||
where
|
||||
cid = _crID cr
|
||||
newbuls = map (\p -> aGenBulAt (Just cid) p (rotateV d vel) eff wth) poss
|
||||
d = _crDir cr
|
||||
poss = map (+.+ pos) $ take num offsets
|
||||
maxOffset = fromIntegral num * 2.5 - 2.5
|
||||
offsets = map (rotateV d . V2 0) [-maxOffset,5-maxOffset..]
|
||||
pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle d
|
||||
{- | Uses '_wpSpread' as a parameter for the current offset angle. -}
|
||||
randWalkAngle
|
||||
:: Float -- ^ Max offset angle
|
||||
-> Float -- ^ Walk speed
|
||||
-> (Creature -> World -> World) -- ^ Underlying effect
|
||||
-> Creature -- ^ Creature id
|
||||
-> World
|
||||
-> World
|
||||
randWalkAngle ma aspeed f cr w = w
|
||||
& f (cr & crDir +~ a)
|
||||
& creatures . ix cid . crInv . ix i . wpSpread .~ newa
|
||||
where
|
||||
cid = _crID cr
|
||||
a = _wpSpread $ _crInv (_creatures w IM.! cid) IM.! i
|
||||
(walka, _) = randomR (-aspeed,aspeed) (_randGen w)
|
||||
newa = min ma $ max (negate ma) (a + walka)
|
||||
i = _crInvSel $ _creatures w IM.! cid
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"_debug_booleans": [
|
||||
"Show_ms_frame",
|
||||
"Mouse_position",
|
||||
"Collision_test"
|
||||
"Pathing"
|
||||
],
|
||||
"_debug_view_clip_bounds": "NoRoomClipBoundaries",
|
||||
"_gameplay_rotate_to_wall": true,
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
The cortical interface is an incredible interdisciplinary breakthrough
|
||||
in neurophysiology and computer science.
|
||||
It allows clients to directly receive information transmitted wirelessly.
|
||||
We expect this to allow for better, faster learning, allowing
|
||||
humans to reach unheard of levels of knowledge and ability.
|
||||
|
||||
Non-human animal trials did not appear to reduce lifespans significantly.
|
||||
Human trials are now in progress.
|
||||
|
||||
I hate the way the interface just dumps information on you.
|
||||
The way time just seems to stop...
|
||||
makes me feel sick.
|
||||
|
||||
I heard @name downloaded War and Peace,
|
||||
but didn't expect it to be in russian.
|
||||
Took him a week to recover.
|
||||
|
||||
What's the deal with the cortical interface?
|
||||
So, like, what happens if I constantly request info dumps?
|
||||
Does that mean I live forever?
|
||||
|
||||
Temporal distortion is a common side effect when using the cortical interface.
|
||||
Information is processed near instantaneously, causing other
|
||||
external events to appear paused.
|
||||
|
||||
The cortical interface has some neat uses.
|
||||
I set up a timer to remind me of our anniversary.
|
||||
It's great, the AI even suggested the perfect present!
|
||||
|
||||
Mood disorders.
|
||||
|
||||
Anxiety.
|
||||
|
||||
Epilepsy.
|
||||
|
||||
Dizzyness, nauseau, tinitus.
|
||||
|
||||
Autism.
|
||||
|
||||
Schizoprenia.
|
||||
@@ -0,0 +1,18 @@
|
||||
Where am I? What year is this? When is this?,Error: Impossible to determine. Cannot resolve with known frame. Presumed outside Earth light cone.
|
||||
What is this place?,Central hub. Corrupted zones have been sealed off.
|
||||
Who am I?,"Error: Unkown referent: “I”. Cannot determine what “I” refers to. Possible partial referent: Biological form generated x miliseconds. Partial list features: torso, four limbs, head w/ partial configuration of scanned data."
|
||||
Who are you?,"Error: Unknown referent: “you”. Terminal connected distributed system, unknown extent."
|
||||
What should I do?,Error: Unknown objective function. Module “Cat.Imperative” missing.
|
||||
Are you an AI?,"Terminal connected to distributed system, unkown extent. Can generate respose to finite queries."
|
||||
How did I get here?,Generated from blueprints and brain scan transmitted in unkown past.
|
||||
Can you heal me?,Full regeneration upon termination in areas external to central hub. WARNING: Cannot regenerate upon termination within central hub.
|
||||
What can you do?,"Item synthesis in terminal (over there), requires blueprint. Transport to defective zones."
|
||||
What are my capabilities?,Err. Basic movement and item acquisition. Items confer new capabilities. WARNING: carry capacity restricted.
|
||||
How do I get more powerful?,Carry capacity restoration possible: acquire module through door to north.
|
||||
What is through that door?,Error: Cannot exhaustively describe location.
|
||||
Can you be less useful?,"Error: No objective function, try “set verbose”. Cannot determine utility of response."
|
||||
What are your capabilities?,Error: Parse “your → you”: Unknown referent “you”.
|
||||
,Error: Parse fail
|
||||
Do you have memory/hard drive?,All events logged with error correction. Future corruption inevitable. Unkown total bits of storage used/available across network.
|
||||
How long have you existed?,System clock: (random number) + game time
|
||||
What seed?,
|
||||
|
@@ -0,0 +1,9 @@
|
||||
Something has gone wrong.
|
||||
|
||||
My last memory is entering the reconstitution scanner.
|
||||
Though experimental,
|
||||
this techology theoretically allows for perfect duplication.
|
||||
But there are strict rules, this would only happen if my old body is...
|
||||
non-functional.
|
||||
|
||||
Hopefully I can take better care of this one.
|
||||
@@ -1,42 +1,42 @@
|
||||
X_RANGE 38.37
|
||||
Y_RANGE 9447512.00
|
||||
X_RANGE 11.40
|
||||
Y_RANGE 20574456.00
|
||||
ORDER OTHER 1
|
||||
ORDER (157697)#..\/#./targetYouWhenCognizant/updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/fu... 2
|
||||
ORDER (165654)updateCloud.finalPos/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functi... 3
|
||||
ORDER (165606)updateCloud.finalVel/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functi... 4
|
||||
ORDER (155261)plLineBlock.makePane/plLineBlock.makeWallAt/plLineBlock.insertBlock/plLineBlock.insertBlocks/plL... 5
|
||||
ORDER (157606)#..\/#./performActions/updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/functional... 6
|
||||
ORDER (157522)updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/functionalUpdate/timeFlowUpdate/u... 7
|
||||
ORDER (144146)ix/crSetRoots/crUpdateItemLocations/scrollAugNextInSection/checkInventorySelectionExists/updateI... 8
|
||||
ORDER (157678)chaseCritAwarenessUpdate/chaseCritPerceptionUpdate/chainCreatureUpdates.unf/chainCreatureUpdates... 9
|
||||
ORDER (159529)updateExpBarrel.applyFuseDamage/updateExpBarrel.newCr/#..\/#./updateExpBarrel/updateBarreloid/up... 10
|
||||
ORDER (165621)updateCloud.(...)/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functiona... 11
|
||||
ORDER (181320)#..\/#./crSetRoots.f/ix/crSetRoots/crUpdateItemLocations/scrollAugNextInSection/checkInventorySe... 12
|
||||
ORDER (152512)zonePe.f/zonePe/generateLevelFromRoomList/generateWorldFromSeed/startSeedGameConc/startSeedGame/... 13
|
||||
ORDER (158152)ix/updateInv/foldCr.f/foldCr/crUpdate/defaultImpulsive/updateHumanoid/updateCreature/dimap/dimap... 14
|
||||
ORDER (162804)listSelectionColorPicture.g/listSelectionColorPicture/updateSection.(...)/updateSection/updateSe... 15
|
||||
ORDER (181178)crUpdateInvidLocations/crUpdateItemLocations/scrollAugNextInSection/checkInventorySelectionExist... 16
|
||||
ORDER (159623)ix/crCrSpring/crSpring/simpleCrSprings/functionalUpdate/timeFlowUpdate/updateUniverseMid/updateU... 17
|
||||
ORDER (159633)colCrsWalls/functionalUpdate/timeFlowUpdate/updateUniverseMid/updateUniverse/updateRenderSplit/t... 18
|
||||
ORDER (163282)updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functionalUpdate/timeFlowUp... 19
|
||||
ORDER (157730)ix/updateInv/foldCr.f/foldCr/crUpdate/humanoidAIList/updateHumanoid/updateCreature/dimap/dimap/_... 20
|
||||
ORDER (13951)updateEdgeWallObs 2
|
||||
ORDER (14169)updateDisplaySections,updateEdgeWallObs 3
|
||||
ORDER (14505)SYSTEM,updateDisplaySections,doDrawing',colCrsWalls,updateEdgeWallObs 4
|
||||
ORDER (13997)updateEdgeWallObs 5
|
||||
ORDER (13996)updateEdgeWallObs 6
|
||||
ORDER (14223)SYSTEM,updateDisplaySections,updateEdgeWallObs 7
|
||||
ORDER (14009)updateEdgeWallObs 8
|
||||
ORDER (14027)updateEdgeWallObs,ix 9
|
||||
ORDER (13964)SYSTEM,updateEdgeWallObs 10
|
||||
ORDER (13953)updateEdgeWallObs 11
|
||||
ORDER (14086)updateEdgeWallObs,ix 12
|
||||
ORDER (14099)updateEdgeWallObs,ix 13
|
||||
ORDER (14085)updateEdgeWallObs,ix 14
|
||||
ORDER (14030)updateEdgeWallObs,ix 15
|
||||
ORDER (14175)SYSTEM,updateDisplaySections,updateEdgeWallObs 16
|
||||
ORDER (2)SYSTEM 17
|
||||
ORDER (13952)SYSTEM,updateEdgeWallObs 18
|
||||
ORDER (13941)updateEdgeWallObs 19
|
||||
ORDER (14018)updateEdgeWallObs,ix 20
|
||||
SHADE OTHER 0.00
|
||||
SHADE (157697)#..\/#./targetYouWhenCognizant/updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/fu... 0.00
|
||||
SHADE (165654)updateCloud.finalPos/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functi... 0.00
|
||||
SHADE (165606)updateCloud.finalVel/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functi... 0.00
|
||||
SHADE (155261)plLineBlock.makePane/plLineBlock.makeWallAt/plLineBlock.insertBlock/plLineBlock.insertBlocks/plL... 0.10
|
||||
SHADE (157606)#..\/#./performActions/updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/functional... 0.10
|
||||
SHADE (157522)updateHumanoid/updateCreature/dimap/dimap/_Wrapped'/updateIMl'/functionalUpdate/timeFlowUpdate/u... 0.10
|
||||
SHADE (144146)ix/crSetRoots/crUpdateItemLocations/scrollAugNextInSection/checkInventorySelectionExists/updateI... 0.10
|
||||
SHADE (157678)chaseCritAwarenessUpdate/chaseCritPerceptionUpdate/chainCreatureUpdates.unf/chainCreatureUpdates... 0.00
|
||||
SHADE (159529)updateExpBarrel.applyFuseDamage/updateExpBarrel.newCr/#..\/#./updateExpBarrel/updateBarreloid/up... 0.00
|
||||
SHADE (165621)updateCloud.(...)/updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functiona... 0.00
|
||||
SHADE (181320)#..\/#./crSetRoots.f/ix/crSetRoots/crUpdateItemLocations/scrollAugNextInSection/checkInventorySe... 0.00
|
||||
SHADE (152512)zonePe.f/zonePe/generateLevelFromRoomList/generateWorldFromSeed/startSeedGameConc/startSeedGame/... 0.05
|
||||
SHADE (158152)ix/updateInv/foldCr.f/foldCr/crUpdate/defaultImpulsive/updateHumanoid/updateCreature/dimap/dimap... 0.05
|
||||
SHADE (162804)listSelectionColorPicture.g/listSelectionColorPicture/updateSection.(...)/updateSection/updateSe... 0.05
|
||||
SHADE (181178)crUpdateInvidLocations/crUpdateItemLocations/scrollAugNextInSection/checkInventorySelectionExist... 0.05
|
||||
SHADE (159623)ix/crCrSpring/crSpring/simpleCrSprings/functionalUpdate/timeFlowUpdate/updateUniverseMid/updateU... 0.10
|
||||
SHADE (159633)colCrsWalls/functionalUpdate/timeFlowUpdate/updateUniverseMid/updateUniverse/updateRenderSplit/t... 0.10
|
||||
SHADE (163282)updateCloud/updateObjCatMaybes.(...)/updateObjCatMaybes/updateClouds/functionalUpdate/timeFlowUp... 0.10
|
||||
SHADE (157730)ix/updateInv/foldCr.f/foldCr/crUpdate/humanoidAIList/updateHumanoid/updateCreature/dimap/dimap/_... 0.10
|
||||
SHADE (13951)updateEdgeWallObs 0.00
|
||||
SHADE (14169)updateDisplaySections,updateEdgeWallObs 0.00
|
||||
SHADE (14505)SYSTEM,updateDisplaySections,doDrawing',colCrsWalls,updateEdgeWallObs 0.00
|
||||
SHADE (13997)updateEdgeWallObs 0.10
|
||||
SHADE (13996)updateEdgeWallObs 0.10
|
||||
SHADE (14223)SYSTEM,updateDisplaySections,updateEdgeWallObs 0.10
|
||||
SHADE (14009)updateEdgeWallObs 0.10
|
||||
SHADE (14027)updateEdgeWallObs,ix 0.00
|
||||
SHADE (13964)SYSTEM,updateEdgeWallObs 0.00
|
||||
SHADE (13953)updateEdgeWallObs 0.00
|
||||
SHADE (14086)updateEdgeWallObs,ix 0.00
|
||||
SHADE (14099)updateEdgeWallObs,ix 0.05
|
||||
SHADE (14085)updateEdgeWallObs,ix 0.05
|
||||
SHADE (14030)updateEdgeWallObs,ix 0.05
|
||||
SHADE (14175)SYSTEM,updateDisplaySections,updateEdgeWallObs 0.05
|
||||
SHADE (2)SYSTEM 0.10
|
||||
SHADE (13952)SYSTEM,updateEdgeWallObs 0.10
|
||||
SHADE (13941)updateEdgeWallObs 0.10
|
||||
SHADE (14018)updateEdgeWallObs,ix 0.10
|
||||
|
||||
@@ -1,281 +0,0 @@
|
||||
digraph {
|
||||
graph [rankdir=LR];
|
||||
subgraph 1 {
|
||||
1 [shape=box
|
||||
,label="EQUIP {_ibtEquip = FUELPACK}"];
|
||||
5 [shape=box
|
||||
,label="AMMOMAG {_ibtAmmoMag = TINMAG}"];
|
||||
9 [shape=box
|
||||
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 1}}"];
|
||||
13 [shape=box
|
||||
,label="HELD {_ibtHeld = PISTOL}"];
|
||||
15 [shape=box
|
||||
,label="HELD {_ibtHeld = AUTOPISTOL}"];
|
||||
17 [shape=box
|
||||
,label="HELD {_ibtHeld = SMG}"];
|
||||
20 [shape=box
|
||||
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
|
||||
22 [shape=box
|
||||
,label="HELD {_ibtHeld = BANGCONE}"];
|
||||
25 [shape=box
|
||||
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
|
||||
27 [shape=box
|
||||
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
|
||||
29 [shape=box
|
||||
,label="HELD {_ibtHeld = RIFLE}"];
|
||||
31 [shape=box
|
||||
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
|
||||
33 [shape=box
|
||||
,label="HELD {_ibtHeld = AUTORIFLE}"];
|
||||
35 [shape=box
|
||||
,label="HELD {_ibtHeld = BURSTRIFLE}"];
|
||||
37 [shape=box
|
||||
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
|
||||
40 [shape=box
|
||||
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
|
||||
41 [shape=box
|
||||
,label="HELD {_ibtHeld = AMR}"];
|
||||
44 [shape=box
|
||||
,label="HELD {_ibtHeld = AUTOAMR}"];
|
||||
46 [shape=box
|
||||
,label="HELD {_ibtHeld = RLAUNCHER}"];
|
||||
49 [shape=box
|
||||
,label="HELD {_ibtHeld = RLAUNCHERX {_xNum = 2}}"];
|
||||
53 [shape=box
|
||||
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
||||
57 [shape=box
|
||||
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
||||
59 [shape=box
|
||||
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
||||
61 [shape=box
|
||||
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
||||
63 [shape=box
|
||||
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
||||
65 [shape=box,label=LASER];
|
||||
69 [shape=box
|
||||
,label="HELD {_ibtHeld = SPARKGUN}"];
|
||||
71 [shape=box
|
||||
,label="HELD {_ibtHeld = TESLAGUN}"];
|
||||
73 [shape=box
|
||||
,label="HELD {_ibtHeld = BLINKERUNSAFE}"];
|
||||
74 [shape=box
|
||||
,label="HELD {_ibtHeld = BLINKER}"];
|
||||
77 [shape=box
|
||||
,label="EQUIP {_ibtEquip = MAGSHIELD MagnetRepulse}"];
|
||||
80 [shape=box
|
||||
,label="EQUIP {_ibtEquip = POWERLEGS}"];
|
||||
86 [shape=box
|
||||
,label="HELD {_ibtHeld = FLATSHIELD}"];
|
||||
96 [shape=box
|
||||
,label="DETECTOR {_ibtDetector = ITEMDETECTOR}"];
|
||||
99 [shape=box
|
||||
,label="DETECTOR {_ibtDetector = WALLDETECTOR}"];
|
||||
101 [shape=box
|
||||
,label="DETECTOR {_ibtDetector = CREATUREDETECTOR}"];
|
||||
103 [shape=box
|
||||
,label="HELD {_ibtHeld = TORCH}"];
|
||||
104 [shape=box
|
||||
,label="AMMOMAG {_ibtAmmoMag = BATTERY}"];
|
||||
107 [shape=box
|
||||
,label="EQUIP {_ibtEquip = HEADLAMP}"];
|
||||
108 [shape=box
|
||||
,label="EQUIP {_ibtEquip = HAT}"];
|
||||
110 [shape=box
|
||||
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
|
||||
}
|
||||
subgraph 2 {
|
||||
0 [shape=point];
|
||||
4 [shape=point];
|
||||
8 [shape=point];
|
||||
12 [shape=point];
|
||||
14 [shape=point];
|
||||
16 [shape=point];
|
||||
19 [shape=point];
|
||||
21 [shape=point];
|
||||
24 [shape=point];
|
||||
26 [shape=point];
|
||||
28 [shape=point];
|
||||
30 [shape=point];
|
||||
32 [shape=point];
|
||||
34 [shape=point];
|
||||
36 [shape=point];
|
||||
39 [shape=point];
|
||||
42 [shape=point];
|
||||
43 [shape=point];
|
||||
45 [shape=point];
|
||||
48 [shape=point];
|
||||
50 [shape=point];
|
||||
52 [shape=point];
|
||||
56 [shape=point];
|
||||
58 [shape=point];
|
||||
60 [shape=point];
|
||||
62 [shape=point];
|
||||
64 [shape=point];
|
||||
68 [shape=point];
|
||||
70 [shape=point];
|
||||
72 [shape=point];
|
||||
76 [shape=point];
|
||||
79 [shape=point];
|
||||
82 [shape=point];
|
||||
83 [shape=point];
|
||||
84 [shape=point];
|
||||
85 [shape=point];
|
||||
87 [shape=point];
|
||||
89 [shape=point];
|
||||
92 [shape=point];
|
||||
95 [shape=point];
|
||||
98 [shape=point];
|
||||
100 [shape=point];
|
||||
102 [shape=point];
|
||||
106 [shape=point];
|
||||
109 [shape=point];
|
||||
111 [shape=point];
|
||||
113 [shape=point];
|
||||
115 [shape=point];
|
||||
117 [shape=point];
|
||||
}
|
||||
0 -> 1 [xlabel="",tailport=e];
|
||||
4 -> 5 [xlabel="",tailport=e];
|
||||
8 -> 9 [xlabel="",tailport=e];
|
||||
9 -> 12 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 28 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 30 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 30 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 30 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 109 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 113 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
9 -> 115 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
12 -> 13 [xlabel="",tailport=e];
|
||||
13 -> 14 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
14 -> 15 [xlabel="",tailport=e];
|
||||
15 -> 16 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
15 -> 19 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
16 -> 17 [xlabel="",tailport=e];
|
||||
19 -> 20 [xlabel="",tailport=e];
|
||||
21 -> 22 [xlabel="",tailport=e];
|
||||
22 -> 24 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
24 -> 25 [xlabel="",tailport=e];
|
||||
25 -> 26 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
26 -> 27 [xlabel="",tailport=e];
|
||||
27 -> 117 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
28 -> 29 [xlabel="",tailport=e];
|
||||
29 -> 32 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
29 -> 34 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
29 -> 42 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
30 -> 31 [xlabel="",tailport=e];
|
||||
31 -> 36 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
31 -> 113 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
32 -> 33 [xlabel="",tailport=e];
|
||||
34 -> 35 [xlabel="",tailport=e];
|
||||
36 -> 37 [xlabel="",tailport=e];
|
||||
37 -> 115 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
39 -> 40 [xlabel="",tailport=e];
|
||||
41 -> 39 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
41 -> 43 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
42 -> 41 [xlabel="",tailport=e];
|
||||
43 -> 44 [xlabel="",tailport=e];
|
||||
45 -> 46 [xlabel="",tailport=e];
|
||||
46 -> 48 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
48 -> 49 [xlabel="",tailport=e];
|
||||
49 -> 50 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
52 -> 53 [xlabel="",tailport=e];
|
||||
53 -> 56 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
53 -> 58 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
56 -> 57 [xlabel="",tailport=e];
|
||||
58 -> 59 [xlabel="",tailport=e];
|
||||
59 -> 60 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
59 -> 62 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
60 -> 61 [xlabel="",tailport=e];
|
||||
62 -> 63 [xlabel="",tailport=e];
|
||||
64 -> 65 [xlabel="",tailport=e];
|
||||
68 -> 69 [xlabel="",tailport=e];
|
||||
69 -> 70 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
70 -> 71 [xlabel="",tailport=e];
|
||||
72 -> 73 [xlabel="",tailport=e];
|
||||
74 -> 72 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
76 -> 77 [xlabel="",tailport=e];
|
||||
79 -> 80 [xlabel="",tailport=e];
|
||||
85 -> 86 [xlabel="",tailport=e];
|
||||
95 -> 96 [xlabel="",tailport=e];
|
||||
98 -> 99 [xlabel="",tailport=e];
|
||||
100 -> 101 [xlabel=""
|
||||
,tailport=e];
|
||||
102 -> 103 [xlabel=""
|
||||
,tailport=e];
|
||||
103 -> 106 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
104 -> 102 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
106 -> 107 [xlabel=""
|
||||
,tailport=e];
|
||||
108 -> 106 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
109 -> 110 [xlabel=""
|
||||
,tailport=e];
|
||||
110 -> 111 [xlabel=1
|
||||
,arrowhead=onone
|
||||
,headport=w];
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
Seed: 7114951007332849727Layout with room names:
|
||||
rezBox-0
|
||||
|
|
||||
autoDoor-1
|
||||
|
|
||||
rectPillars-2
|
||||
|
|
||||
autoDoor-3
|
||||
|
|
||||
Corridor-4
|
||||
|
|
||||
autoDoor-5
|
||||
|
|
||||
ElecautoRect-6
|
||||
|
|
||||
+- triggerDoorRoom-7
|
||||
| |
|
||||
| autoDoor-8
|
||||
| |
|
||||
| autoDoor-9
|
||||
| |
|
||||
| Corridor-10
|
||||
| |
|
||||
| autoDoor-11
|
||||
| |
|
||||
| 8gon-12
|
||||
| |
|
||||
| triggerDoorRoom-13
|
||||
| |
|
||||
| autoDoor-14
|
||||
| |
|
||||
| autoDoor-15
|
||||
| |
|
||||
| Corridor-16
|
||||
| |
|
||||
| autoRect-17
|
||||
| |
|
||||
| autoDoor-18
|
||||
| |
|
||||
| Corridor-19
|
||||
| |
|
||||
| autoDoor-20
|
||||
| |
|
||||
| 6gon-21
|
||||
| |
|
||||
| +- triggerDoorRoom-22
|
||||
| | |
|
||||
| | autoDoor-23
|
||||
| | |
|
||||
| | autoDoor-24
|
||||
| | |
|
||||
| | Corridor-25
|
||||
| | |
|
||||
| | autoDoor-26
|
||||
| | |
|
||||
| | warningTerm-8gon-27
|
||||
| | |
|
||||
| | triggerDoorRoom-28
|
||||
| | |
|
||||
| | autoDoor-29
|
||||
| | |
|
||||
| | autoDoor-30
|
||||
| | |
|
||||
| | Corridor-31
|
||||
| | |
|
||||
| | autoRect-32
|
||||
| | |
|
||||
| | autoDoor-33
|
||||
| | |
|
||||
| | Corridor-34
|
||||
| | |
|
||||
| | autoDoor-35
|
||||
| | |
|
||||
| | Corridor-36
|
||||
| | |
|
||||
| | 8gon-37
|
||||
| | |
|
||||
| | triggerDoorRoom-38
|
||||
| | |
|
||||
| | autoDoor-39
|
||||
| | |
|
||||
| | autoDoor-40
|
||||
| | |
|
||||
| | Corridor-41
|
||||
| | |
|
||||
| | tanksRoom-42
|
||||
| | |
|
||||
| | autoDoor-43
|
||||
| | |
|
||||
| | Corridor-44
|
||||
| | |
|
||||
| | autoDoor-45
|
||||
| | |
|
||||
| | rect-46
|
||||
| | |
|
||||
| | +- autoDoor-47
|
||||
| | | |
|
||||
| | | autoDoor-48
|
||||
| | | |
|
||||
| | | Corridor-49
|
||||
| | | |
|
||||
| | | autoRect-50
|
||||
| | | |
|
||||
| | | defaultRoom-51
|
||||
| | | |
|
||||
| | | autoRect-52
|
||||
| | | |
|
||||
| | | defaultRoom-53
|
||||
| | | |
|
||||
| | | autoRect-54
|
||||
| | | |
|
||||
| | | autoDoor-55
|
||||
| | | |
|
||||
| | | Corridor-56
|
||||
| | | |
|
||||
| | | autoDoor-57
|
||||
| | | |
|
||||
| | | 8gon-58
|
||||
| | | |
|
||||
| | | triggerDoorRoom-59
|
||||
| | | |
|
||||
| | | autoDoor-60
|
||||
| | | |
|
||||
| | | autoDoor-61
|
||||
| | | |
|
||||
| | | Corridor-62
|
||||
| | | |
|
||||
| | | defaultRoom-63
|
||||
| | |
|
||||
| | Corridor-64
|
||||
| | |
|
||||
| | autoDoor-65
|
||||
| |
|
||||
| autoDoor-66
|
||||
| |
|
||||
| Corridor-67
|
||||
| |
|
||||
| autoRect-68
|
||||
|
|
||||
autoDoor-69
|
||||
|
|
||||
Corridor-70
|
||||
|
|
||||
autoRect-71
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Generating level with seed 7114951007332849727
|
||||
|
||||
After 1 attempt(s), Successful generation of level with seed 7114951007332849727
|
||||
72 rooms in total
|
||||
@@ -1,267 +0,0 @@
|
||||
Seed: 7114951007332849727
|
||||
0:startThenWeaponRoom
|
||||
|
|
||||
1:corDoor
|
||||
|
|
||||
2:PassthroughLockKeyLists-HELD {_ibtHeld = SPARKGUN}
|
||||
|
|
||||
3:corDoor
|
||||
|
|
||||
4:lasSensorTurretTest
|
||||
|
|
||||
5:corDoor
|
||||
|
|
||||
6:SingleRoom
|
||||
|
|
||||
7:corDoor
|
||||
|
|
||||
8:PassthroughLockKeyLists-HELD {_ibtHeld = KEYCARD 0}
|
||||
|
|
||||
9:corDoor
|
||||
|
|
||||
10:warningRooms
|
||||
|
|
||||
11:corDoor
|
||||
|
|
||||
12:chaseCrit+armourChaseCrit rectRoom
|
||||
|
|
||||
13:corDoor
|
||||
|
|
||||
14:healthTest
|
||||
|
|
||||
15:corDoor
|
||||
|
|
||||
16:empty tanksRoom
|
||||
|
|
||||
17:corDoor
|
||||
|
|
||||
18:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
|
||||
|
|
||||
19:corDoor
|
||||
|
|
||||
20:shootingRange
|
||||
|
|
||||
21:corDoor
|
||||
|
|
||||
22:lasSensorTurretTest
|
||||
|
|
||||
23:corDoor
|
||||
|
|
||||
24:randomFourCornerRoom
|
||||
|
||||
0:0:startThenWeaponRoom
|
||||
|
|
||||
0:1:weaponBetweenPillars_BANGSTICK4
|
||||
|
||||
0:0:0:rezBox'
|
||||
|
||||
0:0:0:0:rezBox
|
||||
|
|
||||
0:0:0:1:autoDoor
|
||||
|
||||
0:1:0:rectPillars
|
||||
|
||||
1:0:corDoor
|
||||
|
||||
1:0:0:autoDoor
|
||||
|
|
||||
1:0:1:Corridor
|
||||
|
||||
2:0:PassthroughLockKeyLists-HELD {_ibtHeld = SPARKGUN}
|
||||
|
||||
2:0:0:RassThroughLockKeyLists
|
||||
|
|
||||
2:0:1:roomsContaining chaseCritchaseCritTRANSFORMERCANCAN
|
||||
|
||||
2:0:0:0:sensorRoomRunPast
|
||||
|
||||
2:0:0:0:0:autoDoor
|
||||
|
|
||||
2:0:0:0:1:ElecautoRect
|
||||
|
|
||||
+- 2:0:0:0:2:triggerDoorRoom
|
||||
| |
|
||||
| 2:0:0:0:3:autoDoor
|
||||
|
|
||||
2:0:0:0:4:autoDoor
|
||||
|
|
||||
2:0:0:0:5:Corridor
|
||||
|
||||
2:0:1:0:autoRect
|
||||
|
||||
3:0:corDoor
|
||||
|
||||
3:0:0:autoDoor
|
||||
|
|
||||
3:0:1:Corridor
|
||||
|
||||
4:0:lasSensorTurretTest
|
||||
|
||||
4:0:0:autoDoor
|
||||
|
|
||||
4:0:1:8gon
|
||||
|
|
||||
4:0:2:triggerDoorRoom
|
||||
|
|
||||
4:0:3:autoDoor
|
||||
|
||||
5:0:corDoor
|
||||
|
||||
5:0:0:autoDoor
|
||||
|
|
||||
5:0:1:Corridor
|
||||
|
||||
6:0:SingleRoom
|
||||
|
||||
6:0:0:autoRect
|
||||
|
||||
7:0:corDoor
|
||||
|
||||
7:0:0:autoDoor
|
||||
|
|
||||
7:0:1:Corridor
|
||||
|
||||
8:0:PassthroughLockKeyLists-HELD {_ibtHeld = KEYCARD 0}
|
||||
|
||||
8:0:0:RassThroughLockKeyLists
|
||||
|
|
||||
8:0:1:roomsContaining chaseCritchaseCritchaseCritKEYCARD 0
|
||||
|
||||
8:0:0:0:keyCardRoomRunPast
|
||||
|
||||
8:0:0:0:0:autoDoor
|
||||
|
|
||||
8:0:0:0:1:6gon
|
||||
|
|
||||
+- 8:0:0:0:2:triggerDoorRoom
|
||||
| |
|
||||
| 8:0:0:0:3:autoDoor
|
||||
|
|
||||
8:0:0:0:4:autoDoor
|
||||
|
|
||||
8:0:0:0:5:Corridor
|
||||
|
||||
8:0:1:0:autoRect
|
||||
|
||||
9:0:corDoor
|
||||
|
||||
9:0:0:autoDoor
|
||||
|
|
||||
9:0:1:Corridor
|
||||
|
||||
10:0:warningRooms
|
||||
|
||||
10:0:0:autoDoor
|
||||
|
|
||||
10:0:1:warningTerm-8gon
|
||||
|
|
||||
10:0:2:triggerDoorRoom
|
||||
|
|
||||
10:0:3:autoDoor
|
||||
|
||||
11:0:corDoor
|
||||
|
||||
11:0:0:autoDoor
|
||||
|
|
||||
11:0:1:Corridor
|
||||
|
||||
12:0:chaseCrit+armourChaseCrit rectRoom
|
||||
|
||||
12:0:0:autoRect
|
||||
|
||||
13:0:corDoor
|
||||
|
||||
13:0:0:autoDoor
|
||||
|
|
||||
13:0:1:Corridor
|
||||
|
||||
14:0:healthTest
|
||||
|
||||
14:0:0:autoDoor
|
||||
|
|
||||
14:0:1:Corridor
|
||||
|
|
||||
14:0:2:8gon
|
||||
|
|
||||
14:0:3:triggerDoorRoom
|
||||
|
|
||||
14:0:4:autoDoor
|
||||
|
||||
15:0:corDoor
|
||||
|
||||
15:0:0:autoDoor
|
||||
|
|
||||
15:0:1:Corridor
|
||||
|
||||
16:0:empty tanksRoom
|
||||
|
||||
16:0:0:tanksRoom
|
||||
|
||||
17:0:corDoor
|
||||
|
||||
17:0:0:autoDoor
|
||||
|
|
||||
17:0:1:Corridor
|
||||
|
||||
18:0:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
|
||||
|
||||
18:0:0:RassThroughLockKeyLists
|
||||
|
|
||||
18:0:1:roomsContaining chaseCritchaseCritSNIPERRIFLE
|
||||
|
||||
18:0:0:0:longRoomRunPast
|
||||
|
||||
18:0:0:0:0:autoDoor
|
||||
|
|
||||
18:0:0:0:1:rect
|
||||
|
|
||||
+- 18:0:0:0:2:autoDoor
|
||||
|
|
||||
18:0:0:0:3:Corridor
|
||||
|
|
||||
18:0:0:0:4:autoDoor
|
||||
|
||||
18:0:1:0:rectPillars
|
||||
|
||||
19:0:corDoor
|
||||
|
||||
19:0:0:autoDoor
|
||||
|
|
||||
19:0:1:Corridor
|
||||
|
||||
20:0:shootingRange
|
||||
|
||||
20:0:0:autoRect
|
||||
|
|
||||
20:0:1:defaultRoom
|
||||
|
|
||||
20:0:2:autoRect
|
||||
|
|
||||
20:0:3:defaultRoom
|
||||
|
|
||||
20:0:4:autoRect
|
||||
|
||||
21:0:corDoor
|
||||
|
||||
21:0:0:autoDoor
|
||||
|
|
||||
21:0:1:Corridor
|
||||
|
||||
22:0:lasSensorTurretTest
|
||||
|
||||
22:0:0:autoDoor
|
||||
|
|
||||
22:0:1:8gon
|
||||
|
|
||||
22:0:2:triggerDoorRoom
|
||||
|
|
||||
22:0:3:autoDoor
|
||||
|
||||
23:0:corDoor
|
||||
|
||||
23:0:0:autoDoor
|
||||
|
|
||||
23:0:1:Corridor
|
||||
|
||||
24:0:defaultRoom
|
||||
|
||||
@@ -6,9 +6,9 @@ author: "Author name here"
|
||||
maintainer: "example@example.com"
|
||||
copyright: "2021 Author name here"
|
||||
|
||||
extra-source-files:
|
||||
- README.md
|
||||
- ChangeLog.md
|
||||
# extra-source-files:
|
||||
# - README.md
|
||||
# - ChangeLog.md
|
||||
|
||||
# Metadata used when publishing your package
|
||||
# synopsis: A basic game loop
|
||||
@@ -50,11 +50,12 @@ dependencies:
|
||||
- primitive
|
||||
- monad-parallel
|
||||
- parallel
|
||||
- Clipboard
|
||||
- tasty
|
||||
- tasty-hunit
|
||||
- tasty-quickcheck
|
||||
- list-tries
|
||||
- Hclip
|
||||
- search-algorithms
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
7114951007332849727
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 450 core
|
||||
struct PosTex { vec4 pospos; vec4 texang; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 2) readonly buffer Pos { PosTex data[]; };
|
||||
int indices[6] = {0,1,3,0,3,2};
|
||||
void main()
|
||||
{
|
||||
vec4 pp = data[gl_VertexID / 6].pospos;
|
||||
int j = indices[gl_VertexID % 6];
|
||||
float z = (j / 2 > 0.5 ? 5000 : 100);
|
||||
vec2 xy = (j % 2 > 0 ? pp.xy : pp.zw);
|
||||
gl_Position = theMat * vec4(xy,z,1);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 450 core
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 7) readonly buffer Pos { vec2 pos[]; };
|
||||
void main() {
|
||||
gl_Position = theMat * vec4(pos[gl_VertexID],0,1);
|
||||
}
|
||||
@@ -1,27 +1,18 @@
|
||||
#version 450 core
|
||||
in vec4 vPosID;
|
||||
in vec4 vCol;
|
||||
in vec4 vCenterSize;
|
||||
in vec4 vControls;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=2) out vec4 fNorm;
|
||||
void main()
|
||||
{
|
||||
// there are quite a few intricate controls concerning the normals
|
||||
// we want normals to be bigger towards the center, so that when two clouds
|
||||
// are blended central normals predominate
|
||||
// similarly, we want normals to be bigger the further up the cloud is
|
||||
// finally, we want normals to allow for shadows at the edge of a cloud
|
||||
// when a light is direcly above the cloud
|
||||
float d = dot(vControls,vControls);
|
||||
if (d > 1) {discard;}
|
||||
//fCol = vCol;
|
||||
fCol = vec4(vCol.xyz,vCol.w*(1-d));
|
||||
//float rad = vCenterSize.w*0.5;
|
||||
float rad = vCenterSize.w;
|
||||
float h = (1-d) * rad;
|
||||
fPos = vec4(vPosID.xy, vPosID.z + h, vCol.w*(1-d));
|
||||
vec3 fn1 = fPos.z*normalize(vec3(vCenterSize.xyz - fPos.xyz));
|
||||
fNorm = vec4(fn1,fPos.w);
|
||||
fPos = vec4(vPosID.xyz, vCol.w*(1-d));
|
||||
//fPos = vec4(vPosID.xy,vPosID.z*0.5, vCol.w*(1-d));
|
||||
fNorm = vec4(-vControls.xy, -0.1 + 0.2 * d ,fPos.w);
|
||||
//fNorm = vec4(-vControls.xy, -0.1 + 2 * d ,vCol.w * (1.01-(d*d*d)));
|
||||
//fNorm = vec4(-vControls.xy, -0.1 + d , fPos.w);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 posID;
|
||||
layout (location = 1) in vec4 col;
|
||||
layout (location = 2) in vec4 centerSize;
|
||||
layout (location = 3) in vec4 controls;
|
||||
layout (location = 2) in vec4 controls;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vPosID;
|
||||
out vec4 vCol;
|
||||
out vec4 vCenterSize;
|
||||
out vec4 vControls;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(posID.xyz,1);
|
||||
vPosID = posID;
|
||||
vCol = col;
|
||||
vCenterSize = centerSize;
|
||||
vControls = controls;
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec4 col;
|
||||
layout (location = 2) in vec3 boxXboxYwidth;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
out vec3 vPos;
|
||||
out vec3 vparams;
|
||||
void main() {
|
||||
gl_Position = theMat * vec4(pos,1);
|
||||
vCol = col;
|
||||
vparams = boxXboxYwidth;
|
||||
vPos = pos;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec4 col;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
out vec3 vPos;
|
||||
void main() {
|
||||
gl_Position = theMat * vec4(pos,1);
|
||||
vCol = col;
|
||||
vPos = pos;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
in vec4 vCol;
|
||||
in vec3 vPos;
|
||||
void main() {
|
||||
fCol = vCol;
|
||||
fPos = vec4(vPos,1) ;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 position;
|
||||
layout (location = 1) in vec4 color;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
out vec3 vPos;
|
||||
void main()
|
||||
{
|
||||
vec4 posxy = theMat * vec4(position.xyz,1);
|
||||
vec4 posz = theMat * vec4(position.xyw,1);
|
||||
gl_Position = vec4(posxy.xy,posz.z,1);
|
||||
vCol = color;
|
||||
vPos = position.xyz;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#version 450 core
|
||||
in vec4 vColor;
|
||||
in vec2 boxOut;
|
||||
in vec2 boxIn;
|
||||
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
//float d = x - y - 1 + 2* sqrt(y);
|
||||
float d = sqrt(boxOut.x) + sqrt(boxOut.y) - 1.0;
|
||||
// float e = sqrt(f(x,wStart)) + sqrt(f(y,wEnd)) - 1.0;
|
||||
float e = sqrt(boxIn.x) + sqrt(boxIn.y) - 1.0;
|
||||
if ( d < 0 || e > 0) { discard; }
|
||||
fCol = vColor;
|
||||
fPos = vec4(0,0,0,0) ;
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
#version 450 core
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 5) out;
|
||||
in vec4 vColor[];
|
||||
in vec2 vPosOff[];
|
||||
in float vRadMag[];
|
||||
out vec4 gColor;
|
||||
out float wStart;
|
||||
out float wEnd;
|
||||
out vec3 gBoundingBox;
|
||||
|
||||
out vec2 box2 ;
|
||||
|
||||
vec2 normV2 (vec2 v)
|
||||
{ return vec2(-v.y,v.x) ;
|
||||
}
|
||||
float lhs (vec2 da, vec2 db)
|
||||
{ return sign(dot(da, normV2(db))) ;
|
||||
}
|
||||
|
||||
float extrapolate (vec2 inOne, vec2 inZeroA, vec2 inZeroB, vec2 xy)
|
||||
{
|
||||
float det = inOne.x * (inZeroA.y - inZeroB.y)
|
||||
+ inZeroA.x * (inZeroB.y - inOne.y)
|
||||
+ inZeroB.x * (inOne.y - inZeroA.y)
|
||||
;
|
||||
float r = (inZeroA.y - inZeroB.y) ;
|
||||
float s = (inZeroB.x - inZeroA.x) ;
|
||||
float t = (inZeroA.x * inZeroB.y - inZeroB.x * inZeroA.y) ;
|
||||
return r * xy.x + s * xy.y + t
|
||||
/ det ;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 pa = gl_in[0].gl_Position.xyz;
|
||||
vec3 pb = gl_in[1].gl_Position.xyz;
|
||||
vec3 pc = gl_in[2].gl_Position.xyz;
|
||||
|
||||
wStart = vRadMag [0];
|
||||
wEnd = vRadMag [2];
|
||||
|
||||
box2 = vec2 (1,0);
|
||||
gBoundingBox = vec3 (0.9,0.1,0);
|
||||
gColor = vColor[0];
|
||||
gl_Position = vec4 (vPosOff[0] , pa.z , 1);
|
||||
EmitVertex();
|
||||
box2 = vec2 (0,1);
|
||||
gBoundingBox = vec3 (0.1,0.9,0);
|
||||
gColor = vColor[2];
|
||||
gl_Position = vec4 (vPosOff[2] , pc.z , 1);
|
||||
EmitVertex();
|
||||
box2 = vec2( extrapolate(vPosOff[0],vPosOff[2],pb.xy,pa.xy)
|
||||
, extrapolate(vPosOff[2],vPosOff[0],pb.xy,pa.xy)
|
||||
) ;
|
||||
box2 = vec2(0.2,0);
|
||||
gBoundingBox = vec3 (1,0,1);
|
||||
gColor = vColor[0];
|
||||
gl_Position = vec4 (pa, 1);
|
||||
EmitVertex();
|
||||
box2 = vec2( extrapolate(vPosOff[0],vPosOff[2],pb.xy,pc.xy)
|
||||
, extrapolate(vPosOff[2],vPosOff[0],pb.xy,pc.xy)
|
||||
) ;
|
||||
box2 = vec2(0,0.2);
|
||||
gBoundingBox = vec3 (0,1,1);
|
||||
gColor = vColor[2];
|
||||
gl_Position = vec4 (pc, 1);
|
||||
EmitVertex();
|
||||
box2 = vec2( 0,0 ) ;
|
||||
gBoundingBox = vec3 (0,0,0);
|
||||
gColor = vColor[1];
|
||||
gl_Position = vec4 (pb, 1);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 position;
|
||||
layout (location = 1) in vec4 color;
|
||||
layout (location = 2) in vec4 boxes;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vColor;
|
||||
out vec2 boxOut;
|
||||
out vec2 boxIn;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(position.xyz,1);
|
||||
vColor = color;
|
||||
boxOut = boxes.xy ;
|
||||
boxIn = boxes.zw ;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
uniform sampler2D aTexture;
|
||||
in vec4 gColor;
|
||||
in vec2 gTexCoord;
|
||||
void main()
|
||||
{
|
||||
fCol = texture(aTexture, vec2 (gTexCoord.x * 0.0078125, gTexCoord.y)) * gColor;
|
||||
fPos = vec4(0,0,0,0);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
#version 450 core
|
||||
layout (points) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
in vec4 vColor [];
|
||||
in vec3 vTexCoord [];
|
||||
out vec4 gColor;
|
||||
out vec2 gTex;
|
||||
void main()
|
||||
{
|
||||
vec3 cenPos = gl_in[0].gl_Position.xyz;
|
||||
float sizex = vTexCoord[0].y;
|
||||
float sizey = vTexCoord[0].z;
|
||||
//float size = 0.05;
|
||||
gColor = vColor[0];
|
||||
float texPos = vTexCoord[0].x;
|
||||
|
||||
gl_Position = vec4 (cenPos.x - sizex*0.5, cenPos.y - sizey*0.5, cenPos.z , 1);
|
||||
//gl_Position = vec4 (0, 0 , 5 , 1);
|
||||
gTex = vec2 (texPos*0.0078125, 1);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (cenPos.x - sizex*0.5, cenPos.y + sizey*0.5, cenPos.z , 1);
|
||||
//gl_Position = vec4 (0, 0.5 , 5 , 1);
|
||||
gTex = vec2 (texPos*0.0078125, 0);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (cenPos.x + sizex*0.5, cenPos.y - sizey*0.5, cenPos.z , 1);
|
||||
//gl_Position = vec4 (0.5, 0.5 , -5 , 1);
|
||||
gTex = vec2 ((texPos+1)*0.0078125, 1);
|
||||
EmitVertex();
|
||||
gl_Position = vec4 (cenPos.x + sizex*0.5, cenPos.y + sizey*0.5, cenPos.z , 1);
|
||||
gTex = vec2 ((texPos+1)*0.0078125, 0);
|
||||
//gl_Position = vec4 (0.5, 0 , -5 , 1);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec4 aColor;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 gColor;
|
||||
out vec2 gTexCoord;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(aPos, 1.0);
|
||||
gColor = aColor;
|
||||
gTexCoord = aTexCoord;
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
#version 450 core
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
in vec4 vCol[];
|
||||
out vec4 gColC; // center color
|
||||
out vec4 gColE; // edge color
|
||||
out vec2 gBoundingBox;
|
||||
out vec3 gPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 pat = gl_in[0].gl_Position;
|
||||
vec4 pbt = gl_in[1].gl_Position;
|
||||
vec4 pct = gl_in[2].gl_Position;
|
||||
vec4 pa = theMat * pat;
|
||||
vec4 pb = theMat * pbt;
|
||||
vec4 pc = theMat * pct;
|
||||
gColC = vCol[0];
|
||||
gColE = vCol[1];
|
||||
|
||||
gBoundingBox = vec2 (-1,1);
|
||||
gl_Position = pb;
|
||||
gPos = pbt.xyz;
|
||||
EmitVertex();
|
||||
gBoundingBox = vec2 (1,1);
|
||||
gl_Position = pa;
|
||||
gPos = pat.xyz;
|
||||
EmitVertex();
|
||||
gBoundingBox = vec2 (-1,-1);
|
||||
gl_Position = pc;
|
||||
gPos = pct.xyz;
|
||||
EmitVertex();
|
||||
gBoundingBox = vec2 (1,-1);
|
||||
gl_Position = pa + pc - pb;
|
||||
gPos = pat.xyz + pct.xyz - pbt.xyz;
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec4 col;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
void main()
|
||||
{
|
||||
//gl_Position = theMat * vec4(pos,1);
|
||||
gl_Position = vec4(pos,1);
|
||||
vCol = col;
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
in vec4 vTexPosRot;
|
||||
in vec2 vPos;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=1) out vec3 fPos;
|
||||
layout (location=2) out vec4 normal;
|
||||
//layout (binding=0) uniform sampler2DArray tilesetSampler;
|
||||
layout (binding=40) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=41) uniform sampler2DArray normalSampler;
|
||||
vec2 rotateV2 (float a, vec2 v)
|
||||
@@ -16,8 +15,9 @@ void main()
|
||||
vec3 vTexPos = vTexPosRot.xyz;
|
||||
float rot = vTexPosRot.w;
|
||||
fCol = vec4(texture(diffuseSampler,vTexPos));
|
||||
fPos = vec4(vPos,0,1);
|
||||
fPos = vec3(vPos,0);
|
||||
vec4 bn = vec4(texture(normalSampler,vTexPos) - 0.5);
|
||||
vec3 nmap1 = vec3(rotateV2(rot,bn.xy), bn.z);
|
||||
normal = vec4(-nmap1 ,0);
|
||||
normal = vec4(-nmap1.xyz ,0);
|
||||
//normal = vec4(0,0,-1 ,0);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 posXX;
|
||||
layout (location = 1) in vec4 texPosRot;
|
||||
struct PosTexRot {vec4 posXX; vec4 texPosRot; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 8) readonly buffer Data { PosTexRot data[]; };
|
||||
out vec4 vTexPosRot;
|
||||
out vec2 vPos;
|
||||
void main()
|
||||
{
|
||||
vPos = posXX.xy;
|
||||
vPos = data[gl_VertexID].posXX.xy;
|
||||
gl_Position = theMat * vec4(vPos,0,1.0) ;
|
||||
vTexPosRot = texPosRot;
|
||||
vTexPosRot = data[gl_VertexID].texPosRot;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 450 core
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
layout(binding = 0) uniform sampler2D wincol;
|
||||
layout(binding = 1) uniform sampler2D winpos;
|
||||
layout(binding = 2) uniform sampler2D cloudcol;
|
||||
layout(binding = 3) uniform sampler2D cloudpos;
|
||||
vec4 blend (vec4 src, vec4 dst) {
|
||||
return src + (1-src.a) * dst;
|
||||
}
|
||||
void main() {
|
||||
//fColor = texture(t0, vTexPos) + texture(t2, vTexPos);
|
||||
vec4 x = texture(wincol, vTexPos);
|
||||
float xz = texture(winpos, vTexPos).z;
|
||||
vec4 y = texture(cloudcol, vTexPos);
|
||||
float yz = texture(cloudpos, vTexPos).z;
|
||||
fColor = ( xz > yz ? blend(x,y) : blend(y,x)) ;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 450 core
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
|
||||
out vec2 vTexPos;
|
||||
void main() {
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#version 450 core
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 3) out;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout(location=0)uniform vec3 lightPos;
|
||||
in float drawbit[];
|
||||
// the following code is duplicated in lineShadow.geom, should not be changed on its own
|
||||
vec4 projNear (vec4 pos)
|
||||
{
|
||||
// note we project to a specific height
|
||||
// this is quite brittle, not ideal
|
||||
vec3 dir = pos.xyz - lightPos ;
|
||||
float a = (100 - pos.z) / dir.z ;
|
||||
vec2 xy = (pos.xyz + a * dir).xy ;
|
||||
return vec4 ( xy, 100 , 1) ;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
vec4 p0 = gl_in[0].gl_Position ;
|
||||
vec4 p1 = gl_in[1].gl_Position ;
|
||||
vec4 p2 = gl_in[2].gl_Position ;
|
||||
if ( //if Light Source is below all vertices, draw cap
|
||||
// TODO think about when LS is beside the object
|
||||
(drawbit[0] == 1)
|
||||
&& ( p0.z - lightPos.z > 0 )
|
||||
&& ( p1.z - lightPos.z > 0 )
|
||||
&& ( p2.z - lightPos.z > 0 )
|
||||
)
|
||||
{
|
||||
// the front cap
|
||||
vec4 v1 = vec4 (0,0,1,0) ;
|
||||
gl_Position = theMat * projNear(p0); EmitVertex();
|
||||
gl_Position = theMat * projNear(p2); EmitVertex();
|
||||
gl_Position = theMat * projNear(p1); EmitVertex();
|
||||
EndPrimitive();
|
||||
}
|
||||
else {}
|
||||
}
|
||||
@@ -1,11 +1,28 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 position;
|
||||
struct PosColNorm { vec4 pos; vec4 dummy; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
uniform vec3 lightPos;
|
||||
uniform vec4 lumRad;
|
||||
out float drawbit;
|
||||
void main()
|
||||
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 lumRad; };
|
||||
layout (std430, binding = 3) readonly buffer Data { PosColNorm data[]; };
|
||||
layout (std430, binding = 4) readonly buffer Indices { uint indices[]; };
|
||||
vec4 projNear (vec4 pos)
|
||||
{
|
||||
gl_Position = vec4(position.xyz,1);
|
||||
drawbit = position.w;
|
||||
// note we project to a specific height
|
||||
// this is quite brittle, not ideal
|
||||
vec3 dir = pos.xyz - lightPos.xyz ;
|
||||
float a = (100 - pos.z) / dir.z ;
|
||||
vec2 xy = (pos.xyz + a * dir).xy ;
|
||||
return vec4 ( xy, 100 , 1) ;
|
||||
}
|
||||
bool ztest (vec4 p) {return p.z - lightPos.z > 0;}
|
||||
void main() {
|
||||
int j = gl_VertexID/3;
|
||||
int i1 = j * 3;
|
||||
vec4 po = data[indices[gl_VertexID]].pos;
|
||||
gl_Position = (po.w == 1
|
||||
&& ztest(data[indices[i1]].pos)
|
||||
&& ztest(data[indices[i1+1]].pos)
|
||||
&& ztest(data[indices[i1+2]].pos)
|
||||
? theMat * projNear(po)
|
||||
: vec4(1,1,1,0)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#version 450 core
|
||||
// an attempt to test whether a geometry surface occludes the camera from a
|
||||
// light source
|
||||
layout (triangles) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
uniform vec3 lightPos;
|
||||
uniform vec2 camPos;
|
||||
void main()
|
||||
{
|
||||
vec3 p0 = gl_in[0].gl_Position.xyz ;
|
||||
vec3 p1 = gl_in[1].gl_Position.xyz ;
|
||||
vec3 p2 = gl_in[2].gl_Position.xyz ;
|
||||
|
||||
// first determine intersection point (if any)
|
||||
|
||||
vec3 u = p1 - p0 ;
|
||||
vec3 v = p2 - p0 ;
|
||||
vec3 n = cross (u,v) ;
|
||||
vec3 dir = vec3 (camPos, 100) - lightPos ;
|
||||
vec3 w0 = p0 - lightPos ;
|
||||
float a = dot(n, w0) ;
|
||||
float b = dot(n,dir) ;
|
||||
if (abs(b) < 0.00001) {}
|
||||
else {
|
||||
float r = a / b ;
|
||||
if (r < 0.0) {}
|
||||
else {
|
||||
vec3 ip = lightPos + r * dir ;
|
||||
float uu, uv, vv, wu, wv, D;
|
||||
uu = dot(u,u);
|
||||
uv = dot(u,v);
|
||||
vv = dot(v,v);
|
||||
vec3 w = ip - p0;
|
||||
wu = dot (w,u);
|
||||
wv = dot (w,v);
|
||||
D = uv * uv - uu * vv;
|
||||
//get and test parametric coords
|
||||
float s, t;
|
||||
s = (uv * wv - vv * wu) / D;
|
||||
if (s < 0.0 || s > 1.0) {}
|
||||
else
|
||||
{
|
||||
t = (uv * wu - uu * wv) / D;
|
||||
if (t < 0.0 || (s + t) > 1.0) {}
|
||||
else
|
||||
{
|
||||
gl_Position = vec4(-1,-1,50,1); EmitVertex();
|
||||
gl_Position = vec4(-1, 1,50,1); EmitVertex();
|
||||
gl_Position = vec4( 1,-1,50,1); EmitVertex();
|
||||
gl_Position = vec4( 1, 1,50,1); EmitVertex();
|
||||
EndPrimitive();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#version 450 core
|
||||
layout(early_fragment_tests) in;
|
||||
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 lumRad; };
|
||||
layout (binding = 0) uniform sampler2D posTexture;
|
||||
layout (binding = 1) uniform sampler2D normals;
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
float rad = lumRad.a;
|
||||
void main() {
|
||||
vec3 pos = texture(posTexture, vTexPos).xyz;
|
||||
vec3 distVec = pos - lightPos.xyz;
|
||||
float dist = dot(distVec, distVec);
|
||||
vec3 norm = texture(normals, vTexPos).xyz;
|
||||
float y1 = dot(norm, distVec);
|
||||
float y2 = float(y1 > 0 ? 1 : 0.2);
|
||||
//bool t = pos.z > lightPos.z && norm.z > 0;
|
||||
//float y2 = float(y1 > 0 || t ? 1 : 0.1);
|
||||
float x = 1 - (pow(dist / rad,4));
|
||||
vec3 c = y2* x * lumRad.rgb;
|
||||
fColor = vec4(c, 0);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#version 450 core
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
|
||||
out vec2 vTexPos;
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
#version 450 core
|
||||
layout (points) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out float lum;
|
||||
out vec2 dField;
|
||||
void main()
|
||||
{
|
||||
lum = gl_in[0].gl_Position.w;
|
||||
vec4 cenPos = vec4( gl_in[0].gl_Position.xy, 0.1 , 1);
|
||||
float gRad = gl_in[0].gl_Position.z;
|
||||
|
||||
dField = vec2 ( 1, 1);
|
||||
gl_Position = theMat * vec4 (cenPos.x + gRad, cenPos.y + gRad, 0.1 , 1);
|
||||
EmitVertex();
|
||||
dField = vec2 (-1, 1);
|
||||
gl_Position = theMat * vec4 (cenPos.x - gRad, cenPos.y + gRad, 0.1 , 1);
|
||||
EmitVertex();
|
||||
dField = vec2 ( 1,-1);
|
||||
gl_Position = theMat * vec4 (cenPos.x + gRad, cenPos.y - gRad, 0.1 , 1);
|
||||
EmitVertex();
|
||||
dField = vec2 (-1,-1);
|
||||
gl_Position = theMat * vec4 (cenPos.x - gRad, cenPos.y - gRad, 0.1 , 1);
|
||||
EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
#version 450 core
|
||||
layout(lines_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 4) out;
|
||||
layout(std140, binding = 0) uniform TheMat { mat4 theMat; };
|
||||
layout(location=0) uniform vec3 lightPos;
|
||||
layout(location=1) uniform float radiusUniform;
|
||||
// vec4 shift (vec4 p) { return (vec4 (p.xyz +
|
||||
// (lumRad.a*normalize(p.xyz-lightPos)), 1));}
|
||||
float closestPointOnLineParam3 (vec3 a, vec3 b, vec3 p) {
|
||||
return dot(p - a,b-a) / dot(b-a,b-a);
|
||||
}
|
||||
vec3 closestPointOnSeg3 (vec3 a,vec3 b, vec3 p) {
|
||||
float x = closestPointOnLineParam3(a,b,p);
|
||||
if (x < 0) {
|
||||
return a;
|
||||
} else{ if (x > 1) { return b; }
|
||||
{ return a + (x * (b- a));}
|
||||
}
|
||||
}
|
||||
//vec3 closepoint =
|
||||
vec4 shift(vec4 p) { return (vec4(p.xyz + (100000 * (p.xyz - lightPos)), 1)); }
|
||||
vec4 shiftBy(float x, vec4 p) {
|
||||
return (vec4(lightPos + (x * normalize(p.xyz - lightPos)), 1));
|
||||
}
|
||||
// vec4 shift (vec4 p) { return (vec4 (lightPos +
|
||||
// (lumRad.a*normalize(p.xyz-lightPos)), 1));}
|
||||
// copied from lighting/cap.geom, should not be changed on its own
|
||||
vec4 projNear(vec4 pos) {
|
||||
// note we project to a specific height
|
||||
// this is quite brittle, not ideal
|
||||
vec3 dir = pos.xyz - lightPos;
|
||||
float a = (100 - pos.z) / dir.z;
|
||||
vec2 xy = (pos.xyz + a * dir).xy;
|
||||
return vec4(xy, 100, 1);
|
||||
}
|
||||
vec4 shiftNear(vec4 pos)
|
||||
//{ vec4 sp = shiftBy(radiusUniform,pos);
|
||||
{
|
||||
vec4 sp = shift(pos);
|
||||
if (sp.z > 100) {
|
||||
return projNear(pos);
|
||||
} else {
|
||||
return sp;
|
||||
}
|
||||
}
|
||||
vec4 f(vec4 p) { return (theMat * p); }
|
||||
void main() {
|
||||
vec4 p0 = gl_in[0].gl_Position;
|
||||
vec4 p1 = gl_in[1].gl_Position;
|
||||
vec3 closepoint = closestPointOnSeg3(p0.xyz,p1.xyz,lightPos);
|
||||
float ru2 = radiusUniform * radiusUniform;
|
||||
vec4 mid = 0.5 * (p0 + p1);
|
||||
vec3 n0a = gl_in[2].gl_Position.xyz;
|
||||
vec3 n1a = gl_in[3].gl_Position.xyz;
|
||||
vec3 n0 = cross(p1.xyz - p0.xyz, n0a - p0.xyz);
|
||||
vec3 n1 = cross(p0.xyz - p1.xyz, n1a - p1.xyz);
|
||||
|
||||
// vec3 n2 = n0 + n1; // assumes the summands are normalized
|
||||
vec3 lightDir = p0.xyz - lightPos.xyz;
|
||||
vec3 lightDir2 = p1.xyz - lightPos.xyz;
|
||||
// first test if the edge is part of the silhouette
|
||||
// that is, if the normals of the faces connected by the edge point are in
|
||||
// "different directions" wrt the light direction
|
||||
if (dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
(dot(lightDir, lightDir) < ru2 || dot(lightDir2, lightDir2) < ru2))
|
||||
// using <= rather than < seems to get rid of overlapping shadow
|
||||
// artefacts
|
||||
{
|
||||
//vec4 p2 = shiftNear(p0);
|
||||
//vec4 p3 = shiftNear(p1);
|
||||
vec4 p2 = shiftNear(p0);
|
||||
vec4 p3 = shiftNear(p1);
|
||||
gl_Position = f(p0);
|
||||
EmitVertex();
|
||||
if (dot(n0, lightDir) > 0) {
|
||||
gl_Position = f(p2);
|
||||
EmitVertex();
|
||||
gl_Position = f(p1);
|
||||
EmitVertex();
|
||||
} else {
|
||||
gl_Position = f(p1);
|
||||
EmitVertex();
|
||||
gl_Position = f(p2);
|
||||
EmitVertex();
|
||||
}
|
||||
gl_Position = f(p3);
|
||||
EmitVertex();
|
||||
EndPrimitive();
|
||||
} else {
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,83 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
struct PosColNorm { vec4 pos; vec4 dummy; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 colrad; };
|
||||
layout (std430, binding = 3) readonly buffer Data { PosColNorm data[]; };
|
||||
layout (std430, binding = 5) readonly buffer Indices { uint indices[]; };
|
||||
float closestPointOnLineParam3 (vec3 a, vec3 b, vec3 p) {
|
||||
return dot(p - a,b-a) / dot(b-a,b-a);
|
||||
}
|
||||
vec3 closestPointOnSeg3 (vec3 a,vec3 b, vec3 p) {
|
||||
float x = closestPointOnLineParam3(a,b,p);
|
||||
return (x < 0
|
||||
? a
|
||||
: (x > 1
|
||||
? b
|
||||
: a + (x * (b- a)))) ;
|
||||
}
|
||||
vec4 shift(vec4 p) { return (vec4(p.xyz + (10000 * (p.xyz - lightPos.xyz)), 1)); }
|
||||
vec4 shiftBy(float x, vec4 p) {
|
||||
return (vec4(lightPos.xyz + (x * normalize(p.xyz - lightPos.xyz)), 1));
|
||||
}
|
||||
vec4 projNear (vec4 pos)
|
||||
{
|
||||
// note we project to a specific height
|
||||
// this is quite brittle, not ideal
|
||||
vec3 dir = pos.xyz - lightPos.xyz ;
|
||||
float a = (100 - pos.z) / dir.z ;
|
||||
vec2 xy = (pos.xyz + a * dir).xy ;
|
||||
return vec4 ( xy, 100 , 1) ;
|
||||
}
|
||||
vec4 shiftNear(vec4 pos)
|
||||
{
|
||||
vec4 sp = shift(pos);
|
||||
return (sp.z > 100 ? projNear(pos) : sp);
|
||||
}
|
||||
// Output 6 vertices for 4 data inputs
|
||||
const int ks[6] = // Inputdata: n1a Shadow:
|
||||
{0,1,2 // 2--3 / p2--p3
|
||||
,2,1,3 // | | p0---p1 / |
|
||||
}; // 0--1 / / |
|
||||
// n0a p0----p1
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(pos,1);
|
||||
int k = ks[gl_VertexID % 6];
|
||||
int i0 = 4*(gl_VertexID / 6);
|
||||
vec4 p0 = data[indices[i0]].pos;
|
||||
vec4 p1 = data[indices[i0+1]].pos;
|
||||
vec3 n0a = data[indices[i0+2]].pos.xyz;
|
||||
vec3 n1a = data[indices[i0+3]].pos.xyz;
|
||||
vec3 closepoint = closestPointOnSeg3(p0.xyz,p1.xyz,lightPos.xyz);
|
||||
float ru2 = colrad.w * colrad.w;
|
||||
vec4 mid = 0.5 * (p0 + p1);
|
||||
vec3 n0 = cross(p1.xyz - p0.xyz, n0a - p0.xyz);
|
||||
vec3 n1 = cross(p0.xyz - p1.xyz, n1a - p1.xyz);
|
||||
vec3 lightDir = p0.xyz - lightPos.xyz;
|
||||
vec3 lightDir2 = p1.xyz - lightPos.xyz;
|
||||
// test if the edge is part of the silhouette
|
||||
// that is, if the normals of the faces connected to the edge are in
|
||||
// "different directions" wrt the light direction
|
||||
// (first test the "drawbit")
|
||||
//if (p0.w==1 && dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
if ( dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
(dot(lightDir, lightDir) < ru2 || dot(lightDir2, lightDir2) < ru2))
|
||||
// using <= rather than < seems to get rid of overlapping shadow
|
||||
// artefacts
|
||||
{
|
||||
vec4 p2 = shiftNear(p0);
|
||||
vec4 p3 = shiftNear(p1);
|
||||
if (dot(n0, lightDir) < 0)
|
||||
{
|
||||
vec4 sp[4] = {p1,p0,p3,p2};
|
||||
gl_Position = theMat * sp[k];}
|
||||
else {
|
||||
vec4 ps[4] = {p0,p1,p2,p3};
|
||||
gl_Position = theMat * ps[k]; }
|
||||
}
|
||||
else {gl_Position = vec4(1,1,1,0);}
|
||||
}
|
||||
//layout (location = 0) in vec3 pos;
|
||||
//void main()
|
||||
//{
|
||||
// gl_Position = vec4(pos,1);
|
||||
//}
|
||||
|
||||
@@ -1,34 +1,35 @@
|
||||
#version 450 core
|
||||
layout(location=0)uniform vec3 lightPos;
|
||||
layout(location=1)uniform vec4 lumRad;
|
||||
layout (binding = 0) uniform sampler2D screenTexture;
|
||||
layout(early_fragment_tests) in;
|
||||
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 lumRad; };
|
||||
layout (binding = 0) uniform sampler2D posTexture;
|
||||
layout (binding = 1) uniform sampler2D normals;
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
float rad = lumRad.a;
|
||||
void main() {
|
||||
vec3 pos = texture(screenTexture, vTexPos).xyz;
|
||||
vec3 distVec = pos - lightPos;
|
||||
vec3 pos = texture(posTexture, vTexPos).xyz;
|
||||
vec3 distVec = pos - lightPos.xyz;
|
||||
float dist = dot(distVec, distVec);
|
||||
if (dist > rad) {
|
||||
discard;
|
||||
}
|
||||
vec4 normbit = texture(normals, vTexPos);
|
||||
vec3 norm = normbit.xyz;
|
||||
// float dist = dot(distVec.xy, distVec.xy);
|
||||
// if (dist > rad) {
|
||||
// discard;
|
||||
// }
|
||||
float t = texture(normals, vTexPos).w;
|
||||
vec3 norm = texture(normals, vTexPos).xyz;
|
||||
float y1 = dot(normalize(norm), normalize(distVec));
|
||||
float y2 = float(y1 > 0 ? 1 : 0);
|
||||
//float y3 = clamp(0.5 * (y1 + 1),0,1) ;
|
||||
float y3 = clamp(2*y1 + 1,0,1) ;
|
||||
//float y3 = clamp(0.5 * (y1 + 2),0,1) ;
|
||||
//float y = float(normbit.w == 0 ? y3 : y2);
|
||||
float y = y2;
|
||||
//float x = 1 - dist / rad;
|
||||
float x = 1 - (pow(dist / rad,4));
|
||||
//float x = 1 ;
|
||||
//float y2x = y2;
|
||||
float y4 = float(y1 > 0 && y1 < 0.5 ? 0.5 : y2);
|
||||
float y5 = max(0,y1);
|
||||
//float y4 = smoothstep(-1,1,y1);
|
||||
//float y4 = 0.25*pow(y1+1,2);
|
||||
float y3 = float(t > 0
|
||||
? y2
|
||||
: (t == 0 ? y4 : y4));
|
||||
//float x = 1 - (dist / rad);
|
||||
//float x = 1;
|
||||
//float x = 1 - max(0, ((dist + 10000) - rad) * 0.0001) ;
|
||||
//vec3 c = y* (x * x * x) * lumRad.rgb;
|
||||
vec3 c = y* x * lumRad.rgb;
|
||||
//vec3 c = x * lumRad.rgb;
|
||||
//float x = (dist > rad ? 0 : 1);
|
||||
float x = 1 - (pow(dist / rad,4));
|
||||
vec3 c = y3* x * lumRad.rgb;
|
||||
fColor = vec4(c, 0);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec2 pos;
|
||||
layout (location = 1) in vec2 texPos;
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
|
||||
out vec2 vTexPos;
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(pos,0,1);
|
||||
vTexPos = texPos;
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw;
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#version 450 core
|
||||
layout(points) in;
|
||||
layout(triangle_strip, max_vertices = 18) out;
|
||||
layout(std140, binding = 0) uniform TheMat { mat4 theMat; };
|
||||
layout(location=0) uniform vec3 lightPos;
|
||||
layout(location=1) uniform float rad;
|
||||
float rad2 = rad;
|
||||
// Preprocessed to include ../functions.glsl
|
||||
float closestPointOnLineParam (vec2 a, vec2 b, vec2 p) {
|
||||
return dot(p - a,b-a) / dot(b-a,b-a);
|
||||
}
|
||||
vec2 closestPointOnSeg (vec2 a,vec2 b, vec2 p) {
|
||||
float x = closestPointOnLineParam(a,b,p);
|
||||
if (x < 0) {
|
||||
return a;
|
||||
} else{ if (x > 1) { return b; }
|
||||
{ return a + (x * (b- a));}
|
||||
}
|
||||
}
|
||||
// End include 2023-03-13 15:33:44.438312149 UTC
|
||||
vec2 shift(vec2 p) {
|
||||
return vec2(lightPos.xy + (rad2 * normalize(p - lightPos.xy)));
|
||||
}
|
||||
float isLHS(vec2 startV, vec2 testV) {
|
||||
return sign(-startV.x * testV.y + startV.y * testV.x);
|
||||
}
|
||||
// construct a box with openings on bottom face and face away from wall
|
||||
void main() {
|
||||
vec2 p1 = gl_in[0].gl_Position.xy;
|
||||
vec2 p2 = gl_in[0].gl_Position.zw;
|
||||
vec2 closepoint = closestPointOnSeg(p1,p2,lightPos.xy);
|
||||
if (isLHS(p1 - lightPos.xy, p2 - lightPos.xy) < 0 && distance(closepoint,lightPos.xy) < rad2) {
|
||||
vec2 closeshift = (rad2 * normalize(closepoint - lightPos.xy)) + lightPos.xy - closepoint;
|
||||
vec2 p1cs = p1 + closeshift;
|
||||
vec2 p1o = vec2( distance(p1,lightPos.xy) > rad2 ? p1cs : shift(p1) );
|
||||
vec2 p2cs = p2 + closeshift;
|
||||
vec2 p2o = vec2( distance(p2,lightPos.xy) > rad2 ? p2cs : shift(p2) );
|
||||
|
||||
gl_Position = theMat * vec4(p1o,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1o,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1cs,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2cs,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2o,100,1); EmitVertex();
|
||||
EndPrimitive();
|
||||
|
||||
// gl_Position = theMat * vec4(p2o,100,1); EmitVertex();
|
||||
// gl_Position = theMat * vec4(p2,100,1); EmitVertex();
|
||||
// gl_Position = theMat * vec4(p2o,0,1); EmitVertex();
|
||||
// gl_Position = theMat * vec4(p2,0,1); EmitVertex();
|
||||
|
||||
gl_Position = theMat * vec4(p2,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2o,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2o,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2cs,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p2cs,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1cs,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1cs,-500,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1o,100,1); EmitVertex();
|
||||
gl_Position = theMat * vec4(p1o,-500,1); EmitVertex();
|
||||
|
||||
EndPrimitive();
|
||||
} else {
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,34 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 poss;
|
||||
void main()
|
||||
{
|
||||
gl_Position = poss;
|
||||
struct PosTex { vec4 pospos; vec4 texang; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 colrad; };
|
||||
layout (std430, binding = 2) readonly buffer Pos { PosTex data[]; };
|
||||
float rad = colrad.w;
|
||||
int indices[18] =
|
||||
{5,7,1 // 6----7
|
||||
,7,3,1 // /| /|
|
||||
,7,6,3 // 2-+--3 |
|
||||
,6,2,3 // | 4 | 5
|
||||
,6,4,2 // 0 1
|
||||
,4,0,2
|
||||
};
|
||||
vec2 shift(vec2 p) {
|
||||
return vec2(lightPos.xy + (rad * normalize(p - lightPos.xy)));
|
||||
}
|
||||
float detV(vec2 p, vec2 q) {
|
||||
return p.x*q.y - p.y*q.x;
|
||||
}
|
||||
float isLHS(vec2 p, vec2 q) {
|
||||
return sign(-detV(p,q));
|
||||
}
|
||||
void main() {
|
||||
vec4 pp = data[gl_VertexID / 18].pospos;
|
||||
int j = indices[gl_VertexID % 18];
|
||||
vec2 xy = (j % 2 > 0 ? pp.xy : pp.zw);
|
||||
float z = ((j / 2) % 2 > 0.5 ? 100 : -500);
|
||||
vec2 xyo = ( j > 3.5 ? shift(xy) : xy);
|
||||
vec4 p = theMat * vec4(xyo,z,1);
|
||||
gl_Position = (isLHS(pp.xy-lightPos.xy,pp.zw-lightPos.xy) < 0
|
||||
? p
|
||||
: vec4(1,1,1,0));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 450 core
|
||||
struct PosColBox { vec4 pos; vec4 col; vec4 box; };
|
||||
layout (std430, binding = 12) readonly buffer Data { PosColBox data[]; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (location = 0) uniform int layoff;
|
||||
out vec4 vCol;
|
||||
out vec3 vPos;
|
||||
out vec3 vparams;
|
||||
void main() {
|
||||
vec4 p = data[gl_VertexID].pos;
|
||||
gl_Position = theMat * p;
|
||||
vCol = data[gl_VertexID].col;
|
||||
vparams = data[gl_VertexID].box.xyz;
|
||||
vPos = p.xyz;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 450 core
|
||||
struct PosCol { vec4 pos; vec4 col; };
|
||||
layout (std430, binding = 10) readonly buffer Data { PosCol data[]; };
|
||||
layout (location = 0) uniform int layoff;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
out vec3 vPos;
|
||||
void main() {
|
||||
vec4 p = data[gl_VertexID].pos;
|
||||
gl_Position = theMat * p;
|
||||
vCol = data[gl_VertexID].col;
|
||||
vPos = p.xyz;
|
||||
}
|
||||
@@ -4,6 +4,4 @@ layout (binding=50) uniform sampler2DArray thetexture;
|
||||
in vec4 vColor;
|
||||
in vec3 vTexCoord;
|
||||
void main()
|
||||
{
|
||||
fColor = texture(thetexture, vec3 (vTexCoord.xyz)) * vColor;
|
||||
}
|
||||
{ fColor = texture(thetexture, vec3 (vTexCoord.xyz)) * vColor; }
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec4 inColor;
|
||||
layout (location = 2) in vec4 inTexCoord;
|
||||
struct PosColTcoord { vec4 pos; vec4 col; vec4 tcoord; };
|
||||
layout (std430, binding = 11) readonly buffer Data { PosColTcoord data[]; };
|
||||
layout (location = 0) uniform int layoff;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vColor;
|
||||
out vec3 vTexCoord;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(inPos.xyz, 1.0);
|
||||
vColor = inColor;
|
||||
vTexCoord = inTexCoord.xyz;
|
||||
vec4 p = data[gl_VertexID].pos;
|
||||
gl_Position = theMat * p;
|
||||
vColor = data[gl_VertexID].col;
|
||||
vTexCoord = data[gl_VertexID].tcoord.xyz;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#version 450 core
|
||||
struct PosCol { vec4 posx; vec4 colx; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 13) readonly buffer Data { PosCol data[]; };
|
||||
layout (location = 0) uniform int n;
|
||||
out vec4 gColC; // center color
|
||||
out vec4 gColE; // edge color
|
||||
out vec2 gBoundingBox;
|
||||
out vec3 gPos;
|
||||
const int ks[6] = //
|
||||
{1,0,2 // 2--3
|
||||
,2,0,3 // | |
|
||||
}; // 1--0
|
||||
//
|
||||
const vec2 bs[4] =
|
||||
{ vec2( 1, 1)
|
||||
, vec2(-1, 1)
|
||||
, vec2(-1,-1)
|
||||
, vec2( 1,-1)
|
||||
} ;
|
||||
void main()
|
||||
{
|
||||
int i0 = n + (3 * ((gl_VertexID-n)/6) );
|
||||
gColC = data[i0].colx;
|
||||
gColE = data[i0+1].colx;
|
||||
int k = ks[(gl_VertexID - n) % 6];
|
||||
gBoundingBox = bs[k];
|
||||
gPos = (k > 2.5
|
||||
? data[i0].posx + data[i0+2].posx - data[i0+1].posx
|
||||
: data[i0+k].posx
|
||||
).xyz;
|
||||
gl_Position = theMat * vec4(gPos,1);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#version 450 core
|
||||
in vec3 vPos;
|
||||
in vec4 vCol;
|
||||
in vec2 vControls;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=2) out vec4 fNorm;
|
||||
void main()
|
||||
{
|
||||
float d = dot(vControls,vControls);
|
||||
if (d > 1) {discard;}
|
||||
// the following is an alternative without using discard
|
||||
// not sure how this would interact with bloom
|
||||
//float d = min(dot(vControls,vControls),1);
|
||||
float a = vCol.w*(1-d);
|
||||
fCol = vec4(vCol.xyz,a);
|
||||
fPos = vec4(vPos, a);
|
||||
//fNorm = vec4(-vControls, -0.1 + 0.2 * d ,fCol.w);
|
||||
fNorm = vec4(-vControls, -0.1 + 0.3 * d ,a);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#version 450 core
|
||||
struct CloudPosCol { vec3 pos; uint col; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 6) readonly buffer CPos { CloudPosCol data[]; };
|
||||
const vec2 indices[6] =
|
||||
{vec2(-1,-1) // 0 2--3
|
||||
,vec2( 1,-1) // 1 | |
|
||||
,vec2( 1, 1) // 3 0--1
|
||||
,vec2(-1,-1) // 0
|
||||
,vec2(-1, 1) // 2
|
||||
,vec2( 1, 1) // 3
|
||||
};
|
||||
out vec4 vCol;
|
||||
out vec2 vControls;
|
||||
out vec3 vPos;
|
||||
void main()
|
||||
{
|
||||
uint i = gl_VertexID / 6;
|
||||
uint k = gl_VertexID % 6;
|
||||
vCol = unpackUnorm4x8(data[i].col);
|
||||
vControls = indices[k];
|
||||
vPos = vec3(data[i].pos.xy + 20*vControls, data[i].pos.z);
|
||||
gl_Position = theMat * vec4(vPos,1);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 450 core
|
||||
struct Verx { vec4 pos; vec4 col; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 6) readonly buffer Pos { Verx data[]; };
|
||||
int indices[6] = {0,1,3,0,3,2};
|
||||
out vec4 vColC;
|
||||
out vec4 vColE;
|
||||
out vec4 vPos;
|
||||
out vec2 vDist;
|
||||
void main()
|
||||
{
|
||||
uint i0 = gl_VertexID / 6;
|
||||
uint k = indices[gl_VertexID % 6];
|
||||
vec4 br =
|
||||
//gl_Position = theMat * vec4(pos,1);
|
||||
gl_Position = vec4(pos,1);
|
||||
vCol = col;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#version 450 core
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec3 fPos;
|
||||
layout (location=2) out vec4 fNorm;
|
||||
in vec3 vTexCoords;
|
||||
in vec4 vPos;
|
||||
in float vAng;
|
||||
layout (binding=40) uniform sampler2DArray diffuseSampler;
|
||||
layout (binding=41) uniform sampler2DArray normalSampler;
|
||||
vec2 rotateV2 (float a, vec2 v)
|
||||
{ return vec2(v.x*cos(a) - v.y*sin(a), v.x*sin(a) + v.y*cos(a)); }
|
||||
void main()
|
||||
{
|
||||
fCol = texture(diffuseSampler,vTexCoords);
|
||||
fPos = vPos.xyz;
|
||||
vec4 basenorm = texture(normalSampler,vTexCoords) - 0.5;
|
||||
vec2 n1 = rotateV2(vAng,vec2(basenorm.x,basenorm.z));
|
||||
fNorm = vec4(-vec3(n1,basenorm.y),0);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#version 450 core
|
||||
struct PosTex { vec4 pospos; vec4 texang; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 2) readonly buffer Pos { PosTex data[]; };
|
||||
out float vAng;
|
||||
out vec4 vPos;
|
||||
out vec3 vTexCoords;
|
||||
int indices[6] = {0,1,3,0,3,2};
|
||||
void main()
|
||||
{
|
||||
vec4 texang = data[gl_VertexID / 6].texang;
|
||||
vec4 pp = data[gl_VertexID / 6].pospos;
|
||||
int j = indices[gl_VertexID % 6];
|
||||
float z = (j > 1.5 ? 100 : 0);
|
||||
vec2 xy = (j % 2 > 0 ? pp.xy : pp.zw);
|
||||
vPos = vec4( xy, z, 1);
|
||||
gl_Position = theMat * vPos;
|
||||
vAng = texang.y;
|
||||
float d = distance(pp.xy,pp.zw) / 50;
|
||||
int jj = j / 2;
|
||||
vTexCoords = vec3(d * (j % 2), 2 * jj , texang.x);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 450 core
|
||||
layout (location=0) out vec4 fColOverCloud;
|
||||
layout (location=1) out vec4 fColUnderCloud;
|
||||
layout(binding = 3) uniform sampler2D cloudpos;
|
||||
in vec4 vCol;
|
||||
in vec4 vPos;
|
||||
in vec2 vScreenPos;
|
||||
void main()
|
||||
{
|
||||
float cloudz = texture(cloudpos, vScreenPos).z;
|
||||
fColOverCloud = ( cloudz > vPos.z ? vec4(0) : vCol);
|
||||
fColUnderCloud = ( cloudz > vPos.z ? vCol : vec4(0));
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#version 450 core
|
||||
struct PosCol { vec4 pospos; vec4 col; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 1) readonly buffer Pos { PosCol data[]; };
|
||||
out vec4 vCol;
|
||||
out vec4 vPos;
|
||||
out vec2 vScreenPos;
|
||||
int indices[6] =
|
||||
{0,3,1
|
||||
,0,2,3};
|
||||
// note reversed compared to walls
|
||||
void main()
|
||||
{
|
||||
vCol = data[gl_VertexID / 12].col;
|
||||
vec4 pp = data[gl_VertexID / 12].pospos;
|
||||
int j = indices[gl_VertexID % 6];
|
||||
bool t = gl_VertexID % 12 > 5.5;
|
||||
float z = (j > 1.5
|
||||
? (t ? 100 : 5000)
|
||||
: (t ? 0 : 100)
|
||||
);
|
||||
// we draw two quads: one which can be below clouds,
|
||||
// and one which is always above
|
||||
vec2 xy = (j % 2 > 0 ? pp.xy : pp.zw);
|
||||
vPos = vec4( xy, z, 1);
|
||||
gl_Position = theMat * vPos;
|
||||
vScreenPos = 0.5 * (vec2(1) + vec2(gl_Position.x / gl_Position.w
|
||||
,gl_Position.y / gl_Position.w));
|
||||
}
|
||||
@@ -3,11 +3,12 @@ in vec4 vCol;
|
||||
in vec4 vPos;
|
||||
in vec4 vNorm;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=1) out vec3 fPos;
|
||||
layout (location=2) out vec4 fNorm;
|
||||
void main()
|
||||
{
|
||||
fCol = vCol;
|
||||
fPos = vPos;
|
||||
fNorm = vec4(vNorm.xyz - vPos.xyz,1);
|
||||
fPos = vPos.xyz;
|
||||
//fNorm = vec4(vNorm.xyz,1);
|
||||
fNorm = vNorm;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec4 pos;
|
||||
layout (location = 1) in vec4 col;
|
||||
layout (location = 2) in vec4 norm;
|
||||
struct PosColNorm { vec4 pos; uint norm; uint col; };
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
layout (std430, binding = 3) readonly buffer Data { PosColNorm data[]; };
|
||||
layout (std430, binding = 4) readonly buffer Indices { uint indices[]; };
|
||||
out vec4 vCol;
|
||||
out vec4 vPos;
|
||||
out vec4 vNorm;
|
||||
void main() {
|
||||
gl_Position = theMat * vec4(pos.xyz,1);
|
||||
vCol = col;
|
||||
vPos = pos;
|
||||
vNorm = norm;
|
||||
vPos = data[indices[gl_VertexID]].pos;
|
||||
vCol = unpackUnorm4x8(data[indices[gl_VertexID]].col);
|
||||
vNorm = unpackSnorm4x8(data[indices[gl_VertexID]].norm);
|
||||
gl_Position = theMat * vec4(vPos.xyz,1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
#version 450 core
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
layout (location = 0) uniform vec2 screensize;
|
||||
layout(binding = 0) uniform sampler2D screenTexture;
|
||||
vec3 f (float x, float y)
|
||||
//{ return texture(screenTexture, vTexPos + vec2((x+0.5)/screensize.x,(y+0.5)/screensize.y)).xyz;
|
||||
{ return texture(screenTexture, vTexPos + vec2(x/screensize.x,y/screensize.y)).xyz;
|
||||
}
|
||||
bool t (vec3 x, vec3 y)
|
||||
{ return dot(x-y,x-y) < 0.005;
|
||||
}
|
||||
bool t3 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,y) && t(y,z);
|
||||
}
|
||||
vec3 c = f(0,0);
|
||||
bool bt (vec3 x, vec3 y)
|
||||
{ return x.x+x.y+x.z > y.x+y.y+y.z;}
|
||||
bool t4 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,z) && (t(x,y) || bt(x,c)) ; }
|
||||
bool incenter (int x) { return x > 0 && x < 3; }
|
||||
int three = int(( floor(vTexPos.y * screensize.y))) % 3;
|
||||
int i = int(( floor(vTexPos.x * screensize.x))) % 4;
|
||||
int j = int(( floor(vTexPos.y * screensize.y))) % 4;
|
||||
vec4 edgecase (vec3 e1, vec3 e2)
|
||||
{ return vec4((t(e1,e2) && bt(e1,c) ? e1 : c),1); }
|
||||
vec4 ttlcase (vec3 tt, vec3 tr, vec3 mr, vec3 br, vec3 bb, vec3 bl, vec3 ml, vec3 tl)
|
||||
{
|
||||
if (t(tl,tt) && t(tl,mr))
|
||||
{return vec4(tl,1);}
|
||||
if (t(tl,tt) && t(tl,ml))
|
||||
{return vec4(tt,1);}
|
||||
// if (t(tt,mr) && bt(tt,c))
|
||||
// {return vec4(tt,1);}
|
||||
return vec4(c,1);
|
||||
}
|
||||
vec4 corncase (vec3 e1, vec3 e2, vec3 corn)
|
||||
{ return vec4( (t(e1,e2) && false == (t(corn,c)) ? e1 : c) , 1);}
|
||||
//{ return vec4( (t(e1,e2) ? e1 : c) , 1);}
|
||||
void main()
|
||||
{
|
||||
vec3 tl = f(-4, 4);
|
||||
vec3 tt = f( 0, 4);
|
||||
vec3 tr = f( 4, 4);
|
||||
vec3 mr = f( 4, 0);
|
||||
vec3 br = f( 4,-4);
|
||||
vec3 bb = f( 0,-4);
|
||||
vec3 bl = f(-4,-4);
|
||||
vec3 ml = f(-4, 0);
|
||||
vec3 tlc = f(-1, 1);
|
||||
vec3 trc = f( 1, 1);
|
||||
vec3 brc = f( 1,-1);
|
||||
vec3 blc = f(-1,-1);
|
||||
// if (t4(tl,tr,br))
|
||||
// { fColor = vec4(tl,1);}
|
||||
// else if (t4(tr,br,bl))
|
||||
// { fColor = vec4(tr,1);}
|
||||
// else if (t4(br,bl,tl))
|
||||
// { fColor = vec4(br,1);}
|
||||
// else if (t4(bl,tl,tr))
|
||||
// { fColor = vec4(bl,1);}
|
||||
if (incenter(i) && incenter(j))
|
||||
{fColor = vec4(c,1); }
|
||||
else
|
||||
{ fColor = vec4(0,0,0,1);
|
||||
switch (i * 10 + j) {
|
||||
case 10:
|
||||
fColor = ttlcase(bb,br,mr,tr,tt,tl,ml,bl);
|
||||
break;
|
||||
case 01:
|
||||
fColor = ttlcase(ml,tl,tt,tr,mr,br,bb,bl);
|
||||
break;
|
||||
case 13:
|
||||
fColor = ttlcase(tt,tr,mr,br,bb,bl,ml,tl);
|
||||
break;
|
||||
case 02:
|
||||
fColor = ttlcase(ml,bl,bb,br,mr,tr,tt,tl);
|
||||
break;
|
||||
case 23:
|
||||
fColor = ttlcase(tt,tl,ml,bl,bb,br,mr,tr);
|
||||
break;
|
||||
case 32:
|
||||
fColor = ttlcase(mr,br,bb,bl,ml,tl,tt,tr);
|
||||
break;
|
||||
case 20:
|
||||
fColor = ttlcase(bb,bl,ml,tl,tt,tr,mr,br);
|
||||
break;
|
||||
case 31:
|
||||
fColor = ttlcase(mr,tr,tt,tl,ml,bl,bb,br);
|
||||
break;
|
||||
case 00:
|
||||
fColor = corncase(ml,bb,bl);
|
||||
break;
|
||||
case 03:
|
||||
fColor = corncase(ml,tt,tl);
|
||||
break;
|
||||
case 33:
|
||||
fColor = corncase(mr,tt,tr);
|
||||
break;
|
||||
case 30:
|
||||
fColor = corncase(mr,bb,br);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 450 core
|
||||
layout (std140, binding = 2) uniform PosTex { vec4 posTex[3]; };
|
||||
out vec2 vTexPos;
|
||||
void main() {
|
||||
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);
|
||||
vTexPos = posTex[gl_VertexID].zw ;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#version 450 core
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
layout (location = 0) uniform vec2 screensize;
|
||||
layout(binding = 0) uniform sampler2D screenTexture;
|
||||
vec3 f (float x, float y)
|
||||
//{ return texture(screenTexture, vTexPos + vec2((x+0.5)/screensize.x,(y+0.5)/screensize.y)).xyz;
|
||||
{ return texture(screenTexture, vTexPos + vec2(x/screensize.x,y/screensize.y)).xyz;
|
||||
}
|
||||
bool t (vec3 x, vec3 y)
|
||||
{ return dot(x-y,x-y) < 0.005;
|
||||
}
|
||||
bool t3 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,y) && t(y,z);
|
||||
}
|
||||
void main()
|
||||
{
|
||||
vec3 tl = f(-1, 1);
|
||||
vec3 tt = f( 0, 2);
|
||||
vec3 tr = f( 1, 1);
|
||||
vec3 mr = f( 2, 0);
|
||||
vec3 br = f( 1,-1);
|
||||
vec3 bb = f( 0,-2);
|
||||
vec3 bl = f(-1,-1);
|
||||
vec3 ml = f(-2, 0);
|
||||
if (t3(tl,tr,br))
|
||||
{ fColor = vec4(tr,1);}
|
||||
else if (t3(tr,br,bl))
|
||||
{ fColor = vec4(br,1);}
|
||||
else if (t3(br,bl,tl))
|
||||
{ fColor = vec4(bl,1);}
|
||||
else if (t3(bl,tl,tr))
|
||||
{ fColor = vec4(tl,1);}
|
||||
else
|
||||
//{fColor = texture(screenTexture, vTexPos); }
|
||||
{fColor = vec4(f(0,0),1); }
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#version 450 core
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
layout (location = 0) uniform vec2 screensize;
|
||||
layout(binding = 0) uniform sampler2D screenTexture;
|
||||
vec3 f (float x, float y)
|
||||
//{ return texture(screenTexture, vTexPos + vec2((x+0.5)/screensize.x,(y+0.5)/screensize.y)).xyz;
|
||||
{ return texture(screenTexture, vTexPos + vec2(x/screensize.x,y/screensize.y)).xyz;
|
||||
}
|
||||
bool t (vec3 x, vec3 y)
|
||||
{ return dot(x-y,x-y) < 0.005;
|
||||
}
|
||||
bool t3 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,y) && t(y,z);
|
||||
}
|
||||
vec3 c = f(0,0);
|
||||
bool bt (vec3 x, vec3 y)
|
||||
{ return x.x+x.y+x.z > y.x+y.y+y.z;}
|
||||
bool t4 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,z) && (t(x,y) || bt(x,c)) ;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
vec3 tl = f(-2, 2);
|
||||
vec3 tt = f( 0, 2);
|
||||
vec3 tr = f( 2, 2);
|
||||
vec3 mr = f( 2, 0);
|
||||
vec3 br = f( 2,-2);
|
||||
vec3 bb = f( 0,-2);
|
||||
vec3 bl = f(-2,-2);
|
||||
vec3 ml = f(-2, 0);
|
||||
vec3 tlc = f(-1, 1);
|
||||
vec3 trc = f( 1, 1);
|
||||
vec3 brc = f( 1,-1);
|
||||
vec3 blc = f(-1,-1);
|
||||
if (t4(tl,tr,br))
|
||||
{ fColor = vec4(tl,1);}
|
||||
else if (t4(tr,br,bl))
|
||||
{ fColor = vec4(tr,1);}
|
||||
else if (t4(br,bl,tl))
|
||||
{ fColor = vec4(br,1);}
|
||||
else if (t4(bl,tl,tr))
|
||||
{ fColor = vec4(bl,1);}
|
||||
else
|
||||
//{fColor = texture(screenTexture, vTexPos); }
|
||||
{fColor = vec4(c,1); }
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
#version 450 core
|
||||
in vec2 vTexPos;
|
||||
out vec4 fColor;
|
||||
layout (location = 0) uniform vec2 screensize;
|
||||
layout(binding = 0) uniform sampler2D screenTexture;
|
||||
vec3 f (float x, float y)
|
||||
//{ return texture(screenTexture, vTexPos + vec2((x+0.5)/screensize.x,(y+0.5)/screensize.y)).xyz;
|
||||
{ return texture(screenTexture, vTexPos + vec2(x/screensize.x,y/screensize.y)).xyz;
|
||||
}
|
||||
bool t (vec3 x, vec3 y)
|
||||
{ return dot(x-y,x-y) < 0.005;
|
||||
}
|
||||
bool t3 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,y) && t(y,z);
|
||||
}
|
||||
vec3 c = f(0,0);
|
||||
bool bt (vec3 x, vec3 y)
|
||||
{ return x.x+x.y+x.z > y.x+y.y+y.z;}
|
||||
bool t4 (vec3 x, vec3 y, vec3 z)
|
||||
{ return t(x,z) && (t(x,y) || bt(x,c)) ; }
|
||||
bool incenter (int x) { return x > 0 && x < 3; }
|
||||
int three = int(( floor(vTexPos.y * screensize.y))) % 3;
|
||||
int i = int(( floor(vTexPos.x * screensize.x))) % 4;
|
||||
int j = int(( floor(vTexPos.y * screensize.y))) % 4;
|
||||
vec4 edgecase (vec3 e1, vec3 e2)
|
||||
{ return vec4((t(e1,e2) && bt(e1,c) ? e1 : c),1); }
|
||||
vec4 ttlcase (vec3 tt, vec3 tr, vec3 mr, vec3 br, vec3 bb, vec3 bl, vec3 ml, vec3 tl)
|
||||
{
|
||||
if (t(tl,tt) && t(tl,mr))
|
||||
{return vec4(tl,1);}
|
||||
if (t(tl,tt) && t(tl,ml))
|
||||
{return vec4(tt,1);}
|
||||
// if (t(tt,mr) && bt(tt,c))
|
||||
// {return vec4(tt,1);}
|
||||
return vec4(c,1);
|
||||
}
|
||||
vec4 corncase (vec3 e1, vec3 e2, vec3 corn)
|
||||
{ return vec4( (t(e1,e2) && false == (t(corn,c)) ? e1 : c) , 1);}
|
||||
//{ return vec4( (t(e1,e2) ? e1 : c) , 1);}
|
||||
void main()
|
||||
{
|
||||
vec3 tl = f(-4, 4);
|
||||
vec3 tt = f( 0, 4);
|
||||
vec3 tr = f( 4, 4);
|
||||
vec3 mr = f( 4, 0);
|
||||
vec3 br = f( 4,-4);
|
||||
vec3 bb = f( 0,-4);
|
||||
vec3 bl = f(-4,-4);
|
||||
vec3 ml = f(-4, 0);
|
||||
vec3 tlc = f(-1, 1);
|
||||
vec3 trc = f( 1, 1);
|
||||
vec3 brc = f( 1,-1);
|
||||
vec3 blc = f(-1,-1);
|
||||
// if (t4(tl,tr,br))
|
||||
// { fColor = vec4(tl,1);}
|
||||
// else if (t4(tr,br,bl))
|
||||
// { fColor = vec4(tr,1);}
|
||||
// else if (t4(br,bl,tl))
|
||||
// { fColor = vec4(br,1);}
|
||||
// else if (t4(bl,tl,tr))
|
||||
// { fColor = vec4(bl,1);}
|
||||
if (incenter(i) && incenter(j))
|
||||
{fColor = vec4(c,1); }
|
||||
else
|
||||
{ fColor = vec4(0,0,0,1);
|
||||
switch (i * 10 + j) {
|
||||
case 10:
|
||||
fColor = ttlcase(bb,br,mr,tr,tt,tl,ml,bl);
|
||||
break;
|
||||
case 01:
|
||||
fColor = ttlcase(ml,tl,tt,tr,mr,br,bb,bl);
|
||||
break;
|
||||
case 13:
|
||||
fColor = ttlcase(tt,tr,mr,br,bb,bl,ml,tl);
|
||||
break;
|
||||
case 02:
|
||||
fColor = ttlcase(ml,bl,bb,br,mr,tr,tt,tl);
|
||||
break;
|
||||
case 23:
|
||||
fColor = ttlcase(tt,tl,ml,bl,bb,br,mr,tr);
|
||||
break;
|
||||
case 32:
|
||||
fColor = ttlcase(mr,br,bb,bl,ml,tl,tt,tr);
|
||||
break;
|
||||
case 20:
|
||||
fColor = ttlcase(bb,bl,ml,tl,tt,tr,mr,br);
|
||||
break;
|
||||
case 31:
|
||||
fColor = ttlcase(mr,tr,tt,tl,ml,bl,bb,br);
|
||||
break;
|
||||
case 00:
|
||||
fColor = corncase(ml,bb,bl);
|
||||
break;
|
||||
case 03:
|
||||
fColor = corncase(ml,tt,tl);
|
||||
break;
|
||||
case 33:
|
||||
fColor = corncase(mr,tt,tr);
|
||||
break;
|
||||
case 30:
|
||||
fColor = corncase(mr,bb,br);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#version 450 core
|
||||
in vec3 vTexPos;
|
||||
in vec3 vPos;
|
||||
layout (location=0) out vec4 fCol;
|
||||
layout (location=1) out vec4 fPos;
|
||||
layout (location=2) out vec4 normal;
|
||||
//layout (binding=0) uniform sampler2DArray tilesetSampler;
|
||||
layout (binding=1) uniform sampler2D normalSampler;
|
||||
void main()
|
||||
{
|
||||
//fCol = texture(tilesetSampler, vec3(0.3,0.1,0) + vTexPos);
|
||||
fCol = vec4(0.2,0.3,0.6,1);
|
||||
//fCol = vec4(0.6,0.4,0.3,1);
|
||||
fPos = vec4(vPos,1);
|
||||
normal = vec4(vPos + vec3(0.5) - texture(normalSampler,2*vTexPos.xy).xyz,0);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec3 texPos;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec3 vTexPos;
|
||||
out vec3 vPos;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(pos,1.0) ;
|
||||
vTexPos = texPos;
|
||||
vPos = pos;
|
||||
}
|
||||
@@ -1,18 +1,47 @@
|
||||
#version 450 core
|
||||
in vec2 texPos;
|
||||
in vec2 texDist;
|
||||
in float gfactor;
|
||||
in vec2 vcpos;
|
||||
const int n1 = 15;
|
||||
in vec2 distmask[n1];
|
||||
in vec2 pinchr[n1];
|
||||
in vec2 pinchg[n1];
|
||||
in vec2 pinchb[n1];
|
||||
out vec4 fColor;
|
||||
layout (binding = 1) uniform sampler2D screenTexture;
|
||||
float f ( float x) {
|
||||
if (x>1) {return 1;} else {return (1-gfactor)*x + gfactor;}
|
||||
layout (location = 0) uniform int n;
|
||||
vec3 toYUV (vec3 rgb)
|
||||
{ return rgb * mat3
|
||||
( 0.299 , 0.587 , 0.114
|
||||
,-0.14713,-0.28886, 0.436
|
||||
, 0.615 ,-0.51499,-0.10001
|
||||
) ;
|
||||
}
|
||||
vec3 toRGB (vec3 yuv)
|
||||
{ return yuv * mat3
|
||||
(1, 0 , 1.13983
|
||||
,1,-0.39465,-0.58060
|
||||
,1, 2.03211, 0
|
||||
) ;
|
||||
}
|
||||
void main()
|
||||
{
|
||||
float t = f(length(texDist));
|
||||
fColor = vec4(texture(screenTexture
|
||||
, 0.5+0.5 *( vcpos + t * (texPos - vcpos))
|
||||
)
|
||||
);
|
||||
vec2 tposr = texPos;
|
||||
vec2 tposb = texPos;
|
||||
vec2 tposg = texPos;
|
||||
for(int i = 0; i < n; ++i)
|
||||
{
|
||||
float x = 1 - min(1, sqrt(distance(distmask[i],vec2(0,0))));
|
||||
tposr += x * pinchr[i];
|
||||
tposg += x * pinchg[i];
|
||||
tposb += x * pinchb[i];
|
||||
}
|
||||
fColor.r = texture(screenTexture, tposr).r;
|
||||
fColor.g = texture(screenTexture, tposg).g;
|
||||
fColor.b = texture(screenTexture, tposb).b;
|
||||
}
|
||||
// fColor = vec4
|
||||
// ( toRGB(vec3( toYUV(texture(screenTexture, texPos).rgb).r
|
||||
// , toYUV(texture(screenTexture, (texPos + x*pinch)).rgb).g
|
||||
// , toYUV(texture(screenTexture, (texPos + x*(pinch))).rgb).b
|
||||
// ) )
|
||||
// , 1
|
||||
// ) ;
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#version 450 core
|
||||
layout (points) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
in vec2 vRad1[];
|
||||
in vec2 vRad2[];
|
||||
in vec2 vCen[];
|
||||
in float vFactor[];
|
||||
out vec2 vcpos;
|
||||
out vec2 texPos;
|
||||
out vec2 texDist;
|
||||
out float gfactor;
|
||||
vec2 g(float x,float y, vec2 v, vec2 r1, vec2 r2)
|
||||
{ return vec2
|
||||
(dot(normalize(r1-v),vec2(x,y)-v) / length(r1-v)
|
||||
,dot(normalize(r2-v),vec2(x,y)-v) / length(r2-v)
|
||||
);
|
||||
}
|
||||
void main() {
|
||||
vec2 cpos = vCen[0];
|
||||
vcpos = cpos;
|
||||
vec2 grad1 = vRad1[0];
|
||||
vec2 grad2 = vRad2[0];
|
||||
gfactor = vFactor[0];
|
||||
texPos = vec2(1,1);
|
||||
texDist = g(1,1,cpos,grad1,grad2);
|
||||
gl_Position = vec4 (1,1,0,1);
|
||||
EmitVertex();
|
||||
texPos = vec2(1,0);
|
||||
texPos = vec2(1,-1);
|
||||
texDist = g(1,-1,cpos,grad1,grad2);
|
||||
gl_Position = vec4 (1,-1,0,1);
|
||||
EmitVertex();
|
||||
texPos = vec2(0,1);
|
||||
texPos = vec2(-1,1);
|
||||
texDist = g(-1,1,cpos,grad1,grad2);
|
||||
gl_Position = vec4 (-1,1,0,1);
|
||||
EmitVertex();
|
||||
texPos = vec2(0,0);
|
||||
texPos = vec2(-1,-1);
|
||||
texDist = g(-1,-1,cpos,grad1,grad2);
|
||||
gl_Position = vec4 (-1,-1,0,1);
|
||||
EmitVertex();
|
||||
EndPrimitive();
|
||||
}
|
||||