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
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "Headers/GFXShaderData.h"

namespace Divide {

GFXShaderData::GFXShaderData()
    : _needsUpload(true)
{
}

GFXShaderData::GPUData::GPUData()
{
    _ProjectionMatrix.identity();
    _InvProjectionMatrix.identity();
    _ViewMatrix.identity();
    _ViewProjectionMatrix.identity();
    _cameraPosition.set(0.0f);
    _ViewPort.set(1.0f);
    _ZPlanesCombined.set(1.0f, 1.1f, 1.0f, 1.1f);
    _renderProperties.set(0.0f);
    for (U8 i = 0; i < to_const_ubyte(Frustum::FrustPlane::COUNT); ++i) {
        _frustumPlanes[i].set(0.0f);
        _clipPlanes[i].set(0.0f);
    }
}

bool GFXShaderData::GPUData::operator==(const GPUData& other) const {
    for (U32 i = 0; i < to_const_uint(Frustum::FrustPlane::COUNT); ++i) {
        if (_frustumPlanes[i] != other._frustumPlanes[i] || _clipPlanes[i] != other._clipPlanes[i]) {
            return false;
        }
    }

    return _cameraPosition == other._cameraPosition &&
           _ViewPort == other._ViewPort &&
           _ZPlanesCombined == other._ZPlanesCombined &&
           _renderProperties == other._renderProperties &&
           _ProjectionMatrix == other._ProjectionMatrix &&
           _InvProjectionMatrix == other._InvProjectionMatrix &&
           _ViewMatrix == other._ViewMatrix &&
           _ViewProjectionMatrix == other._ViewProjectionMatrix;
}

bool GFXShaderData::GPUData::operator!=(const GPUData& other) const {
    for (U32 i = 0; i < to_const_uint(Frustum::FrustPlane::COUNT); ++i) {
        if (_frustumPlanes[i] != other._frustumPlanes[i] || _clipPlanes[i] != other._clipPlanes[i]) {
            return true;
        }
    }

    return _cameraPosition != other._cameraPosition ||
           _ViewPort != other._ViewPort ||
           _ZPlanesCombined != other._ZPlanesCombined ||
           _renderProperties != other._renderProperties ||
           _ProjectionMatrix != other._ProjectionMatrix ||
           _InvProjectionMatrix != other._InvProjectionMatrix ||
           _ViewMatrix != other._ViewMatrix ||
           _ViewProjectionMatrix != other._ViewProjectionMatrix;
}

}; //namespace Divide

Commits for Divide-Framework/trunk/Source Code/Platform/Video/GFXShaderData.cpp

Diff revisions: vs.
Revision Author Commited Message
827 Diff Diff IonutCava picture IonutCava Sun 22 Jan, 2017 21:59:36 +0000

[IonutCava]
- ShaderBuffers now decide heuristically if they get persistently mapped or not (depends on size. Current limit is 512Kb for subData calls.
- Separate visible node command generation into 2 steps: onRender and getDrawPackage. onRender allows the creation of parallel tasks that should finish by the time the second call, getDrawPackage reaches the same node
- Update ParticleEmitter to take into account multiple players and increase parallelism at the cost of memory consumption and complexity.
- Add a default bounding box for Players (add extents to SceneTransform nodes)
- All buffers (ShaderBuffer, d3dConstantBuffer, glUniformBuffer, glBufferImpl, glGenericBuffer, etc) use BufferParams for creation.
— Constructor and create calls have been merged together

826 Diff Diff IonutCava picture IonutCava Fri 20 Jan, 2017 17:11:41 +0000

[IonutCava]
- Persistent buffer optimisations

812 Diff Diff IonutCava picture IonutCava Wed 11 Jan, 2017 21:38:18 +0000

[IonutCava]
- Finish terrain shader fixes (AMD GPU related issues)

809 Diff Diff IonutCava picture IonutCava Tue 10 Jan, 2017 17:16:26 +0000

[IonutCava]
- Move velocity calc to the normal colour pass.
- Optimise glFramebuffer and cleanup RTAttachment class

806 IonutCava picture IonutCava Sun 08 Jan, 2017 22:00:48 +0000

[IonutCava]
- Finish implementing per-fragment velocity computation using a compute shader
— Further tuning still needed
- Add VS2017 build targets