diff options
author | Määttä Antti <antti.maatta@qt.io> | 2017-10-18 15:36:03 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2017-10-24 13:23:37 +0000 |
commit | 7377640e36ec191e9148affadefdc817dbbe3270 (patch) | |
tree | f8e18a136ca0f1264ecfa2e0b0dc881409314cf3 /src/Runtime/res/effectlib/sampleLight.glsllib | |
parent | 034994c8cd31cb035fbb290b229afffc2adf79ff (diff) |
Replace UIC with QT3DS from materials and effectlib
Change-Id: Ifc5b409777a978401bd4179599b27fb4aa611844
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Runtime/res/effectlib/sampleLight.glsllib')
-rw-r--r-- | src/Runtime/res/effectlib/sampleLight.glsllib | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Runtime/res/effectlib/sampleLight.glsllib b/src/Runtime/res/effectlib/sampleLight.glsllib index 35130305..62fc8b33 100644 --- a/src/Runtime/res/effectlib/sampleLight.glsllib +++ b/src/Runtime/res/effectlib/sampleLight.glsllib @@ -33,18 +33,18 @@ #define MAX_NUM_SHADOWS 8 -#ifndef UIC_ENABLE_SSM -#define UIC_ENABLE_SSM 0 +#ifndef QT3DS_ENABLE_SSM +#define QT3DS_ENABLE_SSM 0 #endif #include "SSAOCustomMaterial.glsllib" -#if UIC_ENABLE_SSM +#if QT3DS_ENABLE_SSM #include "shadowMapping.glsllib" #endif #include "funcsampleLightVars.glsllib" -#if UIC_ENABLE_SSM +#if QT3DS_ENABLE_SSM uniform sampler2D shadowMaps[MAX_NUM_SHADOWS]; uniform samplerCube shadowCubes[MAX_NUM_SHADOWS]; uniform int uNumShadowMaps; @@ -62,7 +62,7 @@ void sampleLight(in LightSource light, if (light.position.w == 0.0f) // directional light { wi = normalize(light.position.xyz); -#if UIC_ENABLE_SSM +#if QT3DS_ENABLE_SSM if ( light.shadowIdx >= 0 ) att *= sampleOrthographic( shadowMaps[light.shadowIdx], light.shadowControls, light.shadowView, pos, vec2(1.0, light.shadowControls.z) ); #endif @@ -96,7 +96,7 @@ void sampleLight(in LightSource light, att = length(wi) * 0.15915494309; // solid angle / 2*pi wi = normalize(wi); att *= clamp( dot( pos - light.position.xyz, light.direction.xyz ), 0.0, 1.0 ); -#if UIC_ENABLE_SSM +#if QT3DS_ENABLE_SSM if ( light.shadowIdx >= 0 ) att *= sampleCubemap( shadowCubes[light.shadowIdx], light.shadowControls, light.shadowView, light.position.xyz, pos, vec2(1.0, light.shadowControls.z) ); #endif @@ -114,7 +114,7 @@ void sampleLight(in LightSource light, att *= (spot >= cos(light.spotCutoff * PI / 180.0f)) ? pow(spot, light.spotExponent) : 0.0f; } */ -#if UIC_ENABLE_SSM +#if QT3DS_ENABLE_SSM if ( light.shadowIdx >= 0 ) att *= sampleCubemap( shadowCubes[light.shadowIdx], light.shadowControls, light.shadowView, light.position.xyz, pos, vec2(1.0, light.shadowControls.z) ); #endif |