Merge branch 'future' of https://github.com/Shyotl/SingularityViewer into renderer32

This commit is contained in:
Siana Gearz
2011-12-01 16:51:43 +01:00
120 changed files with 298 additions and 251 deletions

View File

@@ -194,7 +194,12 @@ public:
}
protected:
LLInstanceTracker(KEY key) { add_(key); }
LLInstanceTracker(KEY key)
{
// make sure static data outlives all instances
getStatic();
add_(key);
}
virtual ~LLInstanceTracker()
{
// it's unsafe to delete instances of this type while all instances are being iterated over.
@@ -282,7 +287,8 @@ public:
protected:
LLInstanceTracker()
{
// it's safe but unpredictable to create instances of this type while all instances are being iterated over. I hate unpredictable. This assert will probably be turned on early in the next development cycle.
// make sure static data outlives all instances
getStatic();
getSet_().insert(static_cast<T*>(this));
}
virtual ~LLInstanceTracker()

View File

@@ -4320,15 +4320,25 @@ S32 LLVolume::getNumTriangleIndices() const
}
S32 LLVolume::getNumTriangles() const
S32 LLVolume::getNumTriangles(S32* vcount) const
{
U32 triangle_count = 0;
U32 vertex_count = 0;
for (S32 i = 0; i < getNumVolumeFaces(); ++i)
{
triangle_count += getVolumeFace(i).mNumIndices/3;
const LLVolumeFace& face = getVolumeFace(i);
triangle_count += face.mNumIndices/3;
vertex_count += face.mNumVertices;
}
if (vcount)
{
*vcount = vertex_count;
}
return triangle_count;
}

View File

@@ -1016,7 +1016,7 @@ public:
S32 getNumTriangleIndices() const;
static void getLoDTriangleCounts(const LLVolumeParams& params, S32* counts);
S32 getNumTriangles() const;
S32 getNumTriangles(S32* vcount = NULL) const;
void generateSilhouetteVertices(std::vector<LLVector3> &vertices,
std::vector<LLVector3> &normals,

View File

@@ -174,8 +174,8 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp)
mMode = data[0];
mFace = data[1];
mSizeX = llmax((U8)1, data[2]);
mSizeY = llmax((U8)1, data[3]);
mSizeX = data[2];
mSizeY = data[3];
htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32));
htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32));
htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32));

View File

@@ -1186,7 +1186,7 @@ void rotate_quat(LLQuaternion& rotation)
{
F32 angle_radians, x, y, z;
rotation.getAngleAxis(&angle_radians, &x, &y, &z);
glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
}
void flush_glerror()

View File

@@ -1749,7 +1749,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
// this to be an intentional effect and don't treat as a mask.
U32 midrangetotal = 0;
for (U32 i = 4; i < 11; i++)
for (U32 i = 2; i < 13; i++)
{
midrangetotal += sample[i];
}
@@ -1764,7 +1764,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
upperhalftotal += sample[i];
}
if (midrangetotal > length/16 || // lots of midrange, or
if (midrangetotal > length/48 || // lots of midrange, or
(lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
{

View File

@@ -543,22 +543,52 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//we can't have any lines longer than 1024 characters
//or any shaders longer than 1024 lines... deal - DaveP
GLcharARB buff[1024] = {0};
GLcharARB* text[1024] = {0};
GLcharARB buff[1024];
GLcharARB* text[4096];
GLuint count = 0;
if (gGLManager.mGLVersion < 2.1f)
F32 version = gGLManager.mGLVersion;
if (version < 2.1f)
{
text[count++] = strdup("#version 110\n");
text[count++] = strdup("#define ATTRIBUTE attribute\n");
text[count++] = strdup("#define VARYING varying\n");
}
else if (gGLManager.mGLVersion < 3.f)
else if (version < 3.f)
{
//set version to 1.20
text[count++] = strdup("#version 120\n");
text[count++] = strdup("#define ATTRIBUTE attribute\n");
text[count++] = strdup("#define VARYING varying\n");
}
else
{ //set version to 1.30
text[count++] = strdup("#version 130\n");
text[count++] = strdup("#define ATTRIBUTE in\n");
if (type == GL_VERTEX_SHADER_ARB)
{ //"varying" state is "out" in a vertex program, "in" in a fragment program
// ("varying" is deprecated after version 1.20)
text[count++] = strdup("#define VARYING out\n");
}
else
{
text[count++] = strdup("#define VARYING in\n");
}
//backwards compatibility with legacy texture lookup syntax
text[count++] = strdup("#define textureCube texture\n");
text[count++] = strdup("#define texture2DLod textureLod\n");
text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n"); //Shadow lookups only return a single float.
//Also deprecated:
text[count++] = strdup("#define texture2D texture\n");
text[count++] = strdup("#define texture2DRect texture\n");
text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n");
//Will go away soon:
text[count++] = strdup("#define ftransform() gl_ModelViewProjectionMatrix * gl_Vertex\n");
}
//copy preprocessor definitions into buffer
@@ -608,8 +638,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup(decl.c_str());
}
if(texture_index_channels != 1)
text[count++] = strdup("varying float vary_texture_index;\n");
if (texture_index_channels > 1)
{
text[count++] = strdup("VARYING float vary_texture_index;\n");
}
text[count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
text[count++] = strdup("{\n");
@@ -659,8 +692,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup("}\n");
}
}
//copy file into memory
while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(buff) )
while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(text) )
{
text[count++] = (GLcharARB *)strdup((char *)buff);
}
@@ -735,6 +769,14 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
for (GLuint i = 0; i < count; i++)
{
ostr << i << ": " << text[i];
if (i % 128 == 0)
{ //dump every 128 lines
LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
ostr = std::stringstream();
}
}
LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;

