Skip to content

Commit 0340ee4

Browse files
committed
shaders: Add GLSL port of combination shaders.
This includes the DOF and SSAO shaders.
1 parent 060350a commit 0340ee4

30 files changed

+519
-37
lines changed
6.42 KB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include "common.h"
2+
#include "iostructs\v_combine.h"
3+
#line 4 2
4+
//////////////////////////////////////////////////////////////////////////////////////////
5+
// Vertex
6+
v2p _main ( _in I )
7+
{
8+
v2p O;
9+
O.hpos = float4 (I.P.x, -I.P.y, 0, 1);
10+
float scale = texelFetch(s_tonemap,int2(0,0),0).x;
11+
O.tc0 = float4 (I.P.zw, scale, scale);
12+
O.tcJ = I.tcJ;
13+
return O;
14+
}
24 Bytes
Binary file not shown.
48 Bytes
Binary file not shown.
3.83 KB
Binary file not shown.
67 Bytes
Binary file not shown.
2.45 KB
Binary file not shown.
68 Bytes
Binary file not shown.
826 Bytes
Binary file not shown.

res/gamedata/shaders/gl/common.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,11 @@
33

44
#include "shared\common.h"
55

6-
// TODO: OGL: Move to cbuffers
7-
uniform half4 hemi_cube_pos_faces;
8-
uniform half4 hemi_cube_neg_faces;
9-
uniform half4 L_material; // 0,0,0,mid
10-
uniform half4 Ldynamic_color; // dynamic light color (rgb1) - spot/point
11-
uniform half4 Ldynamic_pos; // dynamic light pos+1/range(w) - spot/point
12-
uniform half4 Ldynamic_dir; // dynamic light direction - sun
13-
146
#include "common_defines.h"
157
#include "common_policies.h"
168
#include "common_iostructs.h"
179
#include "common_samplers.h"
18-
//include "common_cbuffers.h"
10+
#include "common_cbuffers.h"
1911
#include "common_functions.h"
2012

2113
// #define USE_SUPER_SPECULAR

0 commit comments

Comments
 (0)