Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
rollback iron and add modifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Jan 29, 2024
1 parent 7cdfe03 commit 3bc780c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/iron/RenderPath.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import iron.object.MeshObject;
import iron.object.Uniforms;

class RenderPath {

public static var active: RenderPath;

public var frameScissor = false;
Expand Down Expand Up @@ -124,7 +125,6 @@ class RenderPath {
commands();

if (!isProbe) frame++;

}

public function setTarget(target: String, additional: Array<String> = null, viewportScale = 1.0) {
Expand Down
4 changes: 3 additions & 1 deletion Sources/iron/Scene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import iron.data.TerrainStream;
import iron.data.SceneStream;
import iron.data.MeshBatch;
import iron.system.Time;

using StringTools;

class Scene {
Expand Down Expand Up @@ -214,6 +213,9 @@ class Scene {
Data.getSceneRaw(sceneName, function(format: TSceneFormat) {
Scene.create(format, function(o: Object) {
if (done != null) done(o);
#if rp_voxels // Revoxelize
RenderPath.active.voxelized = 0;
#end

#if (rp_background == "World")
if (removeWorldShader != null) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/iron/data/ShaderData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ShaderContext {

public function new(raw: TShaderContext, done: ShaderContext->Void, overrideContext: TShaderOverride = null) {
this.raw = raw;
#if (rp_voxels == "Off")
#if (!rp_voxels)
if (raw.name == "voxel") {
done(this);
return;
Expand Down
4 changes: 4 additions & 0 deletions Sources/iron/object/MeshObject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ class MeshObject extends Object {
if (skip_context == context) return setCulled(isShadow, true);
if (force_context != null && force_context != context) return setCulled(isShadow, true);

#if (!arm_voxelgi_revox) // No revox - do not voxelize moving objects
if (context == "voxel" && raw != null && raw.mobile == true) return setCulled(isShadow, true);
#end

return setCulled(isShadow, false);
}

Expand Down

0 comments on commit 3bc780c

Please sign in to comment.