diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-06-27 16:45:06 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-06-27 16:45:06 -0700 |
commit | 5462ac5d3b20aeefbe750ab10780346c9238bdff (patch) | |
tree | 1db7c085e372c12aa97596617b74051556b4b0fe /indra | |
parent | 780bed6c2b012473791e01d72527d1324749bf32 (diff) |
SL-17274: PBR: Fix IOR
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index 0ca7391e32..9b21c7a3cb 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -51,6 +51,7 @@ #define DEBUG_PBR_DOT_TV 0 // Output: #define DEBUG_PBR_DOT_BV 0 // Output: #define DEBUG_PBR_FRESNEL 0 // Output: roughness dependent fresnel +#define DEBUG_PBR_IOR 0 // Output: grayscale IOR #extension GL_ARB_texture_rectangle : enable #extension GL_ARB_shader_texture_lod : enable @@ -205,11 +206,14 @@ void main() #if DEBUG_PBR_PACK_ORM1 packedORM = vec3(1,1,1); #endif - float IOR = 1.5; // default Index Of Reflection 1.5 + float IOR = 1.5; // default Index Of Refraction 1.5 (dielectrics) vec3 reflect0 = vec3(0.04); // -> incidence reflectance 0.04 - - IOR = 0.0; // TODO: Set from glb - reflect0 = calcBaseReflect0(IOR); +#if HAS_IOR + reflect0 = calcBaseReflect0(IOR); +#endif +#if DEBUG_PBR_REFLECT0_BASE + vec3 debug_reflect0 = reflect0; +#endif float metal = packedORM.b; vec3 reflect90 = vec3(0); @@ -273,6 +277,12 @@ void main() #if DEBUG_PBR_FRESNEL color.rgb = fresnelR; #endif + #if DEBUG_PBR_IOR + color.rgb = vec3(IOR); + #endif + #if DEBUG_PBR_KSPEC + color.rgb = kSpec; + #endif #if DEBUG_PBR_RAW_DIFF color.rgb = diffuse.rgb; #endif |