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/class1/objects/treeV.glsl | |
| parent | 63c420d8ddb7cc738877d2771b1c3b8972a4de09 (diff) | |
| parent | ee4fdd2c18c722164d78a7305777fad6e49cba8b (diff) | |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/objects/treeV.glsl')
| -rw-r--r-- | indra/newview/app_settings/shaders/class1/objects/treeV.glsl | 35 | 
1 files changed, 35 insertions, 0 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/objects/treeV.glsl b/indra/newview/app_settings/shaders/class1/objects/treeV.glsl new file mode 100644 index 0000000000..1e9e7f4b0b --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/objects/treeV.glsl @@ -0,0 +1,35 @@ +/**  + * @file treeV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ +  + + +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec3 normal; + +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, vec4(1,1,1,1), vec4(0.)); +	gl_FrontColor = color; + +	gl_FogFragCoord = pos.z; +} | 
