|
@@ -474,9 +474,11 @@ class Renderer extends h3d.scene.Renderer {
|
|
|
ctx.setGlobal("ldrMap", textures.ldr);
|
|
|
ctx.setGlobal("velocity", textures.velocity);
|
|
|
ctx.setGlobal("global.time", ctx.time);
|
|
|
- ctx.setGlobal("camera.position", ctx.camera.pos);
|
|
|
- ctx.setGlobal("camera.inverseViewProj", ctx.camera.getInverseViewProj());
|
|
|
- ctx.setGlobal("camera.inverseView", ctx.camera.getInverseView());
|
|
|
+ if(ctx.camera != null){
|
|
|
+ ctx.setGlobal("camera.position", ctx.camera.pos);
|
|
|
+ ctx.setGlobal("camera.inverseViewProj", ctx.camera.getInverseViewProj());
|
|
|
+ ctx.setGlobal("camera.inverseView", ctx.camera.getInverseView());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function beginPbr() {
|