diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-17 18:09:36 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-17 18:09:36 -0500 |
commit | c827d32ebedeaa46ed75a91ae779f6547fc0d090 (patch) | |
tree | 0196248e4d7a2e42b36ab1189408ac3ea99c43e9 /indra/newview/app_settings/shaders/class2 | |
parent | a2e418f250c49de9aba943a62f92189fcef6220a (diff) |
SL-19655 Decruft legacy GLSL shaders and now unused build queues.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
12 files changed, 27 insertions, 45 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index f4d6eff69e..ae8cd97b18 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -25,19 +25,13 @@ //class2/deferred/alphaF.glsl -#extension GL_ARB_texture_rectangle : enable - /*[EXTRA_CODE_HERE]*/ #define INDEXED 1 #define NON_INDEXED 2 #define NON_INDEXED_NO_COLOR 3 -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif uniform mat3 env_mat; uniform vec3 sun_dir; @@ -47,13 +41,13 @@ uniform vec3 moon_dir; uniform sampler2D diffuseMap; #endif -VARYING vec3 vary_fragcoord; -VARYING vec3 vary_position; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_norm; +in vec3 vary_fragcoord; +in vec3 vary_position; +in vec2 vary_texcoord0; +in vec3 vary_norm; #ifdef USE_VERTEX_COLOR -VARYING vec4 vertex_color; //vertex color should be treated as sRGB +in vec4 vertex_color; //vertex color should be treated as sRGB #endif #ifdef HAS_ALPHA_MASK @@ -195,7 +189,7 @@ void main() #endif #ifdef USE_DIFFUSE_TEX - vec4 diffuse_tap = texture2D(diffuseMap,vary_texcoord0.xy); + vec4 diffuse_tap = texture(diffuseMap,vary_texcoord0.xy); #endif #ifdef USE_INDEXED_TEX diff --git a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl index cd7c005162..7b7b4a040c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl @@ -214,7 +214,7 @@ void main() // emissiveColor is the emissive color factor from GLTF and is already in linear space vec3 colorEmissive = emissiveColor; // emissiveMap here is a vanilla RGB texture encoded as sRGB, manually convert to linear - colorEmissive *= srgb_to_linear(texture2D(emissiveMap, emissive_texcoord.xy).rgb); + colorEmissive *= srgb_to_linear(texture(emissiveMap, emissive_texcoord.xy).rgb); // PBR IBL float gloss = 1.0 - perceptualRoughness; @@ -305,7 +305,7 @@ void main() // emissiveColor is the emissive color factor from GLTF and is already in linear space vec3 colorEmissive = emissiveColor; // emissiveMap here is a vanilla RGB texture encoded as sRGB, manually convert to linear - colorEmissive *= srgb_to_linear(texture2D(emissiveMap, emissive_texcoord.xy).rgb); + colorEmissive *= srgb_to_linear(texture(emissiveMap, emissive_texcoord.xy).rgb); float a = basecolor.a*vertex_color.a; diff --git a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl index 080f622155..60134a7f72 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/reflectionProbeF.glsl @@ -40,7 +40,7 @@ void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz)); vec3 env_vec = env_mat * refnormpersp; - glossenv = srgb_to_linear(textureCube(environmentMap, env_vec).rgb); + glossenv = srgb_to_linear(texture(environmentMap, env_vec).rgb); } void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv, @@ -63,7 +63,7 @@ void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz)); vec3 env_vec = env_mat * refnormpersp; - legacyenv = srgb_to_linear(textureCube(environmentMap, env_vec).rgb); + legacyenv = srgb_to_linear(texture(environmentMap, env_vec).rgb); glossenv = legacyenv; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl index 1e7ccb747a..d1db6dd943 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl @@ -23,11 +23,11 @@ * $/LicenseInfo$ */ -ATTRIBUTE vec3 position; +in vec3 position; uniform vec2 screen_res; -VARYING vec2 vary_fragcoord; +out vec2 vary_fragcoord; // forwards void setAtmosAttenuation(vec3 c); diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index e1cbfcce1a..1ea57516a4 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -23,20 +23,14 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable - /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif //class 2, shadows, no SSAO // Inputs -VARYING vec2 vary_fragcoord; +in vec2 vary_fragcoord; uniform vec3 sun_dir; uniform float shadow_bias; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 99a26a050d..0126e09d4c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -22,20 +22,14 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable - /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif //class 2 -- shadows and SSAO // Inputs -VARYING vec2 vary_fragcoord; +in vec2 vary_fragcoord; vec4 getPosition(vec2 pos_screen); vec3 getNorm(vec2 pos_screen); diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl index 3dfca0f655..5ae7f2c571 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl @@ -23,9 +23,9 @@ * $/LicenseInfo$ */ -ATTRIBUTE vec3 position; +in vec3 position; -VARYING vec2 vary_fragcoord; +out vec2 vary_fragcoord; uniform vec2 screen_res; diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl index 4c418e414f..3773f191e8 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -// VARYING param funcs +// out param funcs uniform vec3 sun_dir; diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl index 07733bda18..34669a6796 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl @@ -24,8 +24,8 @@ */ -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; +in vec3 vary_AdditiveColor; +in vec3 vary_AtmosAttenuation; vec3 getSunlitColor() { diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl index 31109aed31..1b854d80b3 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl @@ -24,8 +24,8 @@ */ -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; +out vec3 vary_AdditiveColor; +out vec3 vary_AtmosAttenuation; vec3 additive_color; vec3 atmos_attenuation; diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl index 22e16b7e0f..7a6741fe0e 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl @@ -23,9 +23,9 @@ * $/LicenseInfo$ */ -VARYING vec3 vary_PositionEye; -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; +in vec3 vary_PositionEye; +in vec3 vary_AdditiveColor; +in vec3 vary_AtmosAttenuation; vec3 getSunlitColor() { diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl index 0f2a3ee527..23c3aed4d8 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl @@ -23,9 +23,9 @@ * $/LicenseInfo$ */ -VARYING vec3 vary_PositionEye; -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; +out vec3 vary_PositionEye; +out vec3 vary_AdditiveColor; +out vec3 vary_AtmosAttenuation; vec3 atmos_attenuation; vec3 sunlit_color; |