restoring the sampler desc layout to fix ktx cache and fixing the bug shadow when turning global shadow on off

This commit is contained in:
Sam Gateau 2018-04-11 00:00:11 -07:00
parent d8f0cfa89a
commit 167db14bdb
2 changed files with 4 additions and 1 deletions

View file

@ -128,6 +128,7 @@ public:
uint8 _wrapModeV = WRAP_REPEAT; uint8 _wrapModeV = WRAP_REPEAT;
uint8 _wrapModeW = WRAP_REPEAT; uint8 _wrapModeW = WRAP_REPEAT;
uint8 _mipOffset = 0;
uint8 _minMip = 0; uint8 _minMip = 0;
uint8 _maxMip = MAX_MIP_LEVEL; uint8 _maxMip = MAX_MIP_LEVEL;
@ -142,6 +143,7 @@ public:
_wrapModeU == other._wrapModeU && _wrapModeU == other._wrapModeU &&
_wrapModeV == other._wrapModeV && _wrapModeV == other._wrapModeV &&
_wrapModeW == other._wrapModeW && _wrapModeW == other._wrapModeW &&
_mipOffset == other._mipOffset &&
_minMip == other._minMip && _minMip == other._minMip &&
_maxMip == other._maxMip; _maxMip == other._maxMip;
} }
@ -164,6 +166,7 @@ public:
ComparisonFunction getComparisonFunction() const { return ComparisonFunction(_desc._comparisonFunc); } ComparisonFunction getComparisonFunction() const { return ComparisonFunction(_desc._comparisonFunc); }
bool doComparison() const { return getComparisonFunction() != ALWAYS; } bool doComparison() const { return getComparisonFunction() != ALWAYS; }
uint8 getMipOffset() const { return _desc._mipOffset; }
uint8 getMinMip() const { return _desc._minMip; } uint8 getMinMip() const { return _desc._minMip; }
uint8 getMaxMip() const { return _desc._maxMip; } uint8 getMaxMip() const { return _desc._maxMip; }

View file

@ -532,7 +532,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext,
} }
} }
auto& program = deferredLightingEffect->_directionalSkyboxLight; auto program = deferredLightingEffect->_directionalSkyboxLight;
LightLocationsPtr locations = deferredLightingEffect->_directionalSkyboxLightLocations; LightLocationsPtr locations = deferredLightingEffect->_directionalSkyboxLightLocations;
auto keyLight = lightAndShadow.first; auto keyLight = lightAndShadow.first;