Adrian Posted September 14, 2014 Share Posted September 14, 2014 Hi, I'm trying to build some basic scene. I have a ground (with material), a box(without material) and a directional light. /* Build ground */ var ground = BABYLON.Mesh.CreateGround("ground1", 100, 100, 1, scene); var groundMaterial = new BABYLON.StandardMaterial("ground", scene); groundMaterial.diffuseTexture = new BABYLON.Texture("/sand.png", scene); groundMaterial.diffuseTexture.uScale = 10; groundMaterial.diffuseTexture.vScale = 10; ground.position.x = 0; ground.position.y = 0; ground.position.z = 0; groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0); ground.material = groundMaterial; ground.receiveShadows = true; ground.checkCollisions = true; /* Build box */ var box = BABYLON.Mesh.CreateBox("box1", 1, scene); box.position = new BABYLON.Vector3(1, 1, 1); box.checkCollisions = true; box.receiveShadows = true; /* Build light */ var light =new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-2, -2, -2), scene); light.position = new BABYLON.Vector3(20, 40, 20); /* Shadows */ var shadowGenerator = new BABYLON.ShadowGenerator(2048, light); shadowGenerator.useVarianceShadowMap = true; shadowGenerator.getShadowMap().renderList.push(box);You can see the result in attached picture. The shadow is awful totally pixelated and my cube/box has serrated edge. I am probably doing something wrong. Some help would be very appreciated ! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.