|
@@ -20309,7 +20309,7 @@ var BABYLON;
|
|
// Matrices
|
|
// Matrices
|
|
this.bindOnlyWorldMatrix(world);
|
|
this.bindOnlyWorldMatrix(world);
|
|
// Bones
|
|
// Bones
|
|
- StandardMaterial.ApplyBonesParameters(mesh, this._effect);
|
|
|
|
|
|
+ StandardMaterial.BindBonesParameters(mesh, this._effect);
|
|
if (scene.getCachedMaterial() !== this) {
|
|
if (scene.getCachedMaterial() !== this) {
|
|
this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
if (StandardMaterial.FresnelEnabled) {
|
|
if (StandardMaterial.FresnelEnabled) {
|
|
@@ -20426,7 +20426,7 @@ var BABYLON;
|
|
this._effect.setMatrix("view", scene.getViewMatrix());
|
|
this._effect.setMatrix("view", scene.getViewMatrix());
|
|
}
|
|
}
|
|
// Fog
|
|
// Fog
|
|
- StandardMaterial.ApplyFogParameters(scene, mesh, this._effect);
|
|
|
|
|
|
+ StandardMaterial.BindFogParameters(scene, mesh, this._effect);
|
|
// Log. depth
|
|
// Log. depth
|
|
if (this._defines.LOGARITHMICDEPTH) {
|
|
if (this._defines.LOGARITHMICDEPTH) {
|
|
this._effect.setFloat("logarithmicDepthConstant", 2.0 / (Math.log(scene.activeCamera.maxZ + 1.0) / Math.LN2));
|
|
this._effect.setFloat("logarithmicDepthConstant", 2.0 / (Math.log(scene.activeCamera.maxZ + 1.0) / Math.LN2));
|
|
@@ -20434,13 +20434,13 @@ var BABYLON;
|
|
}
|
|
}
|
|
_super.prototype.bind.call(this, world, mesh);
|
|
_super.prototype.bind.call(this, world, mesh);
|
|
};
|
|
};
|
|
- StandardMaterial.ApplyFogParameters = function (scene, mesh, effect) {
|
|
|
|
|
|
+ StandardMaterial.BindFogParameters = function (scene, mesh, effect) {
|
|
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
|
|
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
|
|
effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
|
|
effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
|
|
effect.setColor3("vFogColor", scene.fogColor);
|
|
effect.setColor3("vFogColor", scene.fogColor);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- StandardMaterial.ApplyBonesParameters = function (mesh, effect) {
|
|
|
|
|
|
+ StandardMaterial.BindBonesParameters = function (mesh, effect) {
|
|
if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
|
|
if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
|
|
effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
|
|
effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices(mesh));
|
|
}
|
|
}
|