- Change shadowmap resolution from 1024 to 128
This commit is contained in:
parent
1df7dc81e6
commit
265df4b797
4 changed files with 15 additions and 7 deletions
|
|
@ -106,7 +106,7 @@ void FShadowMap::Update()
|
|||
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, mNodesBuffer);
|
||||
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3, mLinesBuffer);
|
||||
|
||||
glViewport(0, 0, 1024, 1024);
|
||||
glViewport(0, 0, SHADOWMAP_QUALITY, 1024);
|
||||
GLRenderer->RenderScreenQuad();
|
||||
|
||||
const auto &viewport = GLRenderer->mScreenViewport;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@
|
|||
class ADynamicLight;
|
||||
struct level_info_t;
|
||||
|
||||
// This constant must match the same constant in shadowmap.fp
|
||||
//#define SHADOWMAP_QUALITY 1024
|
||||
#define SHADOWMAP_QUALITY 128
|
||||
|
||||
class FShadowMap
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -770,7 +770,7 @@ void FGLRenderBuffers::CreateShadowMap()
|
|||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &textureBinding);
|
||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &frameBufferBinding);
|
||||
|
||||
mShadowMapTexture = Create2DTexture("ShadowMap", GL_R32F, 1024, 1024);
|
||||
mShadowMapTexture = Create2DTexture("ShadowMap", GL_R32F, SHADOWMAP_QUALITY, 1024);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue