mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
fixed formatting of a few GLSL float constants
remove unneeded version number from texturecolor shader call GLSL_VertexAttribPointers after attribute arrays have been enabled
This commit is contained in:
parent
4520857fc9
commit
25bde423b5
4 changed files with 118 additions and 123 deletions
|
@ -160,7 +160,7 @@ vec3 EnvironmentBRDF(float gloss, float NE, vec3 specular)
|
|||
{
|
||||
#if 1
|
||||
// from http://blog.selfshadow.com/publications/s2013-shading-course/lazarov/s2013_pbs_black_ops_2_notes.pdf
|
||||
vec4 t = vec4( 1/0.96, 0.475, (0.0275 - 0.25 * 0.04)/0.96,0.25 ) * gloss;
|
||||
vec4 t = vec4( 1.0/0.96, 0.475, (0.0275 - 0.25 * 0.04)/0.96,0.25 ) * gloss;
|
||||
t += vec4( 0.0, 0.0, (0.015 - 0.75 * 0.04)/0.96,0.75 );
|
||||
float a0 = t.x * min( t.y, exp2( -9.28 * NE ) ) + t.z;
|
||||
float a1 = t.w;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D u_DiffuseMap;
|
||||
uniform vec4 u_Color;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#version 120
|
||||
|
||||
attribute vec3 attr_Position;
|
||||
attribute vec4 attr_TexCoord0;
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLcharARB *extra, cha
|
|||
// va("#ifndef r_NormalScale\n#define r_NormalScale %f\n#endif\n", r_normalScale->value));
|
||||
|
||||
|
||||
Q_strcat(dest, size, "#ifndef M_PI\n#define M_PI 3.14159265358979323846f\n#endif\n");
|
||||
Q_strcat(dest, size, "#ifndef M_PI\n#define M_PI 3.14159265358979323846\n#endif\n");
|
||||
|
||||
//Q_strcat(dest, size, va("#ifndef MAX_SHADOWMAPS\n#define MAX_SHADOWMAPS %i\n#endif\n", MAX_SHADOWMAPS));
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ void GLSL_InitGPUShaders(void)
|
|||
|
||||
Q_strcat(extradefines, 1024, "#define USE_SHADOW_CASCADE\n");
|
||||
|
||||
Q_strcat(extradefines, 1024, va("#define r_shadowMapSize %d\n", r_shadowMapSize->integer));
|
||||
Q_strcat(extradefines, 1024, va("#define r_shadowMapSize %f\n", r_shadowMapSize->value));
|
||||
Q_strcat(extradefines, 1024, va("#define r_shadowCascadeZFar %f\n", r_shadowCascadeZFar->value));
|
||||
|
||||
|
||||
|
@ -1479,14 +1479,10 @@ void GLSL_VertexAttribsState(uint32_t stateBits)
|
|||
{
|
||||
uint32_t diff;
|
||||
|
||||
GLSL_VertexAttribPointers(stateBits);
|
||||
|
||||
diff = stateBits ^ glState.vertexAttribsState;
|
||||
if(!diff)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(diff)
|
||||
{
|
||||
if(diff & ATTR_POSITION)
|
||||
{
|
||||
if(stateBits & ATTR_POSITION)
|
||||
|
@ -1630,6 +1626,9 @@ void GLSL_VertexAttribsState(uint32_t stateBits)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
GLSL_VertexAttribPointers(stateBits);
|
||||
|
||||
glState.vertexAttribsState = stateBits;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue