This commit is contained in:
2026-04-28 19:07:04 -07:00
parent a3d5fa846b
commit c9acef9798
2 changed files with 12 additions and 132 deletions

View File

@ -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;