diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-04-18 08:20:26 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-04-18 08:20:26 -0700 |
commit | 3200f07ae26d063b7d91cf77b40b717a83ee1a95 (patch) | |
tree | 1984924112bf711c76cedf568f09fc5fc99de12f /indra/newview | |
parent | afe8d2246e64c964f3b0a6b045770aefedfd9cea (diff) |
NORSPEC-125 Materials V shader cleansing
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialV.glsl | 22 |
2 files changed, 17 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 55d15ce847..71e8e430e5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -46,10 +46,14 @@ ATTRIBUTE vec2 texcoord2; #ifdef HAS_SKIN mat4 getObjectSkinnedTransform(); -#elif IS_AVATAR_SKIN +#else + +#ifdef IS_AVATAR_SKIN mat4 getSkinnedTransform(); #endif +#endif + vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); void calcAtmospherics(vec3 inPositionEye); diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl index 6475d8d003..88095a81e8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#if HAS_SKIN +#ifdef HAS_SKIN uniform mat4 modelview_matrix; uniform mat4 projection_matrix; mat4 getObjectSkinnedTransform(); @@ -64,7 +64,7 @@ VARYING vec2 vary_texcoord0; void main() { -#if HAS_SKIN +#ifdef HAS_SKIN mat4 mat = getObjectSkinnedTransform(); mat = modelview_matrix * mat; @@ -89,7 +89,7 @@ void main() vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy; #endif -#if HAS_SKIN +#ifdef HAS_SKIN vec3 n = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); #if HAS_NORMAL_MAP vec3 b = normalize((mat*vec4(binormal.xyz+position.xyz,1.0)).xyz-pos.xyz); @@ -98,10 +98,11 @@ void main() vary_mat0 = vec3(t.x, b.x, n.x); vary_mat1 = vec3(t.y, b.y, n.y); vary_mat2 = vec3(t.z, b.z, n.z); -#else //HAS_NORMAL_MAP -vary_normal = n; -#endif //HAS_NORMAL_MAP -#else //HAS_SKIN +#else + vary_normal = n; +#endif + +#else vec3 n = normalize(normal_matrix * normal); #if HAS_NORMAL_MAP vec3 b = normalize(normal_matrix * binormal); @@ -110,10 +111,11 @@ vary_normal = n; vary_mat0 = vec3(t.x, b.x, n.x); vary_mat1 = vec3(t.y, b.y, n.y); vary_mat2 = vec3(t.z, b.z, n.z); -#else //HAS_NORMAL_MAP +#else vary_normal = n; -#endif //HAS_NORMAL_MAP -#endif //HAS_SKIN +#endif + +#endif vertex_color = diffuse_color; } |