diff options
author | Dave Parks <davep@lindenlab.com> | 2012-06-28 13:22:04 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-06-28 13:22:04 -0500 |
commit | ed72fd0ae98671f1cfce3c975b93e1f760fc40f0 (patch) | |
tree | 10596d0f2040e9a0414e8a9f14d1269b58942264 /indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl | |
parent | 90547ff411db177bf6424ca553449a81a808fc0f (diff) | |
parent | a1d0d67e05c45bdc1a7a8bb0aad79772a2a94f6e (diff) |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl index cb14e6d4e8..9491421236 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl @@ -24,16 +24,22 @@ */ uniform mat4 modelview_projection_matrix; +uniform mat4 modelview_matrix; ATTRIBUTE vec3 position; +uniform vec3 center; +uniform float size; + VARYING vec4 vary_fragcoord; +VARYING vec3 trans_center; void main() { //transform vertex - vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0); + vec3 p = position*sqrt(size)+center; + vec4 pos = modelview_projection_matrix * vec4(p.xyz, 1.0); vary_fragcoord = pos; - + trans_center = (modelview_matrix*vec4(center.xyz, 1.0)).xyz; gl_Position = pos; } |