- moved VR code and IntRect to 'common'

This commit is contained in:
Christoph Oelckers 2020-04-26 10:26:29 +02:00
commit 686aa9779d
23 changed files with 108 additions and 85 deletions

View file

@ -29,6 +29,7 @@
#include "g_levellocals.h"
#include "v_video.h"
#include "a_dynlight.h"
#include "hwrenderer/postprocessing/hw_postprocess.h"
/*
The 1D shadow maps are stored in a 1024x1024 texture as float depth values (R32F).
@ -224,3 +225,23 @@ IShadowMap::~IShadowMap()
Reset();
}
void PPShadowMap::Update(PPRenderState* renderstate)
{
ShadowMapUniforms uniforms;
uniforms.ShadowmapQuality = (float)gl_shadowmap_quality;
uniforms.NodesCount = screen->mShadowMap.NodesCount();
renderstate->PushGroup("shadowmap");
renderstate->Clear();
renderstate->Shader = &ShadowMap;
renderstate->Uniforms.Set(uniforms);
renderstate->Viewport = { 0, 0, gl_shadowmap_quality, 1024 };
renderstate->SetShadowMapBuffers(true);
renderstate->SetOutputShadowMap();
renderstate->SetNoBlend();
renderstate->Draw();
renderstate->PopGroup();
}