Lazy shader update. attribute -> ATTRIBUTE, varying -> VARYING. Moved some shader preprocessor stuff from llviewershadermgr.cpp to llshadermgr.cpp to match LL (although it looks more messy)

This commit is contained in:
Shyotl
2011-11-24 01:03:03 -06:00
parent 08d2c17c65
commit 8e7733b2ce
108 changed files with 263 additions and 232 deletions

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;