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

Commit

Permalink
remove check for voxelize() in Scene.
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Jan 29, 2024
1 parent 3bc780c commit 6514b6a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 0 additions & 5 deletions Sources/iron/RenderPath.hx
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ class RenderPath {

if (!drawn) submitDraw(context);

#if (rp_voxels != "Off")
if (context == "voxel")
armory.renderpath.RenderPathCreator.clipmapLevel = (armory.renderpath.RenderPathCreator.clipmapLevel + 1) % Main.voxelgiClipmapCount;
#end

#if arm_debug
// Callbacks to specific context
if (contextEvents != null) {
Expand Down
3 changes: 0 additions & 3 deletions Sources/iron/Scene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ 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
5 changes: 5 additions & 0 deletions Sources/iron/object/MeshObject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ class MeshObject extends Object {
#if arm_veloc
prevMatrix.setFrom(transform.worldUnpack);
#end

#if (rp_voxels != "Off")
if (context == "voxel")
armory.renderpath.RenderPathCreator.clipmapLevel = (armory.renderpath.RenderPathCreator.clipmapLevel + 1) % Main.voxelgiClipmapCount;
#end
}

function validContext(mats: Vector<MaterialData>, context: String): Bool {
Expand Down
2 changes: 1 addition & 1 deletion Sources/iron/object/Uniforms.hx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Uniforms {
if (isImage) {
g.setImageTexture(context.textureUnits[j], rt.image); // image2D/3D
// Multiple voxel volumes, always set params
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.PointFilter, MipMapFilter.LinearMipFilter);
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter);
paramsSet = true;
}
else if (rt.isCubeMap) {
Expand Down

0 comments on commit 6514b6a

Please sign in to comment.