refactored post process chain

This commit is contained in:
turanszkij
2019-03-10 18:23:40 +00:00
parent 7c1c98a1d2
commit cd290b74f2
12 changed files with 291 additions and 325 deletions
File diff suppressed because it is too large Load Diff
+33 -26
View File
@@ -49,26 +49,38 @@ private:
UINT msaaSampleCount = 1;
protected:
wiGraphics::Texture2D rtReflection;
wiGraphics::Texture2D rtSSR;
wiGraphics::Texture2D rtMotionBlur;
wiGraphics::Texture2D rtSceneCopy;
wiGraphics::Texture2D rtWaterRipple;
wiGraphics::Texture2D rtLinearDepth;
wiGraphics::Texture2D rtParticle;
wiGraphics::Texture2D rtVolumetricLights;
wiGraphics::Texture2D rtFinal[2];
wiGraphics::Texture2D rtDof[3];
wiGraphics::Texture2D rtTemporalAA[2];
wiGraphics::Texture2D rtBloom;
wiGraphics::Texture2D rtSSAO[2];
wiGraphics::Texture2D rtSun[2];
wiGraphics::Texture2D rtSun_resolved;
wiGraphics::Texture2D rtReflection; // conains the scene rendered for planar reflections
wiGraphics::Texture2D rtSSR; // screen-space reflection results
wiGraphics::Texture2D rtSceneCopy; // contains the rendered scene that can be fed into transparent pass for distortion effect
wiGraphics::Texture2D rtWaterRipple; // water ripple sprite normal maps are rendered into this
wiGraphics::Texture2D rtParticle; // contains off-screen particles
wiGraphics::Texture2D rtVolumetricLights; // contains the volumetric light results
wiGraphics::Texture2D rtDof[2]; // depth of field blurred out-of focus part
wiGraphics::Texture2D rtTemporalAA[2]; // temporal AA history buffer
wiGraphics::Texture2D rtBloom; // contains the bright parts of the image + mipchain
wiGraphics::Texture2D rtSSAO[2]; // ping-pong when rendering and blurring SSAO
wiGraphics::Texture2D rtSun[2]; // 0: sun render target used for lightshafts (can be MSAA), 1: radial blurred lightshafts
wiGraphics::Texture2D rtSun_resolved; // sun render target, but the resolved version if MSAA is enabled
wiGraphics::Texture2D depthBuffer;
wiGraphics::Texture2D depthCopy;
wiGraphics::Texture2D smallDepth;
wiGraphics::Texture2D depthBuffer_reflection;
wiGraphics::Texture2D rtPostprocess_HDR; // ping-pong with main scene RT in HDR post-process chain
wiGraphics::Texture2D rtPostprocess_LDR[2]; // ping-pong with itself in LDR post-process chain
wiGraphics::Texture2D depthBuffer; // used for depth-testing, can be MSAA
wiGraphics::Texture2D depthBuffer_Copy; // used for shader resource, single sample
wiGraphics::Texture2D rtLinearDepth; // linear depth result
wiGraphics::Texture2D smallDepth; // downsampled depth buffer
wiGraphics::Texture2D depthBuffer_reflection; // depth-test for reflection rendering
// Post-processes are ping-ponged, this function helps to obtain the last postprocess render target that was written
const wiGraphics::Texture2D* GetLastPostprocessRT() const
{
int ldr_postprocess_count = 0;
ldr_postprocess_count += sharpenFilterEnabled ? 1 : 0;
ldr_postprocess_count += colorGradingEnabled ? 1 : 0;
ldr_postprocess_count += fxaaEnabled ? 1 : 0;
int rt_index = ldr_postprocess_count % 2;
return &rtPostprocess_LDR[rt_index];
}
void ResizeBuffers() override;
@@ -84,17 +96,12 @@ protected:
virtual void RenderLightShafts(GRAPHICSTHREAD threadID) const;
virtual void RenderVolumetrics(GRAPHICSTHREAD threadID) const;
virtual void RenderParticles(bool isDistrortionPass, GRAPHICSTHREAD threadID) const;
virtual void RenderWaterRipples(GRAPHICSTHREAD threadID) const;
virtual void RenderRefractionSource(const wiGraphics::Texture2D& srcSceneRT, GRAPHICSTHREAD threadID) const;
virtual void RenderTransparents(const wiGraphics::Texture2D& dstSceneRT, RENDERPASS renderPass, GRAPHICSTHREAD threadID) const;
virtual void TemporalAAResolve(const wiGraphics::Texture2D& srcdstSceneRT, const wiGraphics::Texture2D& srcGbuffer1, GRAPHICSTHREAD threadID) const;
virtual void RenderBloom(const wiGraphics::Texture2D& srcdstSceneRT, GRAPHICSTHREAD threadID) const;
virtual void RenderMotionBlur(const wiGraphics::Texture2D& srcSceneRT, const wiGraphics::Texture2D& srcGbuffer1, GRAPHICSTHREAD threadID) const;
virtual void ToneMapping(const wiGraphics::Texture2D& srcSceneRT, GRAPHICSTHREAD threadID) const;
virtual void SharpenFilter(const wiGraphics::Texture2D& dstSceneRT, const wiGraphics::Texture2D& srcSceneRT, GRAPHICSTHREAD threadID) const;
virtual void RenderDepthOfField(const wiGraphics::Texture2D& srcSceneRT, GRAPHICSTHREAD threadID) const;
virtual void RenderFXAA(const wiGraphics::Texture2D& dstSceneRT, const wiGraphics::Texture2D& srcSceneRT, GRAPHICSTHREAD threadID) const;
virtual void RenderPostprocessChain(const wiGraphics::Texture2D& srcSceneRT, const wiGraphics::Texture2D& srcGbuffer1, GRAPHICSTHREAD threadID) const;
public:
virtual const wiGraphics::Texture2D* GetDepthBuffer() { return &depthBuffer; }
+3 -21
View File
@@ -104,14 +104,14 @@ void RenderPath3D_Deferred::Render() const
}
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_COPY_SOURCE, threadID);
device->CopyTexture2D(&depthCopy, &depthBuffer, threadID);
device->CopyTexture2D(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_COPY_SOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
RenderLinearDepth(threadID);
device->UnbindResources(TEXSLOT_ONDEMAND0, TEXSLOT_ONDEMAND_COUNT, threadID);
wiRenderer::BindDepthTextures(&depthCopy, &rtLinearDepth, threadID);
wiRenderer::BindDepthTextures(&depthBuffer_Copy, &rtLinearDepth, threadID);
RenderDecals(threadID);
@@ -155,8 +155,6 @@ void RenderPath3D_Deferred::Render() const
RenderParticles(false, GRAPHICSTHREAD_IMMEDIATE);
RenderWaterRipples(GRAPHICSTHREAD_IMMEDIATE);
RenderRefractionSource(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
RenderTransparents(rtDeferred, RENDERPASS_FORWARD, GRAPHICSTHREAD_IMMEDIATE);
@@ -167,23 +165,7 @@ void RenderPath3D_Deferred::Render() const
RenderBloom(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
RenderMotionBlur(rtDeferred, rtGBuffer[1], GRAPHICSTHREAD_IMMEDIATE);
ToneMapping(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
const Texture2D* rt0 = &rtFinal[0];
const Texture2D* rt1 = &rtFinal[1];
SharpenFilter(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
if (getSharpenFilterEnabled())
{
SwapPtr(rt0, rt1);
}
RenderDepthOfField(*rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderFXAA(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderPostprocessChain(rtDeferred, rtGBuffer[1], GRAPHICSTHREAD_IMMEDIATE);
RenderPath2D::Render();
}
+4 -22
View File
@@ -98,7 +98,7 @@ void RenderPath3D_Forward::Render() const
if (getMSAASampleCount() > 1)
{
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, threadID);
wiRenderer::ResolveMSAADepthBuffer(&depthCopy, &depthBuffer, threadID);
wiRenderer::ResolveMSAADepthBuffer(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
device->MSAAResolve(scene_read[0], &rtMain[0], threadID);
@@ -107,14 +107,14 @@ void RenderPath3D_Forward::Render() const
else
{
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_COPY_SOURCE, threadID);
device->CopyTexture2D(&depthCopy, &depthBuffer, threadID);
device->CopyTexture2D(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_COPY_SOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
}
wiRenderer::BindGBufferTextures(scene_read[0], scene_read[1], nullptr, threadID);
RenderLinearDepth(threadID);
wiRenderer::BindDepthTextures(&depthCopy, &rtLinearDepth, threadID);
wiRenderer::BindDepthTextures(&depthBuffer_Copy, &rtLinearDepth, threadID);
RenderSSAO(threadID);
@@ -133,8 +133,6 @@ void RenderPath3D_Forward::Render() const
RenderParticles(false, GRAPHICSTHREAD_IMMEDIATE);
RenderWaterRipples(GRAPHICSTHREAD_IMMEDIATE);
RenderRefractionSource(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
RenderTransparents(rtMain[0], RENDERPASS_FORWARD, GRAPHICSTHREAD_IMMEDIATE);
@@ -150,23 +148,7 @@ void RenderPath3D_Forward::Render() const
RenderBloom(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
RenderMotionBlur(*scene_read[0], *scene_read[1], GRAPHICSTHREAD_IMMEDIATE);
ToneMapping(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
const Texture2D* rt0 = &rtFinal[0];
const Texture2D* rt1 = &rtFinal[1];
SharpenFilter(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
if (getSharpenFilterEnabled())
{
SwapPtr(rt0, rt1);
}
RenderDepthOfField(*rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderFXAA(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderPostprocessChain(*scene_read[0], *scene_read[1], GRAPHICSTHREAD_IMMEDIATE);
RenderPath2D::Render();
}
+2 -2
View File
@@ -29,11 +29,11 @@ void RenderPath3D_Stereogram::Render() const
wiRenderer::DrawScene(wiRenderer::GetCamera(), getTessellationEnabled(), GRAPHICSTHREAD_IMMEDIATE, RENDERPASS_DEPTHONLY, getHairParticlesEnabled(), true, getLayerMask());
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_COPY_SOURCE, GRAPHICSTHREAD_IMMEDIATE);
device->CopyTexture2D(&depthCopy, &depthBuffer, GRAPHICSTHREAD_IMMEDIATE);
device->CopyTexture2D(&depthBuffer_Copy, &depthBuffer, GRAPHICSTHREAD_IMMEDIATE);
RenderLinearDepth(GRAPHICSTHREAD_IMMEDIATE);
wiRenderer::BindDepthTextures(&depthCopy, &rtLinearDepth, GRAPHICSTHREAD_IMMEDIATE);
wiRenderer::BindDepthTextures(&depthBuffer_Copy, &rtLinearDepth, GRAPHICSTHREAD_IMMEDIATE);
}
void RenderPath3D_Stereogram::Compose() const
+3 -21
View File
@@ -52,14 +52,14 @@ void RenderPath3D_TiledDeferred::Render() const
}
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_COPY_SOURCE, threadID);
device->CopyTexture2D(&depthCopy, &depthBuffer, threadID);
device->CopyTexture2D(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_COPY_SOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
RenderLinearDepth(threadID);
device->UnbindResources(TEXSLOT_ONDEMAND0, TEXSLOT_ONDEMAND_COUNT, threadID);
wiRenderer::BindDepthTextures(&depthCopy, &rtLinearDepth, threadID);
wiRenderer::BindDepthTextures(&depthBuffer_Copy, &rtLinearDepth, threadID);
RenderDecals(threadID);
@@ -91,8 +91,6 @@ void RenderPath3D_TiledDeferred::Render() const
RenderParticles(false, GRAPHICSTHREAD_IMMEDIATE);
RenderWaterRipples(GRAPHICSTHREAD_IMMEDIATE);
RenderRefractionSource(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
RenderTransparents(rtDeferred, RENDERPASS_TILEDFORWARD, GRAPHICSTHREAD_IMMEDIATE);
@@ -103,23 +101,7 @@ void RenderPath3D_TiledDeferred::Render() const
RenderBloom(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
RenderMotionBlur(rtDeferred, rtGBuffer[1], GRAPHICSTHREAD_IMMEDIATE);
ToneMapping(rtDeferred, GRAPHICSTHREAD_IMMEDIATE);
const Texture2D* rt0 = &rtFinal[0];
const Texture2D* rt1 = &rtFinal[1];
SharpenFilter(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
if (getSharpenFilterEnabled())
{
SwapPtr(rt0, rt1);
}
RenderDepthOfField(*rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderFXAA(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderPostprocessChain(rtDeferred, rtGBuffer[1], GRAPHICSTHREAD_IMMEDIATE);
RenderPath2D::Render();
}
+4 -24
View File
@@ -52,19 +52,19 @@ void RenderPath3D_TiledForward::Render() const
if (getMSAASampleCount() > 1)
{
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, threadID);
wiRenderer::ResolveMSAADepthBuffer(&depthCopy, &depthBuffer, threadID);
wiRenderer::ResolveMSAADepthBuffer(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
}
else
{
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_DEPTH_WRITE, RESOURCE_STATE_COPY_SOURCE, threadID);
device->CopyTexture2D(&depthCopy, &depthBuffer, threadID);
device->CopyTexture2D(&depthBuffer_Copy, &depthBuffer, threadID);
device->TransitionBarrier(dsv, ARRAYSIZE(dsv), RESOURCE_STATE_COPY_SOURCE, RESOURCE_STATE_DEPTH_READ, threadID);
}
RenderLinearDepth(threadID);
wiRenderer::BindDepthTextures(&depthCopy, &rtLinearDepth, threadID);
wiRenderer::BindDepthTextures(&depthBuffer_Copy, &rtLinearDepth, threadID);
wiRenderer::ComputeTiledLightCulling(threadID);
@@ -122,8 +122,6 @@ void RenderPath3D_TiledForward::Render() const
RenderParticles(false, GRAPHICSTHREAD_IMMEDIATE);
RenderWaterRipples(GRAPHICSTHREAD_IMMEDIATE);
RenderRefractionSource(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
RenderTransparents(rtMain[0], RENDERPASS_TILEDFORWARD, GRAPHICSTHREAD_IMMEDIATE);
@@ -133,29 +131,11 @@ void RenderPath3D_TiledForward::Render() const
device->MSAAResolve(scene_read[0], &rtMain[0], GRAPHICSTHREAD_IMMEDIATE);
}
RenderParticles(true, GRAPHICSTHREAD_IMMEDIATE);
TemporalAAResolve(*scene_read[0], *scene_read[1], GRAPHICSTHREAD_IMMEDIATE);
RenderBloom(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
RenderMotionBlur(*scene_read[0], *scene_read[1], GRAPHICSTHREAD_IMMEDIATE);
ToneMapping(*scene_read[0], GRAPHICSTHREAD_IMMEDIATE);
const Texture2D* rt0 = &rtFinal[0];
const Texture2D* rt1 = &rtFinal[1];
SharpenFilter(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
if (getSharpenFilterEnabled())
{
SwapPtr(rt0, rt1);
}
RenderDepthOfField(*rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderFXAA(*rt1, *rt0, GRAPHICSTHREAD_IMMEDIATE);
RenderPostprocessChain(*scene_read[0], *scene_read[1], GRAPHICSTHREAD_IMMEDIATE);
RenderPath2D::Render();
}
+11 -5
View File
@@ -243,7 +243,8 @@ namespace wiImage
switch (params.process.type)
{
case wiImageParams::PostProcess::BLUR:
case wiImageParams::PostProcess::BLUR_LDR:
case wiImageParams::PostProcess::BLUR_HDR:
prcb.xPPParams0.x = params.process.params.blur.x / params.siz.x;
prcb.xPPParams0.y = params.process.params.blur.y / params.siz.y;
prcb.xPPParams0.z = params.mipLevel;
@@ -267,7 +268,7 @@ namespace wiImage
device->UpdateBuffer(&processCb, &prcb, threadID);
break;
case wiImageParams::PostProcess::DEPTHOFFIELD:
prcb.xPPParams0.z = params.process.params.dofStrength;
prcb.xPPParams0.z = params.process.params.dofFocus;
device->UpdateBuffer(&processCb, &prcb, threadID);
break;
case wiImageParams::PostProcess::MOTIONBLUR:
@@ -375,7 +376,8 @@ namespace wiImage
imagePS[IMAGE_SHADER_MASKED][IMAGE_SAMPLING_BICUBIC] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "imagePS_masked_bicubic.cso", wiResourceManager::PIXELSHADER));
imagePS[IMAGE_SHADER_FULLSCREEN][IMAGE_SAMPLING_BICUBIC] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "screenPS_bicubic.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::BLUR] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "blurPS.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::BLUR_LDR] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "blurPS.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::BLUR_HDR] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "blurPS.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::LIGHTSHAFT] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "lightShaftPS.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::OUTLINE] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "outlinePS.cso", wiResourceManager::PIXELSHADER));
postprocessPS[wiImageParams::PostProcess::DEPTHOFFIELD] = static_cast<const PixelShader*>(wiResourceManager::GetShaderManager().add(path + "depthofFieldPS.cso", wiResourceManager::PIXELSHADER));
@@ -487,9 +489,13 @@ namespace wiImage
desc.RTFormats[0] = wiRenderer::RTFormat_hdr;
desc.bs = &blendStates[BLENDMODE_ALPHA];
}
else if (i == wiImageParams::PostProcess::BLOOMSEPARATE || i == wiImageParams::PostProcess::BLUR)
else if (i == wiImageParams::PostProcess::BLOOMSEPARATE)
{
desc.numRTs = 1;
desc.RTFormats[0] = device->GetBackBufferFormat();
}
else if (i == wiImageParams::PostProcess::BLUR_LDR)
{
// todo: bloom and DoF blur should really be HDR lol...
desc.numRTs = 1;
desc.RTFormats[0] = device->GetBackBufferFormat();
}
+5 -4
View File
@@ -100,7 +100,8 @@ struct wiImageParams
enum POSTPROCESS
{
DISABLED,
BLUR,
BLUR_LDR,
BLUR_HDR,
LIGHTSHAFT,
OUTLINE,
DEPTHOFFIELD,
@@ -143,7 +144,7 @@ struct wiImageParams
float range;
UINT sampleCount;
} ssao;
float dofStrength;
float dofFocus;
float sharpen;
float exposure;
float bloomThreshold;
@@ -151,9 +152,9 @@ struct wiImageParams
bool isActive() const { return type != DISABLED; }
void clear() { type = DISABLED; }
void setBlur(const XMFLOAT2& direction) { type = BLUR; params.blur.x = direction.x; params.blur.y = direction.y; }
void setBlur(const XMFLOAT2& direction, bool hdr = false) { type = (hdr ? BLUR_HDR : BLUR_LDR); params.blur.x = direction.x; params.blur.y = direction.y; }
void setBloom(float threshold) { type = BLOOMSEPARATE; params.bloomThreshold = threshold; }
void setDOF(float value) { if (value > 0) { type = DEPTHOFFIELD; params.dofStrength = value; } }
void setDOF(float focus) { if (focus > 0) { type = DEPTHOFFIELD; params.dofFocus = focus; } }
void setMotionBlur() { type = MOTIONBLUR; }
void setOutline(float threshold = 0.1f, float thickness = 1.0f, const XMFLOAT3& color = XMFLOAT3(0, 0, 0))
{
+5 -1
View File
@@ -8229,7 +8229,7 @@ void BindDepthTextures(const Texture2D* depth, const Texture2D* linearDepth, GRA
}
const Texture2D* GetLuminance(const Texture2D* sourceImage, GRAPHICSTHREAD threadID)
const Texture2D* ComputeLuminance(const Texture2D* sourceImage, GRAPHICSTHREAD threadID)
{
GraphicsDevice* device = GetDevice();
@@ -8272,6 +8272,8 @@ const Texture2D* GetLuminance(const Texture2D* sourceImage, GRAPHICSTHREAD threa
}
if (luminance_map != nullptr)
{
device->EventBegin("Compute Luminance", threadID);
// Pass 1 : Create luminance map from scene tex
TextureDesc luminance_map_desc = luminance_map->GetDesc();
device->BindComputePSO(&CPSO[CSTYPE_LUMINANCE_PASS1], threadID);
@@ -8300,6 +8302,8 @@ const Texture2D* GetLuminance(const Texture2D* sourceImage, GRAPHICSTHREAD threa
device->UnbindUAVs(0, 1, threadID);
device->EventEnd(threadID);
return luminance_avg.back();
}
+2 -1
View File
@@ -151,6 +151,8 @@ namespace wiRenderer
void DrawTracedScene(const wiSceneSystem::CameraComponent& camera, const wiGraphics::Texture2D* result, GRAPHICSTHREAD threadID);
// Render the scene BVH with ray tracing
void DrawTracedSceneBVH(GRAPHICSTHREAD threadID);
// Compute the luminance for the source image and return the texture containing the luminance value in pixel [0,0]
const wiGraphics::Texture2D* ComputeLuminance(const wiGraphics::Texture2D* sourceImage, GRAPHICSTHREAD threadID);
// Render occluders against a depth buffer
void OcclusionCulling_Render(GRAPHICSTHREAD threadID);
@@ -280,7 +282,6 @@ namespace wiRenderer
bool IsRequestedReflectionRendering();
void SetEnvironmentMap(wiGraphics::Texture2D* tex);
const wiGraphics::Texture2D* GetEnvironmentMap();
const wiGraphics::Texture2D* GetLuminance(const wiGraphics::Texture2D* sourceImage, GRAPHICSTHREAD threadID);
const XMFLOAT4& GetWaterPlane();
void SetGameSpeed(float value);
float GetGameSpeed();
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates
const int minor = 25;
// minor bug fixes, alterations, refactors, updates
const int revision = 2;
const int revision = 3;
long GetVersion()