Skip to content
This repository was archived by the owner on Jun 11, 2018. It is now read-only.

Commit 3d3b29c

Browse files
committed
Import of GTKRadiant 1.5.0
With several fixes in regards to compiling
1 parent a0eaa0a commit 3d3b29c

File tree

1,026 files changed

+205162
-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.

1,026 files changed

+205162
-0
lines changed

radiant/bitmaps/black.bmp

248 Bytes
Binary file not shown.

radiant/bitmaps/brush_flipx.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/brush_flipy.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/brush_flipz.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/brush_rotatex.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/brush_rotatey.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/brush_rotatez.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/cap_bevel.bmp

154 Bytes
Binary file not shown.

radiant/bitmaps/cap_cylinder.bmp

156 Bytes
Binary file not shown.

radiant/bitmaps/cap_endcap.bmp

154 Bytes
Binary file not shown.

radiant/bitmaps/cap_ibevel.bmp

154 Bytes
Binary file not shown.

radiant/bitmaps/cap_iendcap.bmp

154 Bytes
Binary file not shown.

radiant/bitmaps/console.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/curve_cap.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/dontselectcurve.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/dontselectmodel.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/ellipsis.bmp

108 Bytes
Binary file not shown.

radiant/bitmaps/entities.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/file_open.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/file_save.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/icon.bmp

3.05 KB
Binary file not shown.

radiant/bitmaps/lightinspector.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/logo.bmp

46.8 KB
Binary file not shown.

radiant/bitmaps/modify_edges.bmp

316 Bytes
Binary file not shown.

radiant/bitmaps/modify_faces.bmp

316 Bytes
Binary file not shown.

radiant/bitmaps/modify_vertices.bmp

316 Bytes
Binary file not shown.

radiant/bitmaps/noFalloff.bmp

1.55 KB
Binary file not shown.

radiant/bitmaps/notex.bmp

4.21 KB
Binary file not shown.

radiant/bitmaps/patch_bend.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/patch_drilldown.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/patch_insdel.bmp

238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.

radiant/bitmaps/patch_weld.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/patch_wireframe.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/popup_selection.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/redo.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/refresh_models.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/scalelockx.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/scalelocky.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/scalelockz.bmp

238 Bytes
Binary file not shown.
200 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.

radiant/bitmaps/select_mousescale.bmp

238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.

radiant/bitmaps/shadernotex.bmp

4.21 KB
Binary file not shown.

radiant/bitmaps/show_entities.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/splash.bmp

293 KB
Binary file not shown.

radiant/bitmaps/texture_browser.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/texture_lock.bmp

774 Bytes
Binary file not shown.

radiant/bitmaps/textures_popup.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/undo.bmp

776 Bytes
Binary file not shown.

radiant/bitmaps/view_cameratoggle.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/view_cameraupdate.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/view_change.bmp

126 Bytes
Binary file not shown.

radiant/bitmaps/view_clipper.bmp

238 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.

radiant/bitmaps/view_entity.bmp

238 Bytes
Binary file not shown.

radiant/bitmaps/white.bmp

248 Bytes
Binary file not shown.

radiant/bitmaps/window1.bmp

572 Bytes
Binary file not shown.

radiant/bitmaps/window2.bmp

568 Bytes
Binary file not shown.

radiant/bitmaps/window3.bmp

572 Bytes
Binary file not shown.

radiant/bitmaps/window4.bmp

