summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-08-22 15:52:43 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-08-22 15:52:43 -0700
commite6171a8d097b2ac0242a29dcd78e297da27d7c97 (patch)
tree6fd07b0f658e3fd2f0e6a16b119ef0ec31294eb7 /indra/newview/app_settings/shaders/class1
parentb8c46f9615bffa0e6aeb909924c39581b160fdef (diff)
SL-17975: PBR: Add light debugging
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 8ebf09e7da..bb1265802a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -280,6 +280,22 @@ vec2 getScreenXY(vec4 clip)
return screen;
}
+// Color utils
+
+vec3 colorized_dot(float x)
+{
+ if (x > 0.0) return vec3( 0, x, 0 );
+ if (x < 0.0) return vec3(-x, 0, 0 );
+ return vec3( 0, 0, 1 );
+}
+
+vec3 hue_to_rgb(float hue)
+{
+ if (hue > 1.0) return vec3(0.5);
+ vec3 rgb = abs(hue * 6. - vec3(3, 2, 4)) * vec3(1, -1, -1) + vec3(-1, 2, 2);
+ return clamp(rgb, 0.0, 1.0);
+}
+
// PBR Utils
vec3 fresnelSchlick( vec3 reflect0, vec3 reflect90, float vh)