From 375555012f92c1b836f2d122754f9facd050be62 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 14 Jun 2024 17:06:07 -0500 Subject: 1736 audit texture image unit usage on os x (#1739) * #1736 Remove some unused samplers from glsl files and refactor shader manager to assume 16 texture image units and 4 indexed texture units all the time. --- indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl | 3 +-- indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl | 2 -- indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl | 1 - indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl | 1 - .../newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl | 2 -- indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl | 1 - indra/newview/app_settings/shaders/class1/interface/copyF.glsl | 3 +++ 7 files changed, 4 insertions(+), 9 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl index 49470f0e39..ce018623a8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl @@ -23,8 +23,7 @@ * $/LicenseInfo$ */ -uniform sampler2D noiseMap; -uniform sampler2D normalMap; +uniform sampler2D noiseMap; uniform sampler2D depthMap; uniform float ssao_radius; diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl index 438e1d1b33..37dcbbd328 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl @@ -27,8 +27,6 @@ out vec4 frag_color; -uniform sampler2D diffuseMap; - void main() { frag_color = vec4(1,1,1,1); diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index d7d98477c0..23a3ca4911 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -27,7 +27,6 @@ out vec4 frag_color; -uniform sampler2D normalMap; uniform sampler2D lightMap; uniform float dist_factor; diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index 3ea2248bec..ab0e4fd4d8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -50,7 +50,6 @@ SOFTWARE. uniform sampler2D normalMap; uniform sampler2D depthMap; -uniform sampler2D emissiveRect; uniform sampler2D projectionMap; // rgba uniform sampler2D brdfLut; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index 9db8f461dd..f208ac746b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -27,8 +27,6 @@ out vec4 frag_color; -uniform sampler2D diffuseMap; - in vec4 post_pos; in float target_pos_x; in vec4 vertex_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index 16cc7cfbbc..6f7bd2bf3c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -24,7 +24,6 @@ */ uniform sampler2D normalMap; -uniform sampler2D depthMap; #if defined(SUN_SHADOW) uniform sampler2DShadow shadowMap0; diff --git a/indra/newview/app_settings/shaders/class1/interface/copyF.glsl b/indra/newview/app_settings/shaders/class1/interface/copyF.glsl index edaa2488f0..094d147e86 100644 --- a/indra/newview/app_settings/shaders/class1/interface/copyF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/copyF.glsl @@ -25,7 +25,10 @@ in vec2 tc; +#if defined(COPY_DEPTH) uniform sampler2D depthMap; +#endif + uniform sampler2D diffuseMap; out vec4 frag_color; -- cgit v1.2.3