Skip to content

Commit

Permalink
Texture bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
xCollateral committed Oct 27, 2023
1 parent f89d925 commit a135a5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void _setShaderTexture(int i, ResourceLocation location) {
if (i >= 0 && i < shaderTextures.length) {
TextureManager textureManager = Minecraft.getInstance().getTextureManager();
AbstractTexture abstractTexture = textureManager.getTexture(location);
abstractTexture.bind();
VTextureSelector.bindTexture(i, ((VAbstractTextureI)abstractTexture).getVulkanImage());

//shaderTextures[i] = abstractTexture.getId();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public void bindTexture() {
}

public VulkanImage getVulkanImage() {
return vulkanImage;
if(vulkanImage != null)
return vulkanImage;
else {
return GlTexture.getTexture(this.id).getVulkanImage();
}
}

public void setVulkanImage(VulkanImage image) {
Expand Down

0 comments on commit a135a5a

Please sign in to comment.