fix the bruh lag

This commit is contained in:
RandomityGuy 2023-07-16 01:38:24 +05:30
parent 6bea557aec
commit f821db4cea

View file

@ -18,6 +18,7 @@ import h3d.scene.Object;
import h3d.scene.Mesh; import h3d.scene.Mesh;
import h3d.scene.MeshBatch; import h3d.scene.MeshBatch;
import src.MarbleGame; import src.MarbleGame;
import src.ProfilerUI;
typedef MeshBatchInfo = { typedef MeshBatchInfo = {
var instances:Array<MeshInstance>; var instances:Array<MeshInstance>;
@ -78,7 +79,7 @@ class InstanceManager {
subOpacity = instance.gameObject.getSubObjectOpacity(instance.emptyObj); subOpacity = instance.gameObject.getSubObjectOpacity(instance.emptyObj);
if (subOpacity == 0) if (subOpacity == 0)
continue; // Do not draw continue; // Do not draw
minfo.meshbatch.shadersChanged = true; // minfo.meshbatch.shadersChanged = true;
} }
dtsShader.currentOpacity = instance.gameObject.currentOpacity * subOpacity; dtsShader.currentOpacity = instance.gameObject.currentOpacity * subOpacity;