572 Bytes
Binary file not shown.
+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/// ============================================================================
2+
/*
3+
Copyright (C) 2004 Robert Beckebans <[email protected]>
4+
Please see the file "AUTHORS" for a list of contributors
5+
6+
This program is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU General Public License
8+
as published by the Free Software Foundation; either version 2
9+
of the License, or (at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
15+
See the GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program; if not, write to the Free Software
19+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20+
*/
21+
/// ============================================================================
22+
23+
#include "utils.cg"
24+
25+
struct cg_vertex2fragment
26+
{
27+
float4 position : TEXCOORD0;
28+
float4 tex_diffuse_bump : TEXCOORD1;
29+
float4 tex_specular : TEXCOORD2;
30+
float4 tex_atten_xy_z : TEXCOORD3;
31+
32+
float3 tangent : TEXCOORD4;
33+
float3 binormal : TEXCOORD5;
34+
float3 normal : TEXCOORD6;
35+
};
36+
37+
struct cg_fragment2final
38+
{
39+
float4 color : COLOR;
40+
};
41+
42+
43+
cg_fragment2final main(cg_vertex2fragment IN,
44+
uniform sampler2D diffusemap,
45+
uniform sampler2D bumpmap,
46+
uniform sampler2D specularmap,
47+
uniform sampler2D attenuationmap_xy,
48+
uniform sampler2D attenuationmap_z,
49+
uniform float3 view_origin,
50+
uniform float3 light_origin,
51+
uniform float3 light_color,
52+
uniform float bump_scale,
53+
uniform float specular_exponent)
54+
{
55+
cg_fragment2final OUT;
56+
57+
// construct object-space-to-tangent-space 3x3 matrix
58+
float3x3 rotation = float3x3(IN.tangent, IN.binormal, IN.normal);
59+
60+
// compute view direction in tangent space
61+
float3 V = normalize(mul(rotation, view_origin - IN.position.xyz));
62+
63+
// compute light direction in tangent space
64+
float3 L = normalize(mul(rotation, (light_origin - IN.position.xyz)));
65+
66+
// compute half angle in tangent space
67+
float3 H = normalize(L + V);
68+
69+
// compute normal in tangent space from bumpmap
70+
float3 T = CG_Expand(tex2D(bumpmap, IN.tex_diffuse_bump.zw).xyz);
71+
T.z *= bump_scale;
72+
float3 N = normalize(T);
73+
74+
// compute the diffuse term
75+
float4 diffuse = tex2D(diffusemap, IN.tex_diffuse_bump.xy);
76+
diffuse.rgb *= light_color * saturate(dot(N, L));
77+
78+
// compute the specular term
79+
float3 specular = tex2D(specularmap, IN.tex_specular.xy).rgb * light_color * pow(saturate(dot(N, H)), specular_exponent);
80+
81+
// compute attenuation
82+
float3 attenuation_xy = tex2Dproj(attenuationmap_xy, float3(IN.tex_atten_xy_z.x, IN.tex_atten_xy_z.y, IN.tex_atten_xy_z.w)).rgb;
83+
float3 attenuation_z = tex2D(attenuationmap_z, float2(IN.tex_atten_xy_z.z, 0)).rgb;
84+
85+
// compute final color
86+
OUT.color.rgba = diffuse;
87+
OUT.color.rgb += specular;
88+
OUT.color.rgb *= attenuation_xy;
89+
OUT.color.rgb *= attenuation_z;
90+
91+
return OUT;
92+
}
+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/// ============================================================================
2+
/*
3+
Copyright (C) 2004 Robert Beckebans <[email protected]>
4+
Please see the file "AUTHORS" for a list of contributors
5+
6+
This program is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU General Public License
8+
as published by the Free Software Foundation; either version 2
9+
of the License, or (at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
15+
See the GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program; if not, write to the Free Software
19+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20+
*/
21+
/// ============================================================================
22+
23+
24+
struct cg_app2vertex
25+
{
26+
float4 position : POSITION;
27+
float4 tex0 : ATTR8;
28+
29+
float3 tangent : ATTR9;
30+
float3 binormal : ATTR10;
31+
float3 normal : ATTR11;
32+
};
33+
34+
struct cg_vertex2fragment
35+
{
36+
float4 hposition : POSITION;
37+
38+
float4 position : TEXCOORD0;
39+
float4 tex_diffuse_bump : TEXCOORD1;
40+
float4 tex_specular : TEXCOORD2;
41+
float4 tex_atten_xy_z : TEXCOORD3;
42+
43+
float3 tangent : TEXCOORD4;
44+
float3 binormal : TEXCOORD5;
45+
float3 normal : TEXCOORD6;
46+
};
47+
48+
49+
50+
cg_vertex2fragment main(cg_app2vertex IN)
51+
{
52+
cg_vertex2fragment OUT;
53+
54+
// transform vertex position into homogenous clip-space
55+
OUT.hposition = mul(glstate.matrix.mvp, IN.position);
56+
57+
// assign position in object space
58+
OUT.position = IN.position;
59+
60+
// transform texcoords
61+
OUT.tex_diffuse_bump.xy = mul(glstate.matrix.texture[0], IN.tex0).xy;
62+
63+
// transform texcoords
64+
OUT.tex_diffuse_bump.zw = mul(glstate.matrix.texture[1], IN.tex0).xy;
65+
66+
// transform texcoords
67+
OUT.tex_specular = mul(glstate.matrix.texture[2], IN.tex0);
68+
69+
// transform vertex position into light space
70+
OUT.tex_atten_xy_z = mul(glstate.matrix.texture[3], IN.position);
71+
72+
// assign tangent space vectors
73+
OUT.tangent = IN.tangent;
74+
OUT.binormal = IN.binormal;
75+
OUT.normal = IN.normal;
76+
77+
return OUT;
78+
}

radiant/gl/lighting_DBS_omni_fp.glp

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
!!ARBfp1.0
2+
# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
3+
# command line args: -profile arbfp1
4+
# source file: ..\..\setup\data\tools\gl\lighting_DBS_XY_Z_arbfp1.cg
5+
# source file: ..\..\setup\data\tools\gl/utils.cg
6+
#vendor NVIDIA Corporation
7+
#version 1.0.02
8+
#profile arbfp1
9+
#program main
10+
#semantic main.diffusemap
11+
#semantic main.bumpmap
12+
#semantic main.specularmap
13+
#semantic main.attenuationmap_xy
14+
#semantic main.attenuationmap_z
15+
#semantic main.view_origin
16+
#semantic main.light_origin
17+
#semantic main.light_color
18+
#semantic main.bump_scale
19+
#semantic main.specular_exponent
20+
#var float4 IN.position : $vin.TEX0 : TEX0 : 0 : 1
21+
#var float4 IN.tex_diffuse_bump : $vin.TEX1 : TEX1 : 0 : 1
22+
#var float4 IN.tex_specular : $vin.TEX2 : TEX2 : 0 : 1
23+
#var float4 IN.tex_atten_xy_z : $vin.TEX3 : TEX3 : 0 : 1
24+
#var float3 IN.tangent : $vin.TEX4 : TEX4 : 0 : 1
25+
#var float3 IN.binormal : $vin.TEX5 : TEX5 : 0 : 1
26+
#var float3 IN.normal : $vin.TEX6 : TEX6 : 0 : 1
27+
#var sampler2D diffusemap : : texunit 0 : 1 : 1
28+
#var sampler2D bumpmap : : texunit 1 : 2 : 1
29+
#var sampler2D specularmap : : texunit 2 : 3 : 1
30+
#var sampler2D attenuationmap_xy : : texunit 3 : 4 : 1
31+
#var sampler2D attenuationmap_z : : texunit 4 : 5 : 1
32+
#var float3 view_origin : : c[4] : 6 : 1
33+
#var float3 light_origin : : c[2] : 7 : 1
34+
#var float3 light_color : : c[3] : 8 : 1
35+
#var float bump_scale : : c[1] : 9 : 1
36+
#var float specular_exponent : : c[5] : 10 : 1
37+
#var float4 main.color : $vout.COL : COL : -1 : 1
38+
#const c[0] = 0.5 2 0
39+
PARAM c[6] = { { 0.5, 2, 0 },
40+
program.local[1..5] };
41+
TEMP R0;
42+
TEMP R1;
43+
TEMP R2;
44+
ADD R1.xyz, -fragment.texcoord[0], c[2];
45+
DP3 R0.z, fragment.texcoord[6], R1;
46+
DP3 R0.x, fragment.texcoord[4], R1;
47+
DP3 R0.y, fragment.texcoord[5], R1;
48+
ADD R1.xyz, -fragment.texcoord[0], c[4];
49+
DP3 R0.w, R0, R0;
50+
DP3 R2.z, fragment.texcoord[6], R1;
51+
DP3 R2.x, fragment.texcoord[4], R1;
52+
DP3 R2.y, fragment.texcoord[5], R1;
53+
RSQ R0.w, R0.w;
54+
MUL R1.xyz, R0.w, R0;
55+
DP3 R1.w, R2, R2;
56+
RSQ R0.w, R1.w;
57+
MUL R2.xyz, R0.w, R2;
58+
ADD R2.xyz, R1, R2;
59+
DP3 R0.w, R2, R2;
60+
RSQ R2.w, R0.w;
61+
TEX R0.xyz, fragment.texcoord[1].zwzw, texture[1], 2D;
62+
ADD R0.xyz, R0, -c[0].x;
63+
MUL R0.xyz, R0, c[0].y;
64+
MUL R0.z, R0, c[1].x;
65+
DP3 R1.w, R0, R0;
66+
RSQ R0.w, R1.w;
67+
MUL R0.xyz, R0.w, R0;
68+
MUL R2.xyz, R2.w, R2;
69+
DP3_SAT R0.w, R0, R2;
70+
DP3_SAT R0.x, R0, R1;
71+
TEX R2.xyz, fragment.texcoord[2], texture[2], 2D;
72+
MUL R1.xyz, R2, c[3];
73+
POW R0.w, R0.w, c[5].x;
74+
MUL R2.xyz, R1, R0.w;
75+
MUL R1.xyz, R0.x, c[3];
76+
TEX R0, fragment.texcoord[1], texture[0], 2D;
77+
MAD R2.xyz, R0, R1, R2;
78+
TXP R0.xyz, fragment.texcoord[3], texture[3], 2D;
79+
MOV R1.y, c[0].z;
80+
MOV R1.x, fragment.texcoord[3].z;
81+
TEX R1.xyz, R1, texture[4], 2D;
82+
MUL R0.xyz, R2, R0;
83+
MUL result.color.xyz, R0, R1;
84+
MOV result.color.w, R0;
85+
END
86+
# 41 instructions, 3 R-regs

radiant/gl/lighting_DBS_omni_fp.glsl

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/// ============================================================================
2+
/*
3+
Copyright (C) 2004 Robert Beckebans <[email protected]>
4+
Please see the file "CONTRIBUTORS" for a list of contributors
5+
6+
This program is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public License
8+
as published by the Free Software Foundation; either version 2
9+
of the License, or (at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
15+
See the GNU Lesser General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public License
18+
along with this program; if not, write to the Free Software
19+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20+
*/
21+
/// ============================================================================
22+
23+
uniform sampler2D u_diffusemap;
24+
uniform sampler2D u_bumpmap;
25+
uniform sampler2D u_specularmap;
26+
uniform sampler2D u_attenuationmap_xy;
27+
uniform sampler2D u_attenuationmap_z;
28+
uniform vec3 u_view_origin;
29+
uniform vec3 u_light_origin;
30+
uniform vec3 u_light_color;
31+
uniform float u_bump_scale;
32+
uniform float u_specular_exponent;
33+
34+
varying vec3 var_vertex;
35+
varying vec4 var_tex_diffuse_bump;
36+
varying vec2 var_tex_specular;
37+
varying vec4 var_tex_atten_xy_z;
38+
varying mat3 var_mat_os2ts;
39+
40+
void main()
41+
{
42+
// compute view direction in tangent space
43+
vec3 V = normalize(var_mat_os2ts * (u_view_origin - var_vertex));
44+
45+
// compute light direction in tangent space
46+
vec3 L = normalize(var_mat_os2ts * (u_light_origin - var_vertex));
47+
48+
// compute half angle in tangent space
49+
vec3 H = normalize(L + V);
50+
51+
// compute normal in tangent space from bumpmap
52+
vec3 N = 2.0 * (texture2D(u_bumpmap, var_tex_diffuse_bump.pq).xyz - 0.5);
53+
N.z *= u_bump_scale;
54+
N = normalize(N);
55+
56+
// compute the diffuse term
57+
vec4 diffuse = texture2D(u_diffusemap, var_tex_diffuse_bump.st);
58+
diffuse.rgb *= u_light_color * clamp(dot(N, L), 0.0, 1.0);
59+
60+
// compute the specular term
61+
vec3 specular = texture2D(u_specularmap, var_tex_specular).rgb * u_light_color * pow(clamp(dot(N, H), 0.0, 1.0), u_specular_exponent);
62+
63+
// compute attenuation
64+
vec3 attenuation_xy = texture2DProj(u_attenuationmap_xy, vec3(var_tex_atten_xy_z.x, var_tex_atten_xy_z.y, var_tex_atten_xy_z.w)).rgb;
65+
vec3 attenuation_z = texture2D(u_attenuationmap_z, vec2(var_tex_atten_xy_z.z, 0)).rgb;
66+
67+
// compute final color
68+
gl_FragColor.rgba = diffuse;
69+
gl_FragColor.rgb += specular;
70+
gl_FragColor.rgb *= attenuation_xy;
71+
gl_FragColor.rgb *= attenuation_z;
72+
}
73+

0 commit comments

Comments
 (0)