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

Commit

Permalink
disable mipmaps filter for voxels images.
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Apr 2, 2024
1 parent 12126e8 commit 42d8c47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Sources/iron/RenderPath.hx
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ class RenderPath {
if (rt == null ||
rt.raw.width > 0 ||
rt.depthStencilFrom == "" ||
rt == depthToRenderTarget.get(rt.depthStencilFrom)) {
rt == depthToRenderTarget.get(rt.depthStencilFrom) ||
rt.raw.is_image == true) {
continue;
}

Expand All @@ -580,15 +581,16 @@ class RenderPath {
if (rt2 == null ||
rt2.raw.width > 0 ||
rt2.depthStencilFrom != "" ||
depthToRenderTarget.get(rt2.raw.depth_buffer) != null) {
depthToRenderTarget.get(rt2.raw.depth_buffer) != null ||
rt2.raw.is_image == true) {
continue;
}

nodepth = rt2;
break;
}

if (nodepth != null && nodepth.raw.is_image != true) {
if (nodepth != null) {
rt.image.setDepthStencilFrom(nodepth.image);
}
}
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 @@ -184,7 +184,7 @@ class Uniforms {
g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.NoMipFilter);
}
else {
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter);
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Mirror, TextureAddressing.Mirror, TextureAddressing.Mirror, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.NoMipFilter);
}
paramsSet = true;
}
Expand Down

0 comments on commit 42d8c47

Please sign in to comment.