1
0
Fork 0
forked from fte/fteqw

misc fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4404 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-06-26 00:39:13 +00:00
parent 7a70549690
commit 138eecf7d7
4 changed files with 13 additions and 13 deletions

View file

@ -1085,8 +1085,8 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
{
if (prog->permu[p].handle.glsl)
qglDeleteProgramObject_(prog->permu[p].handle.glsl);
prog->permu[p].handle.glsl = GLSlang_CreateProgram(name, (((p & PERMUTATION_SKELETAL) && ver < 120)?120:ver), permutationdefines, script, script, onefailed);
if (!prog->permu[p].handle.glsl)
prog->permu[p].handle.glsl = GLSlang_CreateProgram(name, (((p & PERMUTATION_SKELETAL) && ver < 120)?120:ver), permutationdefines, script, script, (p & PERMUTATION_SKELETAL)?true:onefailed);
if (!prog->permu[p].handle.glsl && !(p & PERMUTATION_SKELETAL))
onefailed = true;
if (!p && !prog->permu[p].handle.glsl)
break;

View file

@ -1612,7 +1612,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
//s0=diffuse, s1=normal, s2=specular, s3=shadowmap
//custom modifiers:
//PCF(shadowmap)
//CUBEPROJ(projected cubemap)
//CUBE(projected cubemap)
//SPOT(projected circle
//CUBESHADOW
@ -1632,7 +1632,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
"varying vec3 eyevector;\n"
"#endif\n"
"#if defined(PCF) || defined(CUBEPROJ) || defined(SPOT)\n"
"#if defined(PCF) || defined(CUBE) || defined(SPOT)\n"
"varying vec4 vtexprojcoord;\n"
"uniform mat4 l_cubematrix;\n"
"#ifndef SPOT\n"
@ -1661,7 +1661,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
"eyevector.y = dot(eyeminusvertex, t.xyz);\n"
"eyevector.z = dot(eyeminusvertex, n.xyz);\n"
"#endif\n"
"#if defined(PCF) || defined(SPOT) || defined(PROJECTION)\n"
"#if defined(PCF) || defined(SPOT) || defined(CUBE)\n"
//for texture projections/shadowmapping on dlights
"vtexprojcoord = (l_cubematrix*vec4(w.xyz, 1.0));\n"
"#endif\n"
@ -1681,7 +1681,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
"#ifdef SPECULAR\n"
"uniform sampler2D s_t2; //specular\n"
"#endif\n"
"#ifdef CUBEPROJ\n"
"#ifdef CUBE\n"
"uniform samplerCube s_t3; //projected cubemap\n"
"#endif\n"
"#ifdef PCF\n"
@ -1850,7 +1850,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
"#ifdef CUBEPROJ\n"
"#ifdef CUBE\n"
/*filter the colour by the cubemap projection*/
"diff *= textureCube(s_t3, vtexprojcoord.xyz).rgb;\n"
"#endif\n"

View file

@ -466,7 +466,7 @@ void World_LinkEdict (world_t *w, wedict_t *ent, qboolean touch_triggers)
}
// link to PVS leafs
if (w->worldmodel)
if (w->worldmodel && !w->worldmodel->needload)
{
w->worldmodel->funcs.FindTouchedLeafs(w->worldmodel, &ent->pvsinfo, ent->v->absmin, ent->v->absmax);
}

View file

@ -10,7 +10,7 @@
//s0=diffuse, s1=normal, s2=specular, s3=shadowmap
//custom modifiers:
//PCF(shadowmap)
//CUBEPROJ(projected cubemap)
//CUBE(projected cubemap)
//SPOT(projected circle
//CUBESHADOW
@ -30,7 +30,7 @@ varying vec3 lightvector;
varying vec3 eyevector;
#endif
#if defined(PCF) || defined(CUBEPROJ) || defined(SPOT)
#if defined(PCF) || defined(CUBE) || defined(SPOT)
varying vec4 vtexprojcoord;
uniform mat4 l_cubematrix;
#ifndef SPOT
@ -59,7 +59,7 @@ void main ()
eyevector.y = dot(eyeminusvertex, t.xyz);
eyevector.z = dot(eyeminusvertex, n.xyz);
#endif
#if defined(PCF) || defined(SPOT) || defined(PROJECTION)
#if defined(PCF) || defined(SPOT) || defined(CUBE)
//for texture projections/shadowmapping on dlights
vtexprojcoord = (l_cubematrix*vec4(w.xyz, 1.0));
#endif
@ -79,7 +79,7 @@ uniform sampler2D s_t1; //normalmap
#ifdef SPECULAR
uniform sampler2D s_t2; //specular
#endif
#ifdef CUBEPROJ
#ifdef CUBE
uniform samplerCube s_t3; //projected cubemap
#endif
#ifdef PCF
@ -248,7 +248,7 @@ void main ()
#ifdef CUBEPROJ
#ifdef CUBE
/*filter the colour by the cubemap projection*/
diff *= textureCube(s_t3, vtexprojcoord.xyz).rgb;
#endif