mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
landmine things, dts rendering things, lighting things
This commit is contained in:
parent
e1d2faa2b5
commit
0060a403d2
5 changed files with 12 additions and 17 deletions
|
|
@ -366,6 +366,14 @@ class DtsObject extends GameObject {
|
|||
if (flags & 16 > 0)
|
||||
material.blendMode = BlendMode.Sub;
|
||||
|
||||
if (flags & 32 > 0) {
|
||||
var pbrprops = material.mainPass.getShader(h3d.shader.pbr.PropsValues);
|
||||
pbrprops.emissiveValue = 1;
|
||||
pbrprops.roughnessValue = 0;
|
||||
pbrprops.occlusionValue = 0;
|
||||
pbrprops.metalnessValue = 1;
|
||||
}
|
||||
|
||||
// if (this.isTSStatic && !(flags & 64 > 0)) {
|
||||
// // TODO THIS SHIT
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import h3d.scene.Object;
|
|||
class InteriorObject extends GameObject {
|
||||
public var collider:CollisionEntity;
|
||||
public var interiorFile:String;
|
||||
public var useInstancing = false;
|
||||
public var useInstancing = true;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -155,11 +155,12 @@ class MarbleWorld extends Scheduler {
|
|||
var ambientColor = MisParser.parseVector4(sunElement.ambient);
|
||||
var sunDirection = MisParser.parseVector3(sunElement.direction);
|
||||
sunDirection.x = -sunDirection.x;
|
||||
// sunDirection.z = -sunDirection.z;
|
||||
|
||||
scene.lightSystem.ambientLight.load(ambientColor);
|
||||
|
||||
var sunlight = new DirLight(sunDirection, scene);
|
||||
sunlight.color = directionalColor;
|
||||
sunlight.color = directionalColor.multiply(2);
|
||||
}
|
||||
|
||||
// var skyElement:MissionElementSky = cast this.mission.root.elements.filter((element) -> element._type == MissionElementType.Sky)[0];
|
||||
|
|
|
|||
|
|
@ -26,20 +26,6 @@ class Gem extends DtsObject {
|
|||
this.matNameOverride.set('base.gem', color + ".gem");
|
||||
}
|
||||
|
||||
public override function init(level:MarbleWorld) {
|
||||
super.init(level);
|
||||
|
||||
for (material in this.materials) {
|
||||
material.mainPass.enableLights = false;
|
||||
var pbrprops = material.mainPass.getShader(h3d.shader.pbr.PropsValues);
|
||||
pbrprops.emissiveValue = 1;
|
||||
pbrprops.roughnessValue = 0;
|
||||
pbrprops.occlusionValue = 0;
|
||||
pbrprops.metalnessValue = 1;
|
||||
// material.mainPass.addShader(new PropsValues(1, 0, 0, 1));
|
||||
}
|
||||
}
|
||||
|
||||
public override function setHide(hide:Bool) {
|
||||
if (hide) {
|
||||
this.pickedUp = true;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ final landMineSmokeParticle:ParticleEmitterOptions = {
|
|||
new Vector(0.2, 0.2, 0.2, 1),
|
||||
new Vector(0, 0, 0, 0)
|
||||
],
|
||||
sizes: [1, 1.5, 2],
|
||||
sizes: [1.5, 2, 3],
|
||||
times: [0, 0.5, 1]
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue