mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-18 10:11:11 +00:00
- made hw_postprocess.cpp compatible.
The shadowmap is not universal, it depends on Doom's map format.
This commit is contained in:
parent
0c63f5c832
commit
4b56714199
2 changed files with 23 additions and 21 deletions
|
@ -26,10 +26,14 @@
|
||||||
#include "hwrenderer/postprocessing/hw_postprocessshader.h"
|
#include "hwrenderer/postprocessing/hw_postprocessshader.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
#include "templates.h"
|
||||||
|
#include "stats.h"
|
||||||
|
#include "colormaps.h"
|
||||||
|
|
||||||
Postprocess hw_postprocess;
|
Postprocess hw_postprocess;
|
||||||
|
|
||||||
PPResource *PPResource::First = nullptr;
|
PPResource *PPResource::First = nullptr;
|
||||||
|
TArray<PostProcessShader> PostProcessShaders;
|
||||||
|
|
||||||
bool gpuStatActive = false;
|
bool gpuStatActive = false;
|
||||||
bool keepGpuStatActive = false;
|
bool keepGpuStatActive = false;
|
||||||
|
@ -862,26 +866,6 @@ PPPresent::PPPresent()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
CVAR(Bool, gl_custompost, true, 0)
|
CVAR(Bool, gl_custompost, true, 0)
|
||||||
|
|
|
@ -24,7 +24,25 @@
|
||||||
#include "hwrenderer/postprocessing/hw_postprocessshader.h"
|
#include "hwrenderer/postprocessing/hw_postprocessshader.h"
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
|
||||||
TArray<PostProcessShader> PostProcessShaders;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool IsConsolePlayer(player_t *player)
|
static bool IsConsolePlayer(player_t *player)
|
||||||
|
|
Loading…
Reference in a new issue