This commit is contained in:
2025-11-20 12:45:45 +00:00
parent 0491a71da1
commit 1f1fa36b72
3 changed files with 4 additions and 16 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ data RenderData = RenderData
, _windowPullShader :: GLuint
, _pullWallShader :: GLuint
, _fullscreenShader :: GLuint
, _transparencyCompShader :: GLuint
-- , _transparencyCompShader :: GLuint
, _bloomBlurShader :: GLuint
, _barrelShader :: (GLuint,VBO)
, _shapeShader :: GLuint
+1 -13
View File
@@ -340,17 +340,6 @@ doDrawing' win pdata u = do
glBindTextureUnit 0 (pdata ^. fboWindow . _2 . _1 . unTO)
glDrawArrays GL_TRIANGLES 0 6
-- -- --draw windows onto base buffer
-- glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
-- glBindTextureUnit 0 (pdata ^. fboWindow . _2 . _1 . unTO)
-- glBindTextureUnit 1 (pdata ^. fboWindow . _2 . _2 . unTO)
-- glBindTextureUnit 2 (pdata ^. fboCloud . _2 . _1 . unTO)
-- glBindTextureUnit 3 (pdata ^. fboPos . _2 . unTO)
--
-- --drawShader (_transparencyCompShader pdata) 4
-- glUseProgram (pdata ^. transparencyCompShader)
-- glDrawArrays GL_TRIANGLES 0 6
--Draw blurred bloom onto base buffer
glEnable GL_BLEND
glBlendFunc GL_SRC_ALPHA GL_ONE
@@ -358,7 +347,6 @@ doDrawing' win pdata u = do
glBindTextureUnit 0 (_unTO . snd $ _fboHalf1 pdata)
glUseProgram (pdata ^. fullscreenShader)
glDrawArrays GL_TRIANGLES 0 6
-- glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
--set viewport for radial distortion
--setViewportSize (round winx) (round winy)
@@ -373,7 +361,7 @@ doDrawing' win pdata u = do
glUseProgram (pdata ^. fullscreenShader)
glDrawArrays GL_TRIANGLES 0 6
rs' -> do
let rs = take 10 rs'
let rs = take 15 rs'
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fbo2 . _1 . unFBO)
withArray (concatMap rdToVec2s rs) $
glNamedBufferSubData (pdata ^. barrelShader . _2 . vboName) 0
+2 -2
View File
@@ -124,7 +124,7 @@ preloadRender = do
putStrLn "Setup full screen shaders"
alphadivideshader <- makeSourcedShader "texture2D/alphaDivide" [vert, frag]
fsShad <- makeSourcedShader "texture/simple" [vert, frag]
transcompshader <- makeSourcedShader "fullscreen/transparencyComp" [vert, frag]
-- transcompshader <- makeSourcedShader "fullscreen/transparencyComp" [vert, frag]
bloomBlurShad <- makeSourcedShader "texture/bloomBlur" [vert, frag]
lightingTextureShad <- makeSourcedShader "lighting/texture" [vert, frag]
@@ -186,7 +186,7 @@ preloadRender = do
, _windowPullShader = winpull
, _pullWallShader = wallpull
, _fullscreenShader = fsShad
, _transparencyCompShader = transcompshader
-- , _transparencyCompShader = transcompshader
, _alphaDivideShader = alphadivideshader
, _lightingTextureShader = lightingTextureShad
, _bloomBlurShader = bloomBlurShad