Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "Headers/PreRenderOperator.h"
#include "Platform/Video/Headers/GFXDevice.h"

namespace Divide {

F32 PreRenderOperator::s_mainCamAspectRatio;
vec2<F32> PreRenderOperator::s_mainCamZPlanes;
mat4<F32> PreRenderOperator::s_mainCamViewMatrixCache;
mat4<F32> PreRenderOperator::s_mainCamProjectionMatrixCache;

PreRenderOperator::PreRenderOperator(FilterType operatorType, RenderTarget* hdrTarget, RenderTarget* ldrTarget)
    : _operatorType(operatorType),
      _hdrTarget(hdrTarget),
      _ldrTarget(ldrTarget)
{
    _screenOnlyDraw.disableState(RTDrawDescriptor::State::CLEAR_DEPTH_BUFFER);
    _screenOnlyDraw.drawMask().disableAll();
    _screenOnlyDraw.drawMask().setEnabled(RTAttachment::Type::Colour, 0, true);
}

PreRenderOperator::~PreRenderOperator()
{
    GFX_DEVICE.deallocateRT(_samplerCopy);
}

void PreRenderOperator::cacheDisplaySettings(const GFXDevice& context) {
    context.getMatrix(MATRIX::PROJECTION, s_mainCamProjectionMatrixCache);
    context.getMatrix(MATRIX::VIEW, s_mainCamViewMatrixCache);
    s_mainCamAspectRatio = context.renderingData().aspectRatio();
    s_mainCamZPlanes.set(context.renderingData().currentZPlanes());
}

void PreRenderOperator::reshape(U16 width, U16 height) {
    if (_samplerCopy._rt) {
        _samplerCopy._rt->create(width, height);
    }
}

void PreRenderOperator::debugPreview(U8 slot) const {
};

RenderTarget* PreRenderOperator::getOutput() const {
    return _hdrTarget;
}


}; //namespace Divide

Commits for Divide-Framework/trunk/Source Code/Rendering/PostFX/PreRenderOperator.cpp

Diff revisions: vs.
Revision Author Commited Message
776 Diff Diff IonutCava picture IonutCava Thu 06 Oct, 2016 15:57:56 +0000

[IonutCava]
- Improve the CommandBuffer system to include the notion of a RenderPass /RenderSubPass with output render target info stored in them (not used yet)

734 IonutCava picture IonutCava Tue 21 Jun, 2016 16:28:11 +0000

[IonutCava]
- Added a render target pool:
— All render targets are now allocated (and tracked) by the GFXDevice.
— Allocation routines return a slim RenderTargetHandle object that will be used later on in draw commands.

- Added a refraction render pass that will handle translucent objects that need refracted textures instead of clear transparency
— Both reflective nodes and refractive nodes are not gathered properly at this point

- All API specific objects (buffers, textures, etc) are now initialized in the GFXDevice class (see GFXDeviceObjects.cpp)
— This allowed for the slimming of the RenderAPIWrapper interface

- Improved ENABLE_GPU_VALIDATION macro utilization:
— It enabled shadow map split plane debugging
— It bypasses loading shaders from text cache