|
@@ -1,4 +1,4 @@
|
|
-import { serialize, SerializationHelper, serializeAsTexture } from "../../Misc/decorators";
|
|
|
|
|
|
+import { serialize, SerializationHelper, serializeAsTexture, expandToProperty } from "../../Misc/decorators";
|
|
import { Observer, Observable } from "../../Misc/observable";
|
|
import { Observer, Observable } from "../../Misc/observable";
|
|
import { CubeMapToSphericalPolynomialTools } from "../../Misc/HighDynamicRange/cubemapToSphericalPolynomial";
|
|
import { CubeMapToSphericalPolynomialTools } from "../../Misc/HighDynamicRange/cubemapToSphericalPolynomial";
|
|
import { Nullable } from "../../types";
|
|
import { Nullable } from "../../types";
|
|
@@ -205,6 +205,7 @@ export class BaseTexture implements IAnimatable {
|
|
* This only impacts the PBR and Background materials
|
|
* This only impacts the PBR and Background materials
|
|
*/
|
|
*/
|
|
@serialize()
|
|
@serialize()
|
|
|
|
+ @expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
public gammaSpace = true;
|
|
public gammaSpace = true;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -595,6 +596,19 @@ export class BaseTexture implements IAnimatable {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Indicates that textures need to be re-calculated for all materials
|
|
|
|
+ */
|
|
|
|
+ protected _markAllSubMeshesAsTexturesDirty() {
|
|
|
|
+ let scene = this.getScene();
|
|
|
|
+
|
|
|
|
+ if (!scene) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ scene.markAllMaterialsAsDirty(Constants.MATERIAL_TextureDirtyFlag);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* Reads the pixels stored in the webgl texture and returns them as an ArrayBuffer.
|
|
* Reads the pixels stored in the webgl texture and returns them as an ArrayBuffer.
|
|
* This will returns an RGBA array buffer containing either in values (0-255) or
|
|
* This will returns an RGBA array buffer containing either in values (0-255) or
|
|
* float values (0-1) depending of the underlying buffer type.
|
|
* float values (0-1) depending of the underlying buffer type.
|