mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-05-31 08:50:54 +00:00
Improved shadow mapping performance using the shadow LOD and tweaked
polygon offsets to fight shadow acne
This commit is contained in:
parent
5153422d0d
commit
0eaaea4b96
10 changed files with 92 additions and 43 deletions
|
@ -77,9 +77,14 @@ void Framebuffer::Init()
|
|||
int width, height;
|
||||
width = height = r_shadowMapImageSize.GetInteger();
|
||||
|
||||
globalFramebuffers.shadowFBO = new Framebuffer( "_shadowMap" , width, height );
|
||||
globalFramebuffers.shadowFBO->Bind();
|
||||
glDrawBuffers( 0, NULL );
|
||||
for( int i = 0; i < MAX_SHADOWMAP_RESOLUTIONS; i++ )
|
||||
{
|
||||
width = height = shadowMapResolutions[i];
|
||||
|
||||
globalFramebuffers.shadowFBO[i] = new Framebuffer( "_shadowMap" , width, height );
|
||||
globalFramebuffers.shadowFBO[i]->Bind();
|
||||
glDrawBuffers( 0, NULL );
|
||||
}
|
||||
// globalFramebuffers.shadowFBO->AddColorBuffer( GL_RGBA8, 0 );
|
||||
// globalFramebuffers.shadowFBO->AddDepthBuffer( GL_DEPTH_COMPONENT24 );
|
||||
// globalFramebuffers.shadowFBO->Check();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue