forked from LeenkxTeam/LNXSDK
Repe [T3DU] and Moises Jpelaez updates
This commit is contained in:
@ -681,7 +681,11 @@ class Uniforms {
|
||||
}
|
||||
#end
|
||||
case "_backgroundCol": {
|
||||
if (camera.data.raw.clear_color != null) helpVec.set(camera.data.raw.clear_color[0], camera.data.raw.clear_color[1], camera.data.raw.clear_color[2]);
|
||||
if (Scene.active.world != null) {
|
||||
var col = Scene.active.world.raw.background_color;
|
||||
helpVec.set(((col >> 16) & 0xff) / 255, ((col >> 8) & 0xff) / 255, (col & 0xff) / 255);
|
||||
}
|
||||
else if (camera.data.raw.clear_color != null) helpVec.set(camera.data.raw.clear_color[0], camera.data.raw.clear_color[1], camera.data.raw.clear_color[2]);
|
||||
v = helpVec;
|
||||
}
|
||||
case "_hosekSunDirection": {
|
||||
@ -1095,7 +1099,7 @@ class Uniforms {
|
||||
m = helpMat;
|
||||
}
|
||||
#end
|
||||
#if lnx_particles
|
||||
#if lnx_gpu_particles
|
||||
case "_particleData": {
|
||||
var mo = cast(object, MeshObject);
|
||||
if (mo.particleOwner != null && mo.particleOwner.particleSystems != null) {
|
||||
@ -1106,18 +1110,9 @@ class Uniforms {
|
||||
}
|
||||
|
||||
if (m == null) {
|
||||
#if lnx_spot
|
||||
if (c.link.startsWith("_biasLightWorldViewProjectionMatrixSpot")) {
|
||||
var light = getSpot(c.link.charCodeAt(c.link.length - 1) - "0".code);
|
||||
if (light != null) {
|
||||
object == null ? helpMat.setIdentity() : helpMat.setFrom(object.transform.worldUnpack);
|
||||
helpMat.multmat(light.VP);
|
||||
helpMat.multmat(biasMat);
|
||||
m = helpMat;
|
||||
}
|
||||
}
|
||||
#if (!lnx_clusters && lnx_spot)
|
||||
if (c.link.startsWith("_biasLightViewProjectionMatrixSpot")) {
|
||||
var light = getSpot(c.link.charCodeAt(c.link.length - 1) - "0".code);
|
||||
var light = getSpot(0);
|
||||
if (light != null) {
|
||||
helpMat.setFrom(light.VP);
|
||||
helpMat.multmat(biasMat);
|
||||
@ -1251,14 +1246,19 @@ class Uniforms {
|
||||
var vy: Null<kha.FastFloat> = null;
|
||||
switch (c.link) {
|
||||
case "_tilesheetOffset": {
|
||||
var ts = cast(object, MeshObject).activeTilesheet;
|
||||
var ts = cast(object, MeshObject).tilesheet;
|
||||
vx = ts.tileX;
|
||||
vy = ts.tileY;
|
||||
}
|
||||
case "_tilesheetFlip": {
|
||||
var ts = cast(object, MeshObject).tilesheet;
|
||||
vx = ts.flipX ? 1.0 : 0.0;
|
||||
vy = ts.flipY ? 1.0 : 0.0;
|
||||
}
|
||||
case "_tilesheetTiles": {
|
||||
var ts = cast(object, MeshObject).activeTilesheet;
|
||||
vx = ts.raw.tilesx;
|
||||
vy = ts.raw.tilesy;
|
||||
var ts = cast(object, MeshObject).tilesheet;
|
||||
vx = ts.getTilesX();
|
||||
vy = ts.getTilesY();
|
||||
}
|
||||
#if lnx_morph_target
|
||||
case "_morphScaleOffset": {
|
||||
@ -1306,7 +1306,7 @@ class Uniforms {
|
||||
case "_texUnpack": {
|
||||
f = texUnpack != null ? texUnpack : 1.0;
|
||||
}
|
||||
#if lnx_particles
|
||||
#if lnx_gpu_particles
|
||||
case "_particleSizeRandom": {
|
||||
var mo = cast(object, MeshObject);
|
||||
if (mo.particleOwner != null && mo.particleOwner.particleSystems != null) {
|
||||
|
||||
Reference in New Issue
Block a user