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
-- Vertex

#include "vbInputData.vert"

out vec4 _scrollingUV;
uniform float underwaterDiffuseScale;

void main(void) {

    computeData();

    float time2 = float(dvd_time) * 0.0001;
    vec2 noiseUV = VAR._texCoord * underwaterDiffuseScale;
    _scrollingUV.st = noiseUV;
    _scrollingUV.pq = noiseUV + time2;
    _scrollingUV.s -= time2;

    gl_Position = dvd_ViewProjectionMatrix * VAR._vertexW;
}

--Fragment.Colour

#include "utility.frag"
#include "velocityCalc.frag"

in vec4 _scrollingUV;

layout(binding = TEXTURE_UNIT0) uniform sampler2D texWaterCaustics;

layout(location = 0) out vec4 _colourOut;
layout(location = 1) out vec2 _normalOut;
layout(location = 2) out vec2 _velocityOut;

void main(void) {
    _colourOut = ToSRGB(applyFog((texture(texWaterCaustics, _scrollingUV.st) +
        texture(texWaterCaustics, _scrollingUV.pq)) * 0.5));

    _normalOut = packNormal(normalize(VAR._normalWV));
    _velocityOut = velocityCalc(dvd_InvProjectionMatrix, getScreenPositionNormalised());
}

--Fragment.Depth

layout(early_fragment_tests) in;

void main() {

}

Commits for Divide-Framework/trunk/assets/shaders/GLSL/terrainPlane.glsl

Diff revisions: vs.
Revision Author Commited Message
879 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