diff options
author | Dave Parks <davep@lindenlab.com> | 2013-04-17 01:51:39 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-04-17 01:51:39 -0500 |
commit | 67af268b785e8a47d7db10aa3a566c269b0f16e3 (patch) | |
tree | 91ca41223c659e6004352dc5bd9b407aa2b02c13 /indra/newview/app_settings/shaders/class1/deferred/materialV.glsl | |
parent | c72c3691ecf83875d4ee3e0784b3e76cb4b4633a (diff) |
NORSPEC-90 Alpha pool hookups for materials.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/materialV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialV.glsl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl index 6475d8d003..f578795abe 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl @@ -23,6 +23,11 @@ * $/LicenseInfo$ */ +#define DIFFUSE_ALPHA_MODE_IGNORE 0 +#define DIFFUSE_ALPHA_MODE_BLEND 1 +#define DIFFUSE_ALPHA_MODE_MASK 2 +#define DIFFUSE_ALPHA_MODE_EMISSIVE 3 + #if HAS_SKIN uniform mat4 modelview_matrix; uniform mat4 projection_matrix; @@ -32,8 +37,16 @@ uniform mat3 normal_matrix; uniform mat4 modelview_projection_matrix; #endif -uniform mat4 texture_matrix0; +#if DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND +#if !HAS_SKIN +uniform mat4 modelview_matrix; +#endif +VARYING vec3 vary_position; + +#endif + +uniform mat4 texture_matrix0; ATTRIBUTE vec3 position; ATTRIBUTE vec4 diffuse_color; @@ -71,6 +84,10 @@ void main() vec3 pos = (mat*vec4(position.xyz,1.0)).xyz; +#if DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND + vary_position = pos; +#endif + gl_Position = projection_matrix*vec4(pos,1.0); #else @@ -116,4 +133,10 @@ vary_normal = n; #endif //HAS_SKIN vertex_color = diffuse_color; + +#if DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND +#if !HAS_SKIN + vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz; +#endif +#endif } |