Merge "When the incoming light source is invalid, don\'t generate any shadow" into mnc-dr-dev am: 76d20b4a5c
am: 1c7fbe0efb
* commit '1c7fbe0efbabe5c15ba72e16053551a8fdae1b92':
When the incoming light source is invalid, don't generate any shadow
This commit is contained in:
@@ -80,6 +80,11 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque,
|
|||||||
ALOGD("light center %f %f %f %d",
|
ALOGD("light center %f %f %f %d",
|
||||||
adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z, lightRadius);
|
adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z, lightRadius);
|
||||||
#endif
|
#endif
|
||||||
|
if (isnan(adjustedLightCenter.x)
|
||||||
|
|| isnan(adjustedLightCenter.y)
|
||||||
|
|| isnan(adjustedLightCenter.z)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// light position (because it's in local space) needs to compensate for receiver transform
|
// light position (because it's in local space) needs to compensate for receiver transform
|
||||||
// TODO: should apply to light orientation, not just position
|
// TODO: should apply to light orientation, not just position
|
||||||
|
|||||||
Reference in New Issue
Block a user