From 7377640e36ec191e9148affadefdc817dbbe3270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A4=C3=A4tt=C3=A4=20Antti?= Date: Wed, 18 Oct 2017 15:36:03 +0300 Subject: Replace UIC with QT3DS from materials and effectlib Change-Id: Ifc5b409777a978401bd4179599b27fb4aa611844 Reviewed-by: Miikka Heikkinen --- src/Runtime/res/effectlib/sampleProbe.glsllib | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Runtime/res/effectlib/sampleProbe.glsllib') diff --git a/src/Runtime/res/effectlib/sampleProbe.glsllib b/src/Runtime/res/effectlib/sampleProbe.glsllib index 4ecd416b..53da5aaa 100644 --- a/src/Runtime/res/effectlib/sampleProbe.glsllib +++ b/src/Runtime/res/effectlib/sampleProbe.glsllib @@ -36,12 +36,12 @@ uniform vec4 light_probe_props; uniform vec4 light_probe_rotation; uniform vec4 light_probe_offset; // light_probe_offset.w = number of mipmaps -#if UIC_ENABLE_LIGHT_PROBE_2 +#if QT3DS_ENABLE_LIGHT_PROBE_2 uniform sampler2D light_probe2; uniform vec4 light_probe2_props; #endif -#if UIC_ENABLE_IBL_FOV +#if QT3DS_ENABLE_IBL_FOV uniform vec4 light_probe_opts; #endif @@ -96,7 +96,7 @@ vec2 getProbeSampleUV( vec3 smpDir, vec4 probeRot, vec2 probeOfs ) { vec2 smpUV; -#if UIC_ENABLE_IBL_FOV +#if QT3DS_ENABLE_IBL_FOV smpUV.x = (2.0 * atan(-smpDir.z, smpDir.x) + 3.14159265358 ) / light_probe_opts.x; smpUV.y = (2.0 * atan(-smpDir.z, smpDir.y) + 3.14159265358 ) / light_probe_opts.x; #else @@ -110,7 +110,7 @@ vec2 getProbeSampleUV( vec3 smpDir, vec4 probeRot, vec2 probeOfs ) vec4 getTopLayerSample( vec3 inDir, float lodShift, vec3 lodOffsets ) { -#if UIC_ENABLE_LIGHT_PROBE_2 +#if QT3DS_ENABLE_LIGHT_PROBE_2 if ( light_probe2_props.w < 0.5 ) return vec4(0.0, 0.0, 0.0, 0.0); @@ -142,7 +142,7 @@ vec3 getProbeWeightedSample( vec3 smpDir, float lodShift, float roughness, vec3 vec2 smpUV = getProbeSampleUV( smpDir, light_probe_rotation, light_probe_offset.xy ); float wt = 1.0; -#if UIC_ENABLE_IBL_FOV +#if QT3DS_ENABLE_IBL_FOV wt = min(wt, smoothstep(roughness * -0.25, roughness * 0.25, smpUV.x)); wt = min(wt, smoothstep(roughness * -0.25, roughness * 0.25, smpUV.y)); wt = min(wt, 1.0 - smoothstep(1.0 - roughness*0.25, 1.0 + roughness*0.25, smpUV.x)); @@ -179,7 +179,7 @@ vec3 getProbeWeightedSample( vec3 smpDir, float lodShift, float roughness, vec3 retVal += 0.3 * textureLod( light_probe, smpUV , lodShift+lodOffsets.y ).xyz; retVal += 0.1 * textureLod( light_probe, smpUV , lodShift+lodOffsets.z ).xyz; -#if UIC_ENABLE_LIGHT_PROBE_2 +#if QT3DS_ENABLE_LIGHT_PROBE_2 vec4 topSmp = getTopLayerSample( smpDir, lodShift, lodOffsets ); vec3 tempVal = mix( retVal, topSmp.xyz, topSmp.w ); retVal = mix( retVal, tempVal, light_probe2_props.z ); -- cgit v1.2.3