Add 'DECLAMP' to gl's default2d, so mods can display render targets a bit more easily without needing custom glsl.
Fix dumb issues with the recent gltf2 extensions. Fix r_fog_linear compile issues in the vulkan renderer.
This commit is contained in:
parent
f35c156800
commit
3837beb84e
14 changed files with 4290 additions and 4060 deletions
|
@ -2050,12 +2050,12 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
|
|||
nopermutation |= PERMUTATION_SKELETAL;
|
||||
|
||||
//multiple lightmaps is kinda hacky. if any are set, all must be.
|
||||
#define ALTLIGHTMAPSAMP 16
|
||||
if (prog->defaulttextures & ((1u<<(ALTLIGHTMAPSAMP+0)) | (1u<<(ALTLIGHTMAPSAMP+1)) | (1u<<(ALTLIGHTMAPSAMP+2))))
|
||||
prog->defaulttextures |=((1u<<(ALTLIGHTMAPSAMP+0)) | (1u<<(ALTLIGHTMAPSAMP+1)) | (1u<<(ALTLIGHTMAPSAMP+2)));
|
||||
#define ALTDELUXMAPSAMP 19
|
||||
if (prog->defaulttextures & ((1u<<(ALTDELUXMAPSAMP+0)) | (1u<<(ALTDELUXMAPSAMP+1)) | (1u<<(ALTDELUXMAPSAMP+2))))
|
||||
prog->defaulttextures |=((1u<<(ALTDELUXMAPSAMP+0)) | (1u<<(ALTDELUXMAPSAMP+1)) | (1u<<(ALTDELUXMAPSAMP+2)));
|
||||
#if MAXRLIGHTMAPS > 1
|
||||
if (prog->defaulttextures & ((1u<<S_LIGHTMAP1 ) | (1u<<S_LIGHTMAP2 ) | (1u<<S_LIGHTMAP3 )))
|
||||
prog->defaulttextures |=((1u<<S_LIGHTMAP1 ) | (1u<<S_LIGHTMAP2 ) | (1u<<S_LIGHTMAP3 ));
|
||||
if (prog->defaulttextures & ((1u<<S_DELUXEMAP1) | (1u<<S_DELUXEMAP2) | (1u<<S_DELUXEMAP3)))
|
||||
prog->defaulttextures |=((1u<<S_DELUXEMAP1) | (1u<<S_DELUXEMAP2) | (1u<<S_DELUXEMAP3));
|
||||
#endif
|
||||
|
||||
for (end = *name?strchr(name+1, '#'):NULL; end && *end; )
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,10 @@ void main ()
|
|||
vec4 f = vc;
|
||||
#ifdef PREMUL
|
||||
f.rgb *= f.a;
|
||||
#endif
|
||||
#ifdef DECLAMP
|
||||
vec2 ntc = fract(tc);
|
||||
#define tc ntc
|
||||
#endif
|
||||
f *= texture2D(s_img, tc);
|
||||
gl_FragColor = f;
|
||||
|
|
|
@ -260,6 +260,10 @@ int generatevulkanblobs(struct blobheader *blob, size_t maxblobsize, const char
|
|||
blob->defaulttextures |= 1u<<S_DISPLACEMENT;
|
||||
else if (!strcasecmp(arg, "occlusion"))
|
||||
blob->defaulttextures |= 1u<<S_OCCLUSION;
|
||||
else if (!strcasecmp(arg, "transmission"))
|
||||
blob->defaulttextures |= 1u<<S_TRANSMISSION;
|
||||
else if (!strcasecmp(arg, "thickness"))
|
||||
blob->defaulttextures |= 1u<<S_THICKNESS;
|
||||
|
||||
//batch
|
||||
else if (!strcasecmp(arg, "lightmap"))
|
||||
|
@ -326,6 +330,8 @@ int generatevulkanblobs(struct blobheader *blob, size_t maxblobsize, const char
|
|||
"uniform sampler2D s_reflectmask;\n",
|
||||
"uniform sampler2D s_displacement;\n",
|
||||
"uniform sampler2D s_occlusion;\n",
|
||||
"uniform sampler2D s_transmission;\n",
|
||||
"uniform sampler2D s_thickness;\n",
|
||||
|
||||
//batch
|
||||
"uniform sampler2D s_lightmap;\n#define s_lightmap0 s_lightmap\n",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
!!permu FOG
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
!!cvarf r_glsl_turbscale_reflect=1
|
||||
!!cvarf r_glsl_turbscale_refract=1
|
||||
!!cvarf gl_maxdist=8192
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
!!samps 1
|
||||
!!argf MASK=0
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
|
||||
//used by both particles and sprites.
|
||||
//note the fog blending mode is all that differs from defaultadditivesprite
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
!!cvarf r_glsl_offsetmapping_scale=0.04
|
||||
!!cvarf gl_specular=0
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
!!samps diffuse normalmap upper lower specular fullbright reflectcube reflectmask
|
||||
|
||||
#include "sys/defs.h"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
!!permu FOG
|
||||
!!samps 2
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
|
||||
#include "sys/defs.h"
|
||||
#include "sys/fog.h"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
!!permu FOG
|
||||
!!samps reflectcube
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
#include "sys/defs.h"
|
||||
#include "sys/fog.h"
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
!!samps 1
|
||||
!!argf MASK=0
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
|
||||
//used by both particles and sprites.
|
||||
//note the fog blending mode is all that differs from defaultadditivesprite
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
!!cvarf r_glsl_offsetmapping_scale=0.04
|
||||
!!cvarf gl_specular=0.3
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
!!samps diffuse normalmap specular fullbright lightmap
|
||||
!!samps deluxemap reflectmask reflectcube
|
||||
!!argb vertexlit=0
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
!!permu FOG
|
||||
!!cvarf r_wateralpha=1
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
!!argf alpha=0
|
||||
!!argb lit=false
|
||||
!!samps diffuse lightmap
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
!!cvar3f r_floorcolor=0.5,0.5,0.5
|
||||
!!cvar3f r_wallcolor=0.25,0.25,0.5
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
!!samps 1
|
||||
#include "sys/defs.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
!!argb cube=0
|
||||
!!permu FOG
|
||||
!!cvarb r_fog_exp2=true
|
||||
!!cvarb r_fog_linear=false
|
||||
//!!permu FRAMEBLEND
|
||||
//!!permu SKELETAL
|
||||
|
||||
|
|
Loading…
Reference in a new issue