forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -68,10 +68,6 @@ class Uniforms {
|
||||
public static var defaultFilter = TextureFilter.LinearFilter;
|
||||
#end
|
||||
|
||||
#if lnx_morph_target
|
||||
public static var forceUploadMorphWeights: Bool = false;
|
||||
#end
|
||||
|
||||
public static function setContextConstants(g: Graphics, context: ShaderContext, bindParams: Array<String>) {
|
||||
if (context.raw.constants != null) {
|
||||
for (i in 0...context.raw.constants.length) {
|
||||
@ -1361,38 +1357,20 @@ class Uniforms {
|
||||
#end // lnx_clusters
|
||||
#if lnx_morph_target
|
||||
case "_morphWeights": {
|
||||
var morphTarget = cast(object, MeshObject).morphTarget;
|
||||
morphTarget.flushBatchedUpdates();
|
||||
if (forceUploadMorphWeights) {
|
||||
fa = morphTarget.morphWeights;
|
||||
}
|
||||
else {
|
||||
if (morphTarget.isDirty) {
|
||||
fa = morphTarget.morphWeights;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
fa = cast(object, MeshObject).morphTarget.morphWeights;
|
||||
}
|
||||
#end
|
||||
}
|
||||
}
|
||||
|
||||
if (fa == null && externalFloatsLinks != null) {
|
||||
for (fn in externalFloatsLinks) {
|
||||
fa = fn(object, currentMat(object), c.link);
|
||||
if (fa != null) break;
|
||||
}
|
||||
}
|
||||
if (fa == null && externalFloatsLinks != null) {
|
||||
for (fn in externalFloatsLinks) {
|
||||
fa = fn(object, currentMat(object), c.link);
|
||||
if (fa != null) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fa == null) return;
|
||||
if (fa == null) return;
|
||||
g.setFloats(location, fa);
|
||||
|
||||
#if lnx_morph_target
|
||||
if (c.link == "_morphWeights") {
|
||||
cast(object, MeshObject).morphTarget.markClean();
|
||||
}
|
||||
#end
|
||||
}
|
||||
else if (c.type == "int") {
|
||||
var i: Null<Int> = null;
|
||||
|
||||
Reference in New Issue
Block a user