|
@@ -13,6 +13,7 @@ import { _TypeStore } from '../../../../Misc/typeStore';
|
|
import { Color3, Color4 } from '../../../../Maths/math';
|
|
import { Color3, Color4 } from '../../../../Maths/math';
|
|
import { AnimatedInputBlockTypes } from './animatedInputBlockTypes';
|
|
import { AnimatedInputBlockTypes } from './animatedInputBlockTypes';
|
|
import { Observable } from '../../../../Misc/observable';
|
|
import { Observable } from '../../../../Misc/observable';
|
|
|
|
+import { MaterialHelper } from '../../../../Materials/materialHelper';
|
|
|
|
|
|
/**
|
|
/**
|
|
* Block used to expose an input value
|
|
* Block used to expose an input value
|
|
@@ -507,7 +508,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
effect.setMatrix(variableName, scene.getTransformMatrix());
|
|
effect.setMatrix(variableName, scene.getTransformMatrix());
|
|
break;
|
|
break;
|
|
case NodeMaterialSystemValues.CameraPosition:
|
|
case NodeMaterialSystemValues.CameraPosition:
|
|
- effect.setVector3(variableName, scene.activeCamera!.globalPosition);
|
|
|
|
|
|
+ MaterialHelper.BindEyePosition(effect, scene, variableName);
|
|
break;
|
|
break;
|
|
case NodeMaterialSystemValues.FogColor:
|
|
case NodeMaterialSystemValues.FogColor:
|
|
effect.setColor3(variableName, scene.fogColor);
|
|
effect.setColor3(variableName, scene.fogColor);
|