|
@@ -11,6 +11,8 @@ class VolumetricLightmap extends h3d.scene.Mesh {
|
|
|
|
|
|
public var lastBakedProbeIndex = -1;
|
|
public var lastBakedProbeIndex = -1;
|
|
|
|
|
|
|
|
+ var prim : h3d.prim.Cube;
|
|
|
|
+
|
|
var shader : h3d.shader.pbr.VolumetricLightmap;
|
|
var shader : h3d.shader.pbr.VolumetricLightmap;
|
|
|
|
|
|
function set_voxelSize(newSize) :h3d.Vector {
|
|
function set_voxelSize(newSize) :h3d.Vector {
|
|
@@ -20,7 +22,9 @@ class VolumetricLightmap extends h3d.scene.Mesh {
|
|
}
|
|
}
|
|
|
|
|
|
public function new(?parent) {
|
|
public function new(?parent) {
|
|
- super(new h3d.prim.Cube(1,1,1,false), null, parent);
|
|
|
|
|
|
+ var prim = new h3d.prim.Cube(1,1,1,false);
|
|
|
|
+ prim.addNormals();
|
|
|
|
+ super(prim, null, parent);
|
|
shader = new h3d.shader.pbr.VolumetricLightmap();
|
|
shader = new h3d.shader.pbr.VolumetricLightmap();
|
|
material.mainPass.removeShader(material.mainPass.getShader(h3d.shader.pbr.PropsValues));
|
|
material.mainPass.removeShader(material.mainPass.getShader(h3d.shader.pbr.PropsValues));
|
|
material.mainPass.addShader(shader);
|
|
material.mainPass.addShader(shader);
|