summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-07-14 18:12:19 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-07-14 18:12:19 -0700
commit32efb52cd1d7b3f4907efb1b4f8dc151e8a1a5d0 (patch)
tree2dd72d172e73237d6aea6db88d722ad0d2c2ca29 /indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl
parent2e1c9046dc48208c5bc86dfec8c7d4f0fc294b48 (diff)
SL-17764: PBR: Add light shaders to class 3 deferred
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl45
1 files changed, 45 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl
new file mode 100644
index 0000000000..d42c8f6cf6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightV.glsl
@@ -0,0 +1,45 @@
+/**
+ * @file class3\deferred\pointLightV.glsl
+ *
+ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2022, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+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
+ vec3 p = position*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;
+}