From 66f2687adce1fa78b70b7e66726d944f9c4801a1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 9 Nov 2024 22:56:25 -0800 Subject: [PATCH] Morrowind: Fix render crash --- src/Morrowind/Render.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Morrowind/Render.ts b/src/Morrowind/Render.ts index 2049ab504..52f42e13a 100644 --- a/src/Morrowind/Render.ts +++ b/src/Morrowind/Render.ts @@ -5,14 +5,14 @@ import { White, colorCopy, colorFromRGBA8, colorLerp, colorNewCopy } from "../Co import * as DDS from "../DarkSouls/dds.js"; import { NamedArrayBufferSlice } from "../DataFetcher.js"; import { AABB, Frustum } from "../Geometry.js"; -import { getMatrixTranslation, invlerp, setMatrixTranslation } from "../MathHelpers.js"; +import { getMatrixTranslation, invlerp } from "../MathHelpers.js"; import { DeviceProgram } from "../Program.js"; import { SceneContext } from "../SceneBase.js"; import { TextureMapping } from "../TextureHolder.js"; import { makeStaticDataBuffer } from "../gfx/helpers/BufferHelpers.js"; -import { makeAttachmentClearDescriptor, makeBackbufferDescSimple, standardFullClearRenderPassDescriptor } from "../gfx/helpers/RenderGraphHelpers.js"; +import { makeAttachmentClearDescriptor, makeBackbufferDescSimple } from "../gfx/helpers/RenderGraphHelpers.js"; import { fillColor, fillMatrix4x3, fillMatrix4x4, fillVec3v } from "../gfx/helpers/UniformBufferHelpers.js"; -import { GfxBindingLayoutDescriptor, GfxBuffer, GfxBufferUsage, GfxClipSpaceNearZ, GfxCullMode, GfxDevice, GfxFormat, GfxFrontFaceMode, GfxIndexBufferDescriptor, GfxInputLayout, GfxInputLayoutBufferDescriptor, GfxMipFilterMode, GfxProgram, GfxSamplerFormatKind, GfxTexFilterMode, GfxTexture, GfxTextureDimension, GfxTextureUsage, GfxVertexAttributeDescriptor, GfxVertexBufferDescriptor, GfxVertexBufferFrequency, GfxWrapMode, makeTextureDescriptor2D } from "../gfx/platform/GfxPlatform.js"; +import { GfxBindingLayoutDescriptor, GfxBuffer, GfxBufferUsage, GfxClipSpaceNearZ, GfxCullMode, GfxDevice, GfxFormat, GfxIndexBufferDescriptor, GfxInputLayout, GfxInputLayoutBufferDescriptor, GfxMipFilterMode, GfxProgram, GfxSamplerFormatKind, GfxTexFilterMode, GfxTexture, GfxTextureDimension, GfxTextureUsage, GfxVertexAttributeDescriptor, GfxVertexBufferDescriptor, GfxVertexBufferFrequency, GfxWrapMode, makeTextureDescriptor2D } from "../gfx/platform/GfxPlatform.js"; import { GfxRenderCache } from "../gfx/render/GfxRenderCache.js"; import { GfxrAttachmentSlot } from "../gfx/render/GfxRenderGraph.js"; import { GfxRenderHelper } from "../gfx/render/GfxRenderHelper.js"; @@ -496,7 +496,7 @@ class CellData { const bindingLayoutsTerrain: GfxBindingLayoutDescriptor[] = [ { numUniformBuffers: 2, numSamplers: 2, samplerEntries: [ { dimension: GfxTextureDimension.n2DArray, formatKind: GfxSamplerFormatKind.Float, }, - { dimension: GfxTextureDimension.n2D, formatKind: GfxSamplerFormatKind.Float, }, // TODO(jstpierre): Integer texture for the map lookup? + { dimension: GfxTextureDimension.n2D, formatKind: GfxSamplerFormatKind.UnfilterableFloat, }, // TODO(jstpierre): Integer texture for the map lookup? ] }, ];