use of net.coderbot.iris.gl.texture.InternalTextureFormat in project Iris by IrisShaders.
the class IrisImages method addShadowColorImages.
public static void addShadowColorImages(ImageHolder images, ShadowRenderTargets shadowRenderTargets) {
for (int i = 0; i < shadowRenderTargets.getNumColorTextures(); i++) {
final int index = i;
IntSupplier textureID = () -> shadowRenderTargets.getColorTextureId(index);
InternalTextureFormat format = shadowRenderTargets.getColorTextureFormat(index);
images.addTextureImage(textureID, format, "shadowcolorimg" + i);
}
}
use of net.coderbot.iris.gl.texture.InternalTextureFormat in project Iris by IrisShaders.
the class IrisImages method addRenderTargetImages.
public static void addRenderTargetImages(ImageHolder images, Supplier<ImmutableSet<Integer>> flipped, RenderTargets renderTargets) {
for (int i = 0; i < renderTargets.getRenderTargetCount(); i++) {
final int index = i;
// Note: image bindings *are* impacted by buffer flips.
IntSupplier textureID = () -> {
ImmutableSet<Integer> flippedBuffers = flipped.get();
RenderTarget target = renderTargets.get(index);
if (flippedBuffers.contains(index)) {
return target.getAltTexture();
} else {
return target.getMainTexture();
}
};
final InternalTextureFormat internalFormat = renderTargets.get(i).getInternalFormat();
final String name = "colorimg" + i;
images.addTextureImage(textureID, internalFormat, name);
}
}
Aggregations