Skip to content

Commit 1bfc3d2

Browse files
committed
Add OpenGL shaders by Armada651
1 parent 17b5f8d commit 1bfc3d2

File tree

394 files changed

+7860
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+7860
-0
lines changed

res/gamedata/shaders/gl/.s

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--[[
2+
function printf(fmt,...)
3+
log(string.format(fmt,unpack(arg)))
4+
end
5+
]]--
6+
7+
--[[
8+
t_point_att = "internal\\internal_light_attpoint"
9+
10+
function r1_lspot (shader, t_base, vs, aref)
11+
shader:begin (vs,"add_spot")
12+
: fog (false)
13+
: zb (true,false)
14+
: blend (true,blend.one,blend.one)
15+
: aref (true,aref or 0)
16+
shader:sampler ("s_base") :texture (t_base)
17+
shader:sampler ("s_lmap") :texture ("internal\\internal_light_att")
18+
: clamp ()
19+
: f_linear ()
20+
: project (true)
21+
shader:sampler ("s_att") :texture ("internal\\internal_light_attclip")
22+
: clamp ()
23+
: f_linear ()
24+
end
25+
26+
function r1_lpoint (shader, t_base, vs, aref)
27+
shader:begin (vs,"add_point")
28+
: fog (false)
29+
: zb (true,false)
30+
: blend (true,blend.one,blend.one)
31+
: aref (true,aref or 0)
32+
shader:sampler ("s_base") :texture (t_base)
33+
shader:sampler ("s_lmap") :texture (t_point_att)
34+
: clamp ()
35+
: f_linear ()
36+
shader:sampler ("s_att") :texture (t_point_att)
37+
: clamp ()
38+
: f_linear ()
39+
end
40+
]]--
2.39 KB
Binary file not shown.
137 Bytes
Binary file not shown.
1.35 KB
Binary file not shown.
28 Bytes
Binary file not shown.
54 Bytes
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "common.h"
2+
3+
out gl_PerVertex { vec4 gl_Position; };
4+
5+
layout(location = POSITION) in float4 P;
6+
7+
void main ()
8+
{
9+
gl_Position = mul ( m_WVP, P );
10+
}
44 Bytes
Binary file not shown.
33 Bytes
Binary file not shown.
58 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)