Repe [T3DU] and Moises Jpelaez updates

This commit is contained in:
2026-05-12 23:54:06 -07:00
parent 6b404f9da6
commit 39091e8db3
147 changed files with 5539 additions and 1750 deletions

View File

@ -1,6 +1,7 @@
package leenkx.logicnode;
import iron.object.CameraObject;
import kha.Color;
class WriteImageNode extends LogicNode {
@ -43,6 +44,34 @@ class WriteImageNode extends LogicNode {
camera.renderTarget = oldRT;
iron.Scene.active.camera = sceneCam;
if (inputs[9].get()){
tex = kha.Image.createRenderTarget(inputs[3].get(), inputs[4].get(),
kha.graphics4.TextureFormat.RGBA32,
kha.graphics4.DepthStencilFormat.NoDepthAndStencil);
tex.g2.begin(true, Color.Transparent);
tex.g2.color = Color.White;
tex.g2.drawScaledImage(renderTarget, 0, 0, inputs[3].get(), inputs[4].get());
var scl = inputs[3].get() / iron.App.w();
if (kha.Image.renderTargetsInvertedY()){
tex.g2.scale(scl, -scl);
tex.g2.translate(0, inputs[4].get());
}
else
tex.g2.scale(scl, scl);
for (f in @:privateAccess iron.App.traitRenders2D){
f(tex.g2);
}
tex.g2.end();
}
var pixels = tex.getPixels();
for (i in 0...pixels.length){