|
@@ -497,7 +497,7 @@ export class BaseTexture implements IAnimatable {
|
|
|
}
|
|
|
|
|
|
/** @hidden */
|
|
|
- public _getFromCache(url: Nullable<string>, noMipmap: boolean, sampling?: number): Nullable<InternalTexture> {
|
|
|
+ public _getFromCache(url: Nullable<string>, noMipmap: boolean, sampling?: number, invertY?: boolean): Nullable<InternalTexture> {
|
|
|
if (!this._scene) {
|
|
|
return null;
|
|
|
}
|
|
@@ -506,10 +506,12 @@ export class BaseTexture implements IAnimatable {
|
|
|
for (var index = 0; index < texturesCache.length; index++) {
|
|
|
var texturesCacheEntry = texturesCache[index];
|
|
|
|
|
|
- if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
|
|
|
- if (!sampling || sampling === texturesCacheEntry.samplingMode) {
|
|
|
- texturesCacheEntry.incrementReferences();
|
|
|
- return texturesCacheEntry;
|
|
|
+ if (invertY === undefined || invertY === texturesCacheEntry.invertY) {
|
|
|
+ if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
|
|
|
+ if (!sampling || sampling === texturesCacheEntry.samplingMode) {
|
|
|
+ texturesCacheEntry.incrementReferences();
|
|
|
+ return texturesCacheEntry;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|