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

Commit

Permalink
use names to test for setting texture parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Apr 23, 2024
1 parent 5ee9222 commit 6dd8021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/iron/object/Uniforms.hx
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ class Uniforms {
if (isImage) {
// Multiple voxel volumes, always set params
g.setImageTexture(context.textureUnits[j], rt.image); // image2D/3D
if (rt.raw.depth <= 1) {
if (rt.raw.name.startsWith("voxels_")) {
g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter);
}
else {
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.PointFilter, MipMapFilter.NoMipFilter);
else if (rt.raw.name.startsWith("voxels")) {
g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Mirror, TextureAddressing.Mirror, TextureAddressing.Mirror, TextureFilter.LinearFilter, TextureFilter.PointFilter, MipMapFilter.NoMipFilter);
}
paramsSet = true;
}
Expand Down

0 comments on commit 6dd8021

Please sign in to comment.