Remove compute shaders
This commit is contained in:
@@ -44,7 +44,6 @@ createLightMap cfig = case shadrendertype of
|
||||
InstancingShads -> instanceLightMap cfig
|
||||
NoShadows -> const . const . const renderLightingNoShadows
|
||||
NoLighting -> const . const . const . const . const . const renderFlatLighting
|
||||
ComputeShader -> renderComputeShadows
|
||||
_ -> renderShadows shadrendertype
|
||||
where
|
||||
shadrendertype = cfig ^. graphics_shadow_rendering
|
||||
@@ -104,27 +103,6 @@ renderLightingNoShadows positiontexture normaltexture lightPoints pdata = do
|
||||
glDisable GL_CULL_FACE
|
||||
glDisable GL_STENCIL_TEST
|
||||
|
||||
renderComputeShadows ::
|
||||
GLsizei ->
|
||||
Int ->
|
||||
Int ->
|
||||
TO ->
|
||||
TO ->
|
||||
[(Point3, Float, Point3)] ->
|
||||
RenderData ->
|
||||
IO ()
|
||||
renderComputeShadows _ _ _ toPos tanormals lightPoints rd = do
|
||||
withArray (lightsToArray lightPoints) $ \ptr ->
|
||||
glNamedBufferSubData (rd ^. lightsUBO) 0 620 ptr
|
||||
glBindTextureUnit 0 (toPos ^. unTO)
|
||||
glBindTextureUnit 1 (tanormals ^. unTO)
|
||||
glBindImageTexture 5 (rd ^. fboLighting . _2 . unTO) 0 GL_FALSE 0 GL_WRITE_ONLY GL_RGBA8
|
||||
glUseProgram (rd ^. computeShadowShader)
|
||||
glDispatchCompute 800 835 1
|
||||
-- the following should be later, just before the texture is accessed
|
||||
--glMemoryBarrier GL_SHADER_IMAGE_ACCESS_BARRIER_BIT
|
||||
glMemoryBarrier GL_TEXTURE_FETCH_BARRIER_BIT
|
||||
return ()
|
||||
|
||||
renderFlatLighting :: RenderData -> IO ()
|
||||
renderFlatLighting pdata = do
|
||||
|
||||
Reference in New Issue
Block a user