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
#ifndef _VB_INPUT_DATA_VERT_
#define _VB_INPUT_DATA_VERT_

#include "nodeBufferedInput.cmn"

#if defined(USE_GPU_SKINNING)
#include "boneTransforms.vert"
#endif

vec4   dvd_Vertex;
vec4   dvd_Colour;
vec3   dvd_Normal;
vec3   dvd_Tangent;

vec3 UNPACK_FLOAT(in float value) {
    return (fract(vec3(1.0, 256.0, 65536.0) * value)* 2.0) - 1.0;
}

void computeData(){
    VAR.dvd_instanceID  = gl_BaseInstanceARB;
    VAR.dvd_drawID = gl_DrawIDARB;
    dvd_Vertex  = vec4(inVertexData, 1.0);
    //Occlusion culling visibility debug code
#if defined(USE_HIZ_CULLING) && defined(DEBUG_HIZ_CULLING)
    if (dvd_customData > 2.0) {
        dvd_Vertex.xyz *= 5;
    }
#endif
    dvd_Normal  = UNPACK_FLOAT(inNormalData);
    dvd_Colour   = inColourData;
    dvd_Tangent = UNPACK_FLOAT(inTangentData); 

#   if defined(USE_GPU_SKINNING)
#       if defined(COMPUTE_TBN)
            applyBoneTransforms(dvd_Vertex, dvd_Normal, dvd_Tangent, dvd_lodLevel);
#       else
            applyBoneTransforms(dvd_Vertex, dvd_Normal, dvd_lodLevel);
#       endif
#   endif

    VAR._texCoord = inTexCoordData;
    VAR._vertexW  = dvd_WorldMatrix(VAR.dvd_instanceID) * dvd_Vertex;

    setClipPlanes(VAR._vertexW);
}

#endif //_VB_INPUT_DATA_VERT_

Commits for Divide-Framework/trunk/assets/shaders/GLSL/vertexAtoms/vbInputData.vert

Diff revisions: vs.
Revision Author Commited Message
881 Diff Diff IonutCava picture IonutCava Tue 21 Mar, 2017 22:07:37 +0000

[IonutCava]
- Multi draw command bug fix: drawCount > 1 should properly register all commands in the command buffer
- More tessellated terrain updates and fixes (still Work In Progress)

880 Diff Diff IonutCava picture IonutCava Mon 20 Mar, 2017 17:27:13 +0000

[IonutCava]
- New tessellated terrain system based on this: http://victorbush.com/2015/01/tessellated-terrain/
— Work in progress: hardcoded values, new code is in Test namespace
- Split terrain geometry in two:
— tessellated rendering data
— physics verts + indices (used for collisions, vegetation, etc)
- Old Chunk system is used only for culling objects and speeding up collision detection

879 Diff Diff IonutCava picture IonutCava Sun 19 Mar, 2017 19:29:46 +0000

[IonutCava]
- GLSL updates:
— Interface block correction to support tessellation shaders automatically
— Fixed line counting issues with the preprocessor

877 Diff Diff IonutCava picture IonutCava Thu 16 Mar, 2017 21:55:59 +0000

[IonutCava]
- Reflection updates
- Sky parallax fixes
- Initial support for Tessellation patches (used by the new terrain system – W.I.P.)

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

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

758 Diff Diff IonutCava picture IonutCava Tue 02 Aug, 2016 16:05:09 +0000

[IonutCava]
- Added a cross platform method of naming threads (helps with debugging)
- Reduced dependency on VAR.dvd_drawID in shaders.
- Work on Single/Multi thread toggle for GFX resource loading (crashes, bugs, etc)
- Fix a bug in TaskPool where task states were never actually updated properly
- Change threadpool implementation to use std::thread instead of boost::thread

721 Diff Diff IonutCava picture IonutCava Wed 08 Jun, 2016 15:47:49 +0000

[IonutCava]
- Spelling: change all references from our code of “color” to the PROPER British version of “colour” because it sounds 100x better

644 Diff Diff IonutCava picture IonutCava Sun 14 Feb, 2016 15:04:17 +0000

[IonutCava]
- Fix ZPrePass on AMD hardware:
— Use invariant gl_Position;
— USe early fragment test for non-alpha blended entities
— Add a toggle to disable/enable ZPrePass at compile time
- Add Occlusion culling debugging feature togglable at compile time
- Initial code for high prio materials (used to always calc reflections, compute shaders immediately, etc)

633 Diff Diff IonutCava picture IonutCava Wed 27 Jan, 2016 16:54:12 +0000

[IonutCava]
- Improve load times by using ShaderCache files to avoid re-parsing atoms multiple times
- Z_PRE_PASS and multi-threaded asset loading is disabled automatically for AMD only (until driver issues are resolved)

631 IonutCava picture IonutCava Sun 24 Jan, 2016 20:28:21 +0000

[IonutCava]
- Fix and optimize particle rendering system
- Temporarily disable Z_PRE_PASS system for testing
- Improve thread pool destruction system a bit
- Fix texture loading when used as fb attachment
- Forward+ renderer now takes the entire light buffer (no need to split up by light type)
- Start work on occlusion culling fixes:
— ToDo: Take into account batching system
— Fix gl_DrawIDARB usage