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

Gi clipmaps fix latency and crashes #213

Merged
merged 6 commits into from
Aug 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Sources/iron/RenderPath.hx
Original file line number Diff line number Diff line change
Expand Up @@ -689,14 +689,18 @@ class RenderPath {
if (height < 1) height = 1;
if (t.depth != null && t.depth > 1) { // 3D texture
// Image only
return Image.create3D(width, height, depth, t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32);
var img = Image.create3D(width, height, depth,
t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32);
if (t.mipmaps)
img.generateMipmaps(1000); // Allocate mipmaps
return img;
}
else { // 2D texture
if (t.is_image != null && t.is_image) { // Image
var img = Image.create(width, height,
t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32);
if (t.mipmaps)
img.generateMipmaps(16); // Allocate mipmaps
img.generateMipmaps(1000); // Allocate mipmaps
e2002e marked this conversation as resolved.
Show resolved Hide resolved
return img;
}
else { // Render target
Expand Down