Replace explicit matrix uniforms with single ubo

This commit is contained in:
2021-06-24 17:58:15 +02:00
parent 7ab932db93
commit 97598bc171
26 changed files with 39 additions and 174 deletions
-20
View File
@@ -195,26 +195,6 @@ renderBackground pdata rot camZoom (tranx,trany) (winx,winy) = do
textureBinding Texture2D $= _textureObject <$> _shaderTexture (_backgroundShader pdata)
drawArrays Points 0 1
setPerpMatrixUniforms
:: RenderData
-> Float -- ^ Rotation
-> Float -- ^ Zoom
-> (Float,Float) -- ^ Translation
-> (Float,Float) -- ^ Window size
-> (Float,Float) -- ^ ViewFrom
-> IO ()
setPerpMatrixUniforms pdata rot czoom trans wins vfs = mapM_ (setPerpMatUniform rot czoom trans wins vfs)
( _lightingFloorShader pdata
: _lightingWallShader pdata
: _lightingOccludeShader pdata
: _backgroundShader pdata
: _textureShader pdata
: _textureArrayShader pdata
: _wallBlankShader pdata
: _wallTextureShader pdata
: _pictureShaders pdata
)
renderShader
:: Foldable f
=> FullShader