View File

@@ -665,7 +665,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
F32 offset_x = F32(width/2);
F32 offset_y = F32(height/2);
gGL.translatef( offset_x, offset_y, 0.f);
glRotatef( degrees, 0.f, 0.f, 1.f );
gGL.rotatef( degrees, 0.f, 0.f, 1.f );
gGL.translatef( -offset_x, -offset_y, 0.f );
}

View File

@@ -246,7 +246,7 @@ void LLViewBorder::drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32
gGL.pushMatrix();
{
gGL.translatef(start_x, start_y, 0.f);
glRotatef( degrees, 0, 0, 1 );
gGL.rotatef( degrees, 0, 0, 1 );
gGL.begin(LLRender::QUADS);
{

View File

@@ -7,7 +7,7 @@
attribute vec4 weight; //1
ATTRIBUTE vec4 weight; //1
uniform vec4 matrixPalette[45];

View File

@@ -7,7 +7,7 @@
attribute vec4 object_weight;
ATTRIBUTE vec4 object_weight;
uniform mat4 matrixPalette[32];

View File

@@ -20,11 +20,11 @@ uniform vec2 screen_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
uniform mat4 inv_proj;

View File

@@ -20,11 +20,11 @@ uniform vec2 screen_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
uniform mat4 inv_proj;

View File

@@ -18,12 +18,12 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_position;
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_normal;
varying vec3 vary_fragcoord;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_position;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_normal;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_pointlight_col;
uniform float near_clip;

View File

@@ -17,13 +17,13 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_light;
varying vec3 vary_pointlight_col;
varying float vary_texture_index;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_light;
VARYING vec3 vary_pointlight_col;
VARYING float vary_texture_index;
uniform float near_clip;
uniform float shadow_offset;

View File

@@ -19,11 +19,11 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_position;
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_position;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_pointlight_col;
uniform float near_clip;

View File

@@ -9,7 +9,7 @@
uniform sampler2D diffuseMap;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -9,7 +9,7 @@
uniform sampler2D diffuseMap;
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -9,9 +9,9 @@
mat4 getSkinnedTransform();
attribute vec4 weight;
ATTRIBUTE vec4 weight;
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -9,9 +9,9 @@
mat4 getSkinnedTransform();
attribute vec4 weight;
ATTRIBUTE vec4 weight;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -19,7 +19,7 @@ uniform vec2 delta;
uniform vec3 kern[4];
uniform float kern_scale;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;

View File

@@ -7,7 +7,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()

View File

@@ -10,9 +10,9 @@
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
varying vec3 vary_mat0;
varying vec3 vary_mat1;
varying vec3 vary_mat2;
VARYING vec3 vary_mat0;
VARYING vec3 vary_mat1;
VARYING vec3 vary_mat2;
void main()
{

View File

@@ -7,9 +7,9 @@
varying vec3 vary_mat0;
varying vec3 vary_mat1;
varying vec3 vary_mat2;
VARYING vec3 vary_mat0;
VARYING vec3 vary_mat1;
VARYING vec3 vary_mat2;
mat4 getObjectSkinnedTransform();

View File

@@ -7,9 +7,9 @@
varying vec3 vary_mat0;
varying vec3 vary_mat1;
varying vec3 vary_mat2;
VARYING vec3 vary_mat0;
VARYING vec3 vary_mat1;
VARYING vec3 vary_mat2;
void main()
{

View File

@@ -11,9 +11,9 @@
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
varying vec4 vary_CloudColorSun;
varying vec4 vary_CloudColorAmbient;
varying float vary_CloudDensity;
VARYING vec4 vary_CloudColorSun;
VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
uniform sampler2D cloud_noise_texture;
uniform vec4 cloud_pos_density1;

View File

@@ -12,9 +12,9 @@
///////////////////////////////////////////////////////////////////////////////
// Output parameters
varying vec4 vary_CloudColorSun;
varying vec4 vary_CloudColorAmbient;
varying float vary_CloudDensity;
VARYING vec4 vary_CloudColorSun;
VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
// Inputs
uniform vec3 camPosLocal;

View File

@@ -10,7 +10,7 @@ uniform float minimum_alpha;
uniform sampler2D diffuseMap;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
varying vec3 vary_normal;
VARYING vec3 vary_normal;
uniform float minimum_alpha;

View File

@@ -9,7 +9,7 @@
uniform sampler2D diffuseMap;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -5,7 +5,7 @@
* $/LicenseInfo$
*/
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec3 vary_normal;
VARYING vec3 vary_normal;
mat4 getObjectSkinnedTransform();

View File

@@ -7,8 +7,8 @@
varying vec3 vary_normal;
varying float vary_texture_index;
VARYING vec3 vary_normal;
VARYING float vary_texture_index;
void main()
{

View File

@@ -14,7 +14,7 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying float vary_texture_index;
VARYING float vary_texture_index;
void main()
{

View File

@@ -20,7 +20,7 @@ uniform sampler2D depthGIMap;
uniform sampler2D lightFunc;
// Inputs
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;

View File

@@ -7,7 +7,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;

View File

@@ -9,7 +9,7 @@
uniform sampler2DRect diffuseMap;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
void main()
{

View File

@@ -8,7 +8,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;

View File

@@ -27,7 +27,7 @@ uniform int light_count;
uniform vec4 light[MAX_LIGHT_COUNT];
uniform vec4 light_col[MAX_LIGHT_COUNT];
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform float far_z;

View File

@@ -7,7 +7,7 @@
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
void main()
{

View File

@@ -37,9 +37,9 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
varying vec4 vary_light;
VARYING vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;

View File

@@ -20,9 +20,9 @@ uniform sampler2DRect depthMap;
uniform vec3 env_mat[3];
uniform float sun_wash;
varying vec4 vary_light;
VARYING vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;

View File

@@ -7,8 +7,8 @@
varying vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec4 vary_fragcoord;
void main()
{

View File

@@ -25,7 +25,7 @@ uniform float magnification;
uniform mat4 inv_proj;
uniform vec2 screen_res;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
float getDepth(vec2 pos_screen)
{

View File

@@ -13,7 +13,7 @@ uniform sampler2DRect diffuseRect;
uniform sampler2D bloomMap;
uniform vec2 screen_res;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()

View File

@@ -20,7 +20,7 @@ uniform int kern_length;
uniform float kern_scale;
uniform vec3 blur_quad;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;

View File

@@ -7,7 +7,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()

View File

@@ -9,7 +9,7 @@ uniform float minimum_alpha;
uniform sampler2D diffuseMap;
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec4 post_pos;
VARYING vec4 post_pos;
void main()
{

View File

@@ -11,7 +11,7 @@
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
varying vec4 vary_HazeColor;
VARYING vec4 vary_HazeColor;
uniform sampler2D cloud_noise_texture;
uniform vec4 gamma;

View File

@@ -12,7 +12,7 @@
///////////////////////////////////////////////////////////////////////////////
// Output parameters
varying vec4 vary_HazeColor;
VARYING vec4 vary_HazeColor;
// Inputs
uniform vec3 camPosLocal;

View File

@@ -45,8 +45,8 @@ uniform vec3 env_mat[3];
//uniform vec4 shadow_clip;
uniform mat3 ssao_effect_mat;
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;

View File

@@ -40,8 +40,8 @@ uniform vec3 env_mat[3];
//uniform vec4 shadow_clip;
uniform mat3 ssao_effect_mat;
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;

View File

@@ -9,8 +9,8 @@
uniform vec2 screen_res;
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
void main()
{
//transform vertex

View File

@@ -32,9 +32,9 @@ uniform float far_clip;
uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
uniform float sun_wash;
varying vec4 vary_light;
VARYING vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;

View File

@@ -24,8 +24,8 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
varying vec2 vary_fragcoord;
varying vec4 vary_light;
VARYING vec2 vary_fragcoord;
VARYING vec4 vary_light;
uniform mat4 inv_proj;
uniform vec2 screen_res;

View File

@@ -7,8 +7,8 @@
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;

View File

@@ -13,7 +13,7 @@ uniform sampler2D detail_2;
uniform sampler2D detail_3;
uniform sampler2D alpha_ramp;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec3 vary_normal;
VARYING vec3 vary_normal;
vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
{

View File

@@ -9,7 +9,7 @@
uniform sampler2D diffuseMap;
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -7,7 +7,7 @@
varying vec3 vary_normal;
VARYING vec3 vary_normal;
void main()
{

View File

@@ -40,10 +40,10 @@ uniform vec2 screen_res;
uniform mat4 norm_mat; //region space to screen space
//bigWave is (refCoord.w, view.w);
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
varying vec4 vary_position;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
VARYING vec4 vary_position;
void main()
{

View File

@@ -15,11 +15,11 @@ uniform float time;
uniform vec3 eyeVec;
uniform float waterHeight;
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
varying vec4 vary_position;
VARYING vec4 vary_position;
float wave(vec2 v, float t, float f, vec2 d, float s)
{

View File

@@ -15,9 +15,9 @@ uniform float refScale;
uniform vec4 waterFogColor;
//bigWave is (refCoord.w, view.w);
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
void main()
{

View File

@@ -32,9 +32,9 @@ uniform float blurMultiplier;
uniform vec4 fogCol;
//bigWave is (refCoord.w, view.w);
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
void main()
{

View File

@@ -15,9 +15,9 @@ uniform float time;
uniform vec3 eyeVec;
uniform float waterHeight;
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
float wave(vec2 v, float t, float f, vec2 d, float s)
{

View File

@@ -7,7 +7,7 @@
varying vec3 vary_PositionEye;
VARYING vec3 vary_PositionEye;
vec3 getPositionEye()
{

View File

@@ -7,7 +7,7 @@
varying vec3 vary_PositionEye;
VARYING vec3 vary_PositionEye;
vec3 getPositionEye()

View File

@@ -23,11 +23,11 @@ uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
uniform float shadow_bias;

View File

@@ -24,11 +24,11 @@ uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
uniform float shadow_bias;

View File

@@ -17,11 +17,11 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
uniform float near_clip;
uniform float shadow_offset;

View File

@@ -17,12 +17,12 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
varying vec3 vary_pointlight_col;
varying float vary_texture_index;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING float vary_texture_index;
uniform float near_clip;
uniform float shadow_offset;

View File

@@ -19,11 +19,11 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
varying vec3 vary_position;
varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_pointlight_col;
VARYING vec3 vary_position;
VARYING vec3 vary_ambient;
VARYING vec3 vary_directional;
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_pointlight_col;
uniform float near_clip;
uniform float shadow_offset;

View File

@@ -12,7 +12,7 @@
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform float depth_cutoff;
uniform float norm_cutoff;

View File

@@ -7,7 +7,7 @@
varying vec2 vary_fragcoord;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()

View File

@@ -36,9 +36,9 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
varying vec4 vary_light;
VARYING vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;

View File

@@ -47,8 +47,8 @@ uniform mat3 ssao_effect_mat;
uniform mat4 inv_proj;
uniform vec2 screen_res;
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;

View File

@@ -9,8 +9,8 @@
uniform vec2 screen_res;
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
void main()
{
//transform vertex

View File

@@ -35,9 +35,9 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
varying vec4 vary_light;
VARYING vec4 vary_light;
varying vec4 vary_fragcoord;
VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;

View File

@@ -29,8 +29,8 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
varying vec2 vary_fragcoord;
varying vec4 vary_light;
VARYING vec2 vary_fragcoord;
VARYING vec4 vary_light;
uniform mat4 inv_proj;
uniform vec2 screen_res;

View File

@@ -29,8 +29,8 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
varying vec2 vary_fragcoord;
varying vec4 vary_light;
VARYING vec2 vary_fragcoord;
VARYING vec4 vary_light;
uniform mat4 inv_proj;
uniform vec2 screen_res;

View File

@@ -7,8 +7,8 @@
varying vec4 vary_light;
varying vec2 vary_fragcoord;
VARYING vec4 vary_light;
VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;

View File

@@ -11,7 +11,7 @@
uniform sampler2DRect RenderTexture;
uniform float bloomStrength;
varying vec4 gl_TexCoord[gl_MaxTextureCoords];
VARYING vec4 gl_TexCoord[gl_MaxTextureCoords];
float blurWeights[4] = float[4](.05,.1,.2,.3);

View File

@@ -30,9 +30,9 @@ uniform float waterFogKS;
uniform vec2 screenRes;
//bigWave is (refCoord.w, view.w);
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
vec4 applyWaterFog(vec4 color, vec3 viewVec)
{

View File

@@ -29,9 +29,9 @@ uniform float blurMultiplier;
//bigWave is (refCoord.w, view.w);
varying vec4 refCoord;
varying vec4 littleWave;
varying vec4 view;
VARYING vec4 refCoord;
VARYING vec4 littleWave;
VARYING vec4 view;
void main()
{

View File

@@ -11,7 +11,7 @@ void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
varying float vary_texture_index;
VARYING float vary_texture_index;
void main()
{

View File

@@ -9,7 +9,7 @@
void calcAtmospherics(vec3 inPositionEye);
varying float vary_texture_index;
VARYING float vary_texture_index;
void main()
{

View File

@@ -11,7 +11,7 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
varying float vary_texture_index;
VARYING float vary_texture_index;
uniform vec4 origin;

View File

@@ -10,7 +10,7 @@
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
varying float vary_texture_index;
VARYING float vary_texture_index;
void main()
{

View File

@@ -7,7 +7,7 @@
// varying param funcs
// VARYING param funcs
void setSunlitColor(vec3 v);
void setAmblitColor(vec3 v);
void setAdditiveColor(vec3 v);
@@ -16,8 +16,8 @@ void setPositionEye(vec3 v);
vec3 getAdditiveColor();
//varying vec4 vary_CloudUVs;
//varying float vary_CloudDensity;
//VARYING vec4 vary_CloudUVs;
//VARYING float vary_CloudDensity;
// Inputs
uniform vec4 morphFactor;

View File

@@ -7,12 +7,12 @@
varying vec3 vary_PositionEye;
VARYING vec3 vary_PositionEye;
varying vec3 vary_SunlitColor;
varying vec3 vary_AmblitColor;
varying vec3 vary_AdditiveColor;
varying vec3 vary_AtmosAttenuation;
VARYING vec3 vary_SunlitColor;
VARYING vec3 vary_AmblitColor;
VARYING vec3 vary_AdditiveColor;
VARYING vec3 vary_AtmosAttenuation;
vec3 getPositionEye()
{

View File

@@ -7,12 +7,12 @@
varying vec3 vary_PositionEye;
VARYING vec3 vary_PositionEye;
varying vec3 vary_SunlitColor;
varying vec3 vary_AmblitColor;
varying vec3 vary_AdditiveColor;
varying vec3 vary_AtmosAttenuation;
VARYING vec3 vary_SunlitColor;
VARYING vec3 vary_AmblitColor;
VARYING vec3 vary_AdditiveColor;
VARYING vec3 vary_AtmosAttenuation;
vec3 getPositionEye()
{

View File

@@ -11,9 +11,9 @@
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
varying vec4 vary_CloudColorSun;
varying vec4 vary_CloudColorAmbient;
varying float vary_CloudDensity;
VARYING vec4 vary_CloudColorSun;
VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
uniform sampler2D cloud_noise_texture;
uniform vec4 cloud_pos_density1;

View File

@@ -12,9 +12,9 @@
///////////////////////////////////////////////////////////////////////////////
// Output parameters
varying vec4 vary_CloudColorSun;
varying vec4 vary_CloudColorAmbient;
varying float vary_CloudDensity;
VARYING vec4 vary_CloudColorSun;
VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
// Inputs
uniform vec3 camPosLocal;

View File

@@ -11,7 +11,7 @@
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
varying vec4 vary_HazeColor;
VARYING vec4 vary_HazeColor;
uniform sampler2D cloud_noise_texture;
uniform vec4 gamma;

View File

@@ -12,7 +12,7 @@
///////////////////////////////////////////////////////////////////////////////
// Output parameters
varying vec4 vary_HazeColor;
VARYING vec4 vary_HazeColor;
// Inputs
uniform vec3 camPosLocal;

View File

@@ -11,11 +11,11 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
void calcAtmospherics(vec3 inPositionEye);
attribute vec4 clothing; //4
ATTRIBUTE vec4 clothing; //4
attribute vec4 gWindDir; //7
attribute vec4 gSinWaveParams; //3
attribute vec4 gGravity; //5
ATTRIBUTE vec4 gWindDir; //7
ATTRIBUTE vec4 gSinWaveParams; //3
ATTRIBUTE vec4 gGravity; //5
const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542); // #minimax-generated coefficients
const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); // # {1/2PI, 2PI, PI, PI/2}

Some files were not shown because too many files have changed in this diff Show More