|
@@ -1425,7 +1425,7 @@ export class StandardMaterial extends PushMaterial {
|
|
}
|
|
}
|
|
|
|
|
|
if (this._detailTexture && StandardMaterial.DetailTextureEnabled) {
|
|
if (this._detailTexture && StandardMaterial.DetailTextureEnabled) {
|
|
- ubo.updateFloat3("vDetailInfos", this._detailTexture.coordinatesIndex, 1 - this.detailDiffuseBlendLevel, this.detailBumpLevel);
|
|
|
|
|
|
+ ubo.updateFloat3("vDetailInfos", this._detailTexture.coordinatesIndex, this.detailDiffuseBlendLevel, this.detailBumpLevel);
|
|
MaterialHelper.BindTextureMatrix(this._detailTexture, ubo, "detail");
|
|
MaterialHelper.BindTextureMatrix(this._detailTexture, ubo, "detail");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1513,10 +1513,6 @@ export class StandardMaterial extends PushMaterial {
|
|
effect.setTexture("diffuseSampler", this._diffuseTexture);
|
|
effect.setTexture("diffuseSampler", this._diffuseTexture);
|
|
}
|
|
}
|
|
|
|
|
|
- if (this._detailTexture && StandardMaterial.DetailTextureEnabled) {
|
|
|
|
- effect.setTexture("detailSampler", this._detailTexture);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
|
|
if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
|
|
effect.setTexture("ambientSampler", this._ambientTexture);
|
|
effect.setTexture("ambientSampler", this._ambientTexture);
|
|
}
|
|
}
|
|
@@ -1549,6 +1545,10 @@ export class StandardMaterial extends PushMaterial {
|
|
effect.setTexture("bumpSampler", this._bumpTexture);
|
|
effect.setTexture("bumpSampler", this._bumpTexture);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (this._detailTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.DetailTextureEnabled) {
|
|
|
|
+ effect.setTexture("detailSampler", this._detailTexture);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
|
|
if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
|
|
var depth = 1.0;
|
|
var depth = 1.0;
|
|
if (this._refractionTexture.isCube) {
|
|
if (this._refractionTexture.isCube) {
|