diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-08-21 16:23:50 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-08-21 16:23:50 -0500 |
| commit | 90ebaeef9b629cb63e7a94a526478f2e340ff439 (patch) | |
| tree | 14f61c7fc6c2c41cace22a9582075d54ad8181bc /indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl | |
| parent | 63c420d8ddb7cc738877d2771b1c3b8972a4de09 (diff) | |
| parent | ee4fdd2c18c722164d78a7305777fad6e49cba8b (diff) | |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl')
| -rw-r--r-- | indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl new file mode 100644 index 0000000000..d2a83c9724 --- /dev/null +++ b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl @@ -0,0 +1,36 @@ +/** + * @file simpleNonIndexedV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + + + +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec3 normal; +attribute vec4 diffuse_color; + +vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); +void calcAtmospherics(vec3 inPositionEye); + +void main() +{ + //transform vertex + vec4 vert = vec4(position.xyz,1.0); + + gl_Position = gl_ModelViewProjectionMatrix*vert; + gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0, 0, 1); + + vec4 pos = (gl_ModelViewMatrix * vert); + + vec3 norm = normalize(gl_NormalMatrix * normal); + + calcAtmospherics(pos.xyz); + + vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.)); + gl_FrontColor = color; + + gl_FogFragCoord = pos.z; +} |
