@carbonenginejs/runtime 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -125
- package/dist/audio/index.js +8 -1
- package/dist/audio/index.js.map +1 -1
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js +84 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js +14 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js +25 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js +58 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js.map +1 -0
- package/dist/audio/trinity/audio/AudManager.js +1 -1
- package/dist/audio/trinity/audio/AudManager.js.map +1 -1
- package/dist/audio/trinity/audio/{AudObstructionOcclusion.js → AudObstructionOcclusion/AudObstructionOcclusion.js} +8 -52
- package/dist/audio/trinity/audio/AudObstructionOcclusion/AudObstructionOcclusion.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js +17 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js +46 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js.map +1 -0
- package/dist/audio/trinity/index.js +8 -1
- package/dist/audio/trinity/index.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceConstruction.js +5 -0
- package/dist/character/CjsCharacterAppearanceConstruction.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceManager.js +14 -0
- package/dist/character/CjsCharacterAppearanceManager.js.map +1 -1
- package/dist/character/CjsCharacterFoundationConstruction.js +5 -0
- package/dist/character/CjsCharacterFoundationConstruction.js.map +1 -1
- package/dist/character/CjsCharacterTexturePolicy.js +5 -0
- package/dist/character/CjsCharacterTexturePolicy.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js +17 -0
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js +2 -0
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js +2 -0
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js +5 -0
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js +5 -0
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js.map +1 -1
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js +9 -0
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js.map +1 -1
- package/dist/global/blue/CjsScriptCallback.js +142 -0
- package/dist/global/blue/CjsScriptCallback.js.map +1 -0
- package/dist/global/blue/index.js +2 -0
- package/dist/global/blue/index.js.map +1 -0
- package/dist/global/consts/renderContext/formats.js +51 -1
- package/dist/global/consts/renderContext/formats.js.map +1 -1
- package/dist/global/consts/renderContext/index.js +2 -2
- package/dist/global/consts/renderContext/renderStates.js +16 -1
- package/dist/global/consts/renderContext/renderStates.js.map +1 -1
- package/dist/global/contracts/index.js +0 -1
- package/dist/global/contracts/index.js.map +1 -1
- package/dist/global/index.js +4 -3
- package/dist/global/index.js.map +1 -1
- package/dist/global/math/index.js +2 -0
- package/dist/global/math/index.js.map +1 -1
- package/dist/global/math/mesh.js +70 -16
- package/dist/global/math/mesh.js.map +1 -1
- package/dist/global/math/noise.js +47 -68
- package/dist/global/math/noise.js.map +1 -1
- package/dist/global/math/pool.js +18 -3
- package/dist/global/math/pool.js.map +1 -1
- package/dist/global/math/random.js +52 -0
- package/dist/global/math/random.js.map +1 -0
- package/dist/global/math/tri3.js +18 -4
- package/dist/global/math/tri3.js.map +1 -1
- package/dist/global/schema/CjsSchema.js +20 -2
- package/dist/global/schema/CjsSchema.js.map +1 -1
- package/dist/global/schema/hydration.js +14 -0
- package/dist/global/schema/hydration.js.map +1 -1
- package/dist/global/utils/bytes.js +22 -4
- package/dist/global/utils/bytes.js.map +1 -1
- package/dist/global/utils/checksum.js +80 -0
- package/dist/global/utils/checksum.js.map +1 -0
- package/dist/global/utils/errors/CjsCancellationError.js +36 -0
- package/dist/global/utils/errors/CjsCancellationError.js.map +1 -0
- package/dist/global/utils/errors/CjsError.js +21 -52
- package/dist/global/utils/errors/CjsError.js.map +1 -1
- package/dist/global/utils/errors/abort.js +1 -1
- package/dist/global/utils/errors/abort.js.map +1 -1
- package/dist/global/utils/errors/index.js +2 -1
- package/dist/global/utils/errors/index.js.map +1 -1
- package/dist/global/utils/index.js +4 -2
- package/dist/global/utils/index.js.map +1 -1
- package/dist/index.js +95 -35
- package/dist/index.js.map +1 -1
- package/dist/input/Tr2MainWindow.js +7 -9
- package/dist/input/Tr2MainWindow.js.map +1 -1
- package/dist/resource/CjsResMan.js +33 -39
- package/dist/resource/CjsResMan.js.map +1 -1
- package/dist/resource/CjsResource.js +19 -5
- package/dist/resource/CjsResource.js.map +1 -1
- package/dist/resource/audio/AudioGeometryResData.js +22 -27
- package/dist/resource/audio/AudioGeometryResData.js.map +1 -1
- package/dist/resource/audio/CjsAudioRes.js +4 -5
- package/dist/resource/audio/CjsAudioRes.js.map +1 -1
- package/dist/resource/format/CjsBitReader.js +263 -0
- package/dist/resource/format/CjsBitReader.js.map +1 -0
- package/dist/resource/format/CjsByteReader.js +130 -125
- package/dist/resource/format/CjsByteReader.js.map +1 -1
- package/dist/resource/format/CjsFormat.js +11 -4
- package/dist/resource/format/CjsFormat.js.map +1 -1
- package/dist/resource/format/CjsFormatError.js +37 -1
- package/dist/resource/format/CjsFormatError.js.map +1 -1
- package/dist/resource/format/CjsResourceProbe.js +41 -37
- package/dist/resource/format/CjsResourceProbe.js.map +1 -1
- package/dist/resource/format/carbonRecordGuard.js +33 -0
- package/dist/resource/format/carbonRecordGuard.js.map +1 -0
- package/dist/resource/format/imageSignatures.js +202 -0
- package/dist/resource/format/imageSignatures.js.map +1 -0
- package/dist/resource/format/index.js +2 -1
- package/dist/resource/format/index.js.map +1 -1
- package/dist/resource/format/jsonPolicies.js +180 -0
- package/dist/resource/format/jsonPolicies.js.map +1 -0
- package/dist/resource/formats/black/core/helpers.js +18 -29
- package/dist/resource/formats/black/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/CjsBnkFormat.js +4 -3
- package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/resource/formats/bnk/core/WwiseCursor.js +218 -0
- package/dist/resource/formats/bnk/core/WwiseCursor.js.map +1 -0
- package/dist/resource/formats/bnk/core/busNodes.js +2 -1
- package/dist/resource/formats/bnk/core/busNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/effectNodes.js +2 -1
- package/dist/resource/formats/bnk/core/effectNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/eventAction.js +15 -93
- package/dist/resource/formats/bnk/core/eventAction.js.map +1 -1
- package/dist/resource/formats/bnk/core/globalSettings.js +19 -94
- package/dist/resource/formats/bnk/core/globalSettings.js.map +1 -1
- package/dist/resource/formats/bnk/core/helpers.js +2 -48
- package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/core/musicNodes.js +42 -134
- package/dist/resource/formats/bnk/core/musicNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/nodeBase.js +20 -111
- package/dist/resource/formats/bnk/core/nodeBase.js.map +1 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js +2 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js.map +1 -1
- package/dist/resource/formats/cmf/CjsCmfFormat.js +242 -228
- package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
- package/dist/resource/formats/cmf/core/binary.js +54 -60
- package/dist/resource/formats/cmf/core/binary.js.map +1 -1
- package/dist/resource/formats/dds/CjsDdsFormat.js +5 -3
- package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
- package/dist/resource/formats/dds/core/bc6h.js +16 -18
- package/dist/resource/formats/dds/core/bc6h.js.map +1 -1
- package/dist/resource/formats/dds/core/bc7.js +28 -24
- package/dist/resource/formats/dds/core/bc7.js.map +1 -1
- package/dist/resource/formats/dds/core/helpers.js +7 -133
- package/dist/resource/formats/dds/core/helpers.js.map +1 -1
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js +3 -2
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/resource/formats/dxbc/core/helpers.js +4 -32
- package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
- package/dist/resource/formats/fbx/CjsFbxFormat.js +11 -0
- package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
- package/dist/resource/formats/fbx/core/helpers.js +18 -12
- package/dist/resource/formats/fbx/core/helpers.js.map +1 -1
- package/dist/resource/formats/flac/CjsFlacFormat.js +4 -9
- package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/resource/formats/flac/core/helpers.js +1 -62
- package/dist/resource/formats/flac/core/helpers.js.map +1 -1
- package/dist/resource/formats/gif/CjsGifFormat.js +4 -9
- package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/resource/formats/gif/core/helpers.js +1 -63
- package/dist/resource/formats/gif/core/helpers.js.map +1 -1
- package/dist/resource/formats/gltf/CjsGltfFormat.js +4 -3
- package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/resource/formats/gltf/core/helpers.js +3 -19
- package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/CjsGr2Format.js +105 -92
- package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/resource/formats/gr2/core/container.js +1 -10
- package/dist/resource/formats/gr2/core/container.js.map +1 -1
- package/dist/resource/formats/gr2/core/helpers.js +24 -35
- package/dist/resource/formats/gr2/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/core/shared.js +193 -189
- package/dist/resource/formats/gr2/core/shared.js.map +1 -1
- package/dist/resource/formats/hlsl/CjsHlslFormat.js +4 -3
- package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/resource/formats/hlsl/core/helpers.js +1 -30
- package/dist/resource/formats/hlsl/core/helpers.js.map +1 -1
- package/dist/resource/formats/jpeg/CjsJpegFormat.js +5 -3
- package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
- package/dist/resource/formats/jpeg/core/helpers.js +7 -134
- package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp3/CjsMp3Format.js +4 -9
- package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
- package/dist/resource/formats/mp3/core/helpers.js +1 -64
- package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp4/CjsMp4Format.js +4 -9
- package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
- package/dist/resource/formats/mp4/core/helpers.js +1 -73
- package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
- package/dist/resource/formats/obj/CjsObjFormat.js +4 -3
- package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/resource/formats/obj/core/helpers.js +93 -115
- package/dist/resource/formats/obj/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/CjsOggFormat.js +4 -3
- package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/resource/formats/ogg/core/helpers.js +1 -15
- package/dist/resource/formats/ogg/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/core/vorbis.js +138 -144
- package/dist/resource/formats/ogg/core/vorbis.js.map +1 -1
- package/dist/resource/formats/pickle/CjsPickleFormat.js +83 -114
- package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
- package/dist/resource/formats/png/CjsPngFormat.js +5 -3
- package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
- package/dist/resource/formats/png/core/helpers.js +13 -152
- package/dist/resource/formats/png/core/helpers.js.map +1 -1
- package/dist/resource/formats/png/core/writer.js +3 -27
- package/dist/resource/formats/png/core/writer.js.map +1 -1
- package/dist/resource/formats/red/core/helpers.js +19 -29
- package/dist/resource/formats/red/core/helpers.js.map +1 -1
- package/dist/resource/formats/stl/CjsStlFormat.js +158 -147
- package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/resource/formats/stl/core/helpers.js +44 -66
- package/dist/resource/formats/stl/core/helpers.js.map +1 -1
- package/dist/resource/formats/tga/CjsTgaFormat.js +5 -3
- package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
- package/dist/resource/formats/tga/core/helpers.js +7 -153
- package/dist/resource/formats/tga/core/helpers.js.map +1 -1
- package/dist/resource/formats/vta/CjsVtaFormat.js +4 -3
- package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
- package/dist/resource/formats/vta/core/helpers.js +1 -17
- package/dist/resource/formats/vta/core/helpers.js.map +1 -1
- package/dist/resource/formats/wav/CjsWavFormat.js +4 -3
- package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
- package/dist/resource/formats/wav/core/helpers.js +1 -15
- package/dist/resource/formats/wav/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgl/CjsWebglFormat.js +4 -3
- package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +69 -9
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +12 -3
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -1
- package/dist/resource/formats/webgl/core/helpers.js +39 -68
- package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +4 -3
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/resource/formats/webgpu/core/helpers.js +4 -30
- package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
- package/dist/resource/formats/webm/CjsWebmFormat.js +4 -9
- package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
- package/dist/resource/formats/webm/core/helpers.js +1 -73
- package/dist/resource/formats/webm/core/helpers.js.map +1 -1
- package/dist/resource/formats/webp/CjsWebpFormat.js +4 -9
- package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/resource/formats/webp/core/helpers.js +1 -62
- package/dist/resource/formats/webp/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/CjsWemFormat.js +4 -3
- package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/resource/formats/wem/core/bitStream.js +83 -106
- package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
- package/dist/resource/formats/wem/core/codebookLibrary.js +52 -52
- package/dist/resource/formats/wem/core/codebookLibrary.js.map +1 -1
- package/dist/resource/formats/wem/core/helpers.js +1 -15
- package/dist/resource/formats/wem/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/core/wemToOgg.js +67 -67
- package/dist/resource/formats/wem/core/wemToOgg.js.map +1 -1
- package/dist/resource/geometry/MeshDecalData.js +23 -25
- package/dist/resource/geometry/MeshDecalData.js.map +1 -1
- package/dist/resource/geometry/MeshDecalLodData.js +14 -23
- package/dist/resource/geometry/MeshDecalLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryRes.js +299 -284
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResAreaData.js +30 -31
- package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResJointData.js +16 -24
- package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResLodData.js +50 -41
- package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResMeshData.js +32 -32
- package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResSkeletonData.js +14 -23
- package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -1
- package/dist/resource/geometry/TriJointBinding.js +16 -24
- package/dist/resource/geometry/TriJointBinding.js.map +1 -1
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js +22 -27
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/TriRtGeometryConstants.js +50 -41
- package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js +12 -22
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js +30 -31
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +16 -17
- package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +26 -28
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +24 -25
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +21 -22
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +25 -26
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +69 -72
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +17 -18
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +42 -43
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js +26 -5
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js.map +1 -1
- package/dist/resource/shader/reflection/carbonRecordFields.js +87 -90
- package/dist/resource/shader/reflection/carbonRecordFields.js.map +1 -1
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +32 -34
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayRes.js +1 -6
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodManager.js +35 -27
- package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js +16 -24
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePackChannel.js +16 -24
- package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipeline.js +24 -20
- package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineParams.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +18 -25
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +11 -16
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +12 -22
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +38 -26
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
- package/dist/resource/worker/CjsResManMainThreadLoader.js +2 -5
- package/dist/resource/worker/CjsResManMainThreadLoader.js.map +1 -1
- package/dist/resource/worker/CjsResManWorkerLoader.js +6 -7
- package/dist/resource/worker/CjsResManWorkerLoader.js.map +1 -1
- package/dist/resource/worker/protocol.js +18 -1
- package/dist/resource/worker/protocol.js.map +1 -1
- package/dist/sof/EveSOF.js +2 -222
- package/dist/sof/EveSOF.js.map +1 -1
- package/dist/sof/SofDocumentBuilder.js +205 -0
- package/dist/sof/SofDocumentBuilder.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js.map +1 -0
- package/dist/sof/faction/EveSOFDataFactionColorSet.js +3 -27
- package/dist/sof/faction/EveSOFDataFactionColorSet.js.map +1 -1
- package/dist/sof/faction/index.js +3 -1
- package/dist/sof/faction/index.js.map +1 -1
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/EveSOFDataGeneric.js +5 -69
- package/dist/sof/generic/EveSOFDataGeneric.js.map +1 -1
- package/dist/sof/generic/index.js +5 -1
- package/dist/sof/generic/index.js.map +1 -1
- package/dist/sof/index.js +23 -7
- package/dist/sof/index.js.map +1 -1
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js +20 -0
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js.map +1 -0
- package/dist/sof/pattern/EveSOFDataPattern.js +2 -17
- package/dist/sof/pattern/EveSOFDataPattern.js.map +1 -1
- package/dist/sof/pattern/index.js +2 -1
- package/dist/sof/pattern/index.js.map +1 -1
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js.map +1 -0
- package/dist/sof/shared/EveSOFDataArea.js +2 -13
- package/dist/sof/shared/EveSOFDataArea.js.map +1 -1
- package/dist/sof/shared/EveSOFDataLogoSet.js +3 -27
- package/dist/sof/shared/EveSOFDataLogoSet.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameter.js +2 -146
- package/dist/sof/shared/EveSOFDataParameter.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameterBool.js +40 -0
- package/dist/sof/shared/EveSOFDataParameterBool.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js +36 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js.map +1 -0
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js → EveSOFDataSpotLightAttachment.js} +1 -1
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js.map → EveSOFDataSpotLightAttachment.js.map} +1 -1
- package/dist/sof/shared/index.js +13 -4
- package/dist/sof/shared/index.js.map +1 -1
- package/dist/sof/sofDocumentValues.js +33 -0
- package/dist/sof/sofDocumentValues.js.map +1 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js +168 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js.map +1 -0
- package/dist/trinity/controllers/{ITr2Controller.js → ITr2Controller/ITr2Controller.js} +2 -134
- package/dist/trinity/controllers/ITr2Controller/ITr2Controller.js.map +1 -0
- package/dist/trinity/controllers/Tr2Controller.js +2 -1
- package/dist/trinity/controllers/Tr2Controller.js.map +1 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js +2 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js.map +1 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js +2 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js.map +1 -1
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js +10 -9
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js.map +1 -1
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js +26 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js +24 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js +387 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js +4 -1011
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js.map +1 -1
- package/dist/trinity/controllers/expression/expressionRuntime.js +605 -0
- package/dist/trinity/controllers/expression/expressionRuntime.js.map +1 -0
- package/dist/trinity/controllers/index.js +5 -2
- package/dist/trinity/controllers/index.js.map +1 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js +2 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js.map +1 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js +2 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js.map +1 -1
- package/dist/trinity/core/ITr2Updateable.js +2 -1
- package/dist/trinity/core/ITr2Updateable.js.map +1 -1
- package/dist/trinity/core/Tr2Blitter.js +6 -3
- package/dist/trinity/core/Tr2Blitter.js.map +1 -1
- package/dist/trinity/core/Tr2Denoiser.js +256 -0
- package/dist/trinity/core/Tr2Denoiser.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js +115 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js +79 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js.map +1 -0
- package/dist/trinity/core/{Tr2GpuResourcePool.js → Tr2GpuResourcePool/Tr2GpuResourcePool.js} +63 -151
- package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -0
- package/dist/trinity/core/{Tr2QuadRenderer.js → Tr2QuadRenderer/Tr2QuadRenderer.js} +8 -30
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRenderer.js.map +1 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js +38 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js.map +1 -0
- package/dist/trinity/core/Tr2RenderUtils.js +20 -3
- package/dist/trinity/core/Tr2RenderUtils.js.map +1 -1
- package/dist/trinity/core/Tr2Renderer.js +146 -1
- package/dist/trinity/core/Tr2Renderer.js.map +1 -1
- package/dist/trinity/core/Tr2ShadowMap.js +135 -14
- package/dist/trinity/core/Tr2ShadowMap.js.map +1 -1
- package/dist/trinity/core/{Tr2TextureArray.js → Tr2TextureArray/Tr2TextureArray.js} +3 -58
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js +61 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js +26 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js +29 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/{ITriRenderBatchAccumulator.js → TriRenderBatch/ITriRenderBatchAccumulator.js} +30 -30
- package/dist/trinity/core/batch/TriRenderBatch/ITriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/{Tr2RenderBatch.js → TriRenderBatch/Tr2RenderBatch.js} +81 -154
- package/dist/trinity/core/batch/TriRenderBatch/Tr2RenderBatch.js.map +1 -0
- package/dist/trinity/core/batch/{TriRenderBatchAccumulator.js → TriRenderBatch/TriRenderBatchAccumulator.js} +7 -38
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js +61 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js +40 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatchMap.js +6 -1
- package/dist/trinity/core/batch/TriRenderBatchMap.js.map +1 -1
- package/dist/trinity/core/context/Tr2RenderContext.js +75 -57
- package/dist/trinity/core/context/Tr2RenderContext.js.map +1 -1
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js +67 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js.map +1 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js +50 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js.map +1 -0
- package/dist/trinity/core/device/Tr2DepthStencil.js +186 -13
- package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
- package/dist/trinity/core/device/{Tr2RingBuffer.js → Tr2RingBuffer/Tr2RingBuffer.js} +27 -79
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js +114 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js.map +1 -0
- package/dist/trinity/core/device/{Tr2SuballocatedBuffer.js → Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js} +5 -59
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js +80 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js.map +1 -0
- package/dist/trinity/core/index.js +42 -15
- package/dist/trinity/core/index.js.map +1 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js +6 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
- package/dist/trinity/core/mesh/{ITr2ImpostorSource.js → ITr2ImpostorSource/ITr2ImpostorSource.js} +6 -28
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSource.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js +32 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js.map +1 -0
- package/dist/trinity/core/mesh/{ITr2InstanceData.js → ITr2InstanceData/ITr2InstanceData.js} +5 -29
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js +33 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js +7 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js +6 -2
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js.map +1 -1
- package/dist/trinity/core/rawData/CjsConstantLayout.js +196 -0
- package/dist/trinity/core/rawData/CjsConstantLayout.js.map +1 -0
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js +8 -3
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js +40 -732
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js +69 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js +59 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js +37 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js +31 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js +29 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js +39 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js +30 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js +78 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js +169 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js +107 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js +82 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js +42 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/{Tr2PerObjectData.js → perObjectData/Tr2PerObjectData.js} +110 -62
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js +104 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js +87 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js.map +1 -0
- package/dist/trinity/core/variable/TriVariable.js +83 -83
- package/dist/trinity/core/variable/TriVariable.js.map +1 -1
- package/dist/trinity/core/vertex/{Tr2VertexDefinition.js → Tr2VertexDefinition/Tr2VertexDefinition.js} +4 -20
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinition.js.map +1 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js +29 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js.map +1 -0
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +116 -36
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js +50 -92
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js.map +1 -1
- package/dist/trinity/eve/EveModularObjectModifier.js +9 -5
- package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js +2 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js.map +1 -1
- package/dist/trinity/eve/IEveSpaceObject2.js +2 -1
- package/dist/trinity/eve/IEveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/IEveTransform.js +2 -1
- package/dist/trinity/eve/IEveTransform.js.map +1 -1
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js +2 -2
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js +109 -133
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js +40 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js.map +1 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js +2 -14
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js +18 -0
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js.map +1 -0
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +1 -1
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js.map +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js.map +1 -1
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js +2 -2
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js +4 -2
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js.map +1 -1
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +143 -139
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
- package/dist/trinity/eve/camera/EveCamera.js +1 -1
- package/dist/trinity/eve/camera/EveCamera.js.map +1 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js +12 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js.map +1 -1
- package/dist/trinity/eve/child/EveChildCloud2.js +178 -151
- package/dist/trinity/eve/child/EveChildCloud2.js.map +1 -1
- package/dist/trinity/eve/child/EveChildContainer.js +141 -141
- package/dist/trinity/eve/child/EveChildContainer.js.map +1 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +87 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js +46 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js +35 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildInstancedMeshes.js → EveChildInstancedMeshes/EveChildInstancedMeshes.js} +42 -163
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -0
- package/dist/trinity/eve/child/EveChildMesh.js +218 -218
- package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js +53 -0
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildPartData.js → EveChildPartData/EveChildPartDataPartData.js} +9 -45
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartDataPartData.js.map +1 -0
- package/dist/trinity/eve/child/EveChildParticleSystem.js +30 -29
- package/dist/trinity/eve/child/EveChildParticleSystem.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTransform.js +5 -0
- package/dist/trinity/eve/child/EveChildTransform.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTurret.js +7 -0
- package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
- package/dist/trinity/eve/index.js +10 -4
- package/dist/trinity/eve/index.js.map +1 -1
- package/dist/trinity/eve/lights/Tr2Light.js +5 -0
- package/dist/trinity/eve/lights/Tr2Light.js.map +1 -1
- package/dist/trinity/eve/overlays/overlayBatches.js +6 -1
- package/dist/trinity/eve/overlays/overlayBatches.js.map +1 -1
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js +4 -4
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js +76 -71
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveShip2.js +3 -3
- package/dist/trinity/eve/spaceObject/EveShip2.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +408 -407
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js +9 -9
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveLineSet.js +27 -25
- package/dist/trinity/eve/ui/lines/EveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js +3 -2
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js.map +1 -1
- package/dist/trinity/generated/index.js +0 -1
- package/dist/trinity/generated/index.js.map +1 -1
- package/dist/trinity/generated/trinityCore/index.js +0 -1
- package/dist/trinity/generated/trinityCore/index.js.map +1 -1
- package/dist/trinity/index.js +59 -23
- package/dist/trinity/index.js.map +1 -1
- package/dist/trinity/particle/{ITr2GenericEmitter.js → ITr2GenericEmitter/ITr2GenericEmitter.js} +4 -32
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitter.js.map +1 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js +36 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js.map +1 -0
- package/dist/trinity/particle/Tr2ParticleSystem.js +4 -2
- package/dist/trinity/particle/Tr2ParticleSystem.js.map +1 -1
- package/dist/trinity/particle/element/Tr2ParticleElementData.js +15 -4
- package/dist/trinity/particle/element/Tr2ParticleElementData.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js +21 -20
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +23 -22
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js +14 -13
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js.map +1 -1
- package/dist/trinity/particle/index.js +2 -1
- package/dist/trinity/particle/index.js.map +1 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js +7 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js.map +1 -1
- package/dist/trinity/shader/Tr2Effect.js +131 -58
- package/dist/trinity/shader/Tr2Effect.js.map +1 -1
- package/dist/trinity/shader/Tr2EffectStateManager.js +17 -5
- package/dist/trinity/shader/Tr2EffectStateManager.js.map +1 -1
- package/dist/trinity/shader/Tr2Material.js +21 -4
- package/dist/trinity/shader/Tr2Material.js.map +1 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js +4 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js.map +1 -1
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js +2 -2
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js.map +1 -1
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js +79 -0
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js.map +1 -0
- package/dist/trinityal/{Tr2DeviceResourceAL.js → Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js} +77 -79
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js +24 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DrawUPHelper.js +2 -1
- package/dist/trinityal/Tr2DrawUPHelper.js.map +1 -1
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js +45 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js +154 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js +48 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js +75 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js.map +1 -0
- package/dist/trinityal/{Tr2HalHelperStructures.js → Tr2HalHelperStructures/Tr2TextureSubresource.js} +11 -115
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js +51 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js.map +1 -0
- package/dist/trinityal/{Tr2RenderPassAL.js → Tr2RenderPassAL/Tr2ColorAttachment.js} +5 -28
- package/dist/trinityal/Tr2RenderPassAL/Tr2ColorAttachment.js.map +1 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js +38 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js +80 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js +76 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js +96 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js +196 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js.map +1 -0
- package/dist/trinityal/index.js +22 -9
- package/dist/trinityal/index.js.map +1 -1
- package/dist/trinityal/stub/Tr2BufferALStub.js +86 -141
- package/dist/trinityal/stub/Tr2BufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2CapsALStub.js +17 -0
- package/dist/trinityal/stub/Tr2CapsALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js +57 -41
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2FenceALStub.js +18 -2
- package/dist/trinityal/stub/Tr2FenceALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js +97 -0
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js +124 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js +146 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js +28 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js.map +1 -0
- package/dist/trinityal/stub/{Tr2RenderContextALStub.js → Tr2RenderContextALStub/Tr2RenderContextALStub.js} +70 -75
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js +47 -31
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderALStub.js +61 -45
- package/dist/trinityal/stub/Tr2ShaderALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js +51 -33
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2SwapChainALStub.js +61 -45
- package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2TextureALStub.js +188 -171
- package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js +43 -27
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js.map +1 -1
- package/dist/trinityal/stub/{Tr2VideoAdapterInfoALStub.js → Tr2VideoAdapterInfoStub.js} +16 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoStub.js.map +1 -0
- package/dist/trinityal/stub/index.js +8 -4
- package/dist/trinityal/stub/index.js.map +1 -1
- package/dist/trinityal/vertexLayoutMatch.js +2 -2
- package/dist/trinityal/vertexLayoutMatch.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js +105 -90
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js +17 -0
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js +2 -2
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +900 -938
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js +56 -60
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js +16 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js +100 -379
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js +330 -0
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js.map +1 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
- package/dist/trinityal/webgpu/core/{constantArena.js → CjsWebgpuConstantArena.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuConstantArena.js.map +1 -0
- package/dist/trinityal/webgpu/core/{batchGroups.js → CjsWebgpuEncodeState.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuEncodeState.js.map +1 -0
- package/dist/trinityal/webgpu/core/{perFrameSource.js → CjsWebgpuPerFrameSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPerFrameSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{pipelineCache.js → CjsWebgpuPipelineCache.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPipelineCache.js.map +1 -0
- package/dist/trinityal/webgpu/core/{psoDescription.js → CjsWebgpuPsoDescription.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuPsoDescription.js.map +1 -0
- package/dist/trinityal/webgpu/core/{renderTarget.js → CjsWebgpuRenderTarget.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuRenderTarget.js.map +1 -0
- package/dist/trinityal/webgpu/core/{samplerSource.js → CjsWebgpuSamplerSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuSamplerSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{textureSource.js → CjsWebgpuTextureSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuTextureSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchDispatcher.js → CjsWebgpuTrinityBatchDispatcher.js} +4 -4
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchDispatcher.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchResolver.js → CjsWebgpuTrinityBatchResolver.js} +81 -81
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchResolver.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityPassEncoder.js → CjsWebgpuTrinityPassEncoder.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityPassEncoder.js.map +1 -0
- package/dist/trinityal/webgpu/core/{workQueue.js → CjsWebgpuWorkQueue.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuWorkQueue.js.map +1 -0
- package/dist/trinityal/webgpu/internal.js +12 -11
- package/dist/trinityal/webgpu/internal.js.map +1 -1
- package/docs/audio/reference/classes/trinity.md +44 -34
- package/docs/character/architecture.md +276 -0
- package/docs/character/reference/character-appearance-plans.md +30 -66
- package/docs/character/reference/prepared-libraries.md +14 -30
- package/docs/global/reference/api.md +2 -1
- package/docs/global/reference/classes/README.md +53 -71
- package/docs/global/reference/classes/dropped.md +16 -0
- package/docs/resource/README.md +19 -15
- package/docs/resource/architecture.md +9 -2
- package/docs/resource/concepts/format-capabilities.md +124 -80
- package/docs/resource/concepts/shared-format-helpers.md +94 -0
- package/docs/resource/formats/README.md +230 -224
- package/docs/resource/formats/bitknit2.md +221 -0
- package/docs/resource/formats/carbon-effect-container.md +184 -269
- package/docs/resource/formats/gr2.md +6 -1
- package/docs/resource/formats/schemabound.md +28 -48
- package/docs/resource/formats/static.md +70 -97
- package/docs/resource/formats/webgl/carbon-constant-layouts.md +8 -8
- package/docs/resource/formats/webgl/decl-io.md +165 -256
- package/docs/resource/formats/webgl/memory-structured.md +64 -142
- package/docs/resource/formats/webgl/texture-sample.md +109 -138
- package/docs/resource/formats/webgpu/formats/carbon-webgpu.md +38 -69
- package/docs/resource/formats/webgpu/guides/effect-packaging.md +54 -116
- package/docs/resource/formats/webgpu/reference/api.md +64 -67
- package/docs/resource/formats/webgpu/reference/wgsl-compatibility.md +158 -345
- package/docs/resource/reference/classes/core.md +256 -236
- package/docs/resource/reference/classes/formats.md +1668 -1672
- package/docs/resource/reference/workers.md +4 -2
- package/docs/sof/reference/classes/core.md +1 -1
- package/docs/sof/reference/classes/faction.md +2 -2
- package/docs/sof/reference/classes/generic.md +4 -4
- package/docs/sof/reference/classes/pattern.md +1 -1
- package/docs/sof/reference/classes/shared.md +10 -10
- package/docs/trinity/architecture.md +55 -44
- package/docs/trinity/concepts/generated-class-lifecycle.md +10 -15
- package/docs/trinity/reference/classes/curves-and-utilities.md +496 -506
- package/docs/trinity/reference/classes/dropped.md +0 -189
- package/docs/trinity/reference/classes/eve-runtime.md +8 -8
- package/docs/trinity/reference/classes/generated.md +0 -10
- package/docs/trinity/reference/classes/particle.md +2 -2
- package/docs/trinity/reference/classes/trinity-core.md +1554 -1256
- package/docs/trinity/reference/implementation-status.md +50 -75
- package/docs/trinity/reference/main-semantic-extraction.md +13 -17
- package/docs/trinityal/reference/classes/README.md +77 -27
- package/docs/trinityal/reference/classes/dropped.md +92 -0
- package/docs/trinityal/webgpu/README.md +3 -1
- package/docs/trinityal/webgpu/architecture.md +121 -228
- package/docs/trinityal/webgpu/reference/api.md +5 -5
- package/docs/trinityal/webgpu/reference/classes/README.md +13 -13
- package/format-notices/gr2/NOTICE +18 -12
- package/format-notices/gr2/THIRD-PARTY-NOTICES.md +5 -5
- package/package.json +4 -1
- package/dist/audio/trinity/audio/AudActionLog.js +0 -173
- package/dist/audio/trinity/audio/AudActionLog.js.map +0 -1
- package/dist/audio/trinity/audio/AudObstructionOcclusion.js.map +0 -1
- package/dist/global/contracts/CjsScriptCallback.js +0 -94
- package/dist/global/contracts/CjsScriptCallback.js.map +0 -1
- package/dist/trinity/controllers/ITr2Controller.js.map +0 -1
- package/dist/trinity/core/Tr2GpuResourcePool.js.map +0 -1
- package/dist/trinity/core/Tr2QuadRenderer.js.map +0 -1
- package/dist/trinity/core/Tr2TextureArray.js.map +0 -1
- package/dist/trinity/core/batch/ITriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/batch/Tr2RenderBatch.js.map +0 -1
- package/dist/trinity/core/batch/TriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/context/CjsShadowMapExecutor.js +0 -43
- package/dist/trinity/core/context/CjsShadowMapExecutor.js.map +0 -1
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js +0 -64
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js.map +0 -1
- package/dist/trinity/core/context/Tr2VisibilityResults.js +0 -109
- package/dist/trinity/core/context/Tr2VisibilityResults.js.map +0 -1
- package/dist/trinity/core/device/Tr2RingBuffer.js.map +0 -1
- package/dist/trinity/core/device/Tr2SuballocatedBuffer.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2ImpostorSource.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2InstanceData.js.map +0 -1
- package/dist/trinity/core/rawData/Tr2PerObjectData.js.map +0 -1
- package/dist/trinity/core/rawData/constantLayout.js +0 -175
- package/dist/trinity/core/rawData/constantLayout.js.map +0 -1
- package/dist/trinity/core/vertex/Tr2VertexDefinition.js.map +0 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes.js.map +0 -1
- package/dist/trinity/eve/child/EveChildPartData.js.map +0 -1
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js +0 -47
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js.map +0 -1
- package/dist/trinity/particle/ITr2GenericEmitter.js.map +0 -1
- package/dist/trinityal/Tr2DeviceResourceAL.js.map +0 -1
- package/dist/trinityal/Tr2HalHelperStructures.js.map +0 -1
- package/dist/trinityal/Tr2RenderPassAL.js.map +0 -1
- package/dist/trinityal/Tr2ResourceSetAL.js +0 -419
- package/dist/trinityal/Tr2ResourceSetAL.js.map +0 -1
- package/dist/trinityal/Tr2SamplerDescription.js +0 -72
- package/dist/trinityal/Tr2SamplerDescription.js.map +0 -1
- package/dist/trinityal/stub/Tr2QueryALStub.js +0 -326
- package/dist/trinityal/stub/Tr2QueryALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2RenderContextALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoALStub.js.map +0 -1
- package/dist/trinityal/webgpu/core/batchGroups.js.map +0 -1
- package/dist/trinityal/webgpu/core/constantArena.js.map +0 -1
- package/dist/trinityal/webgpu/core/perFrameSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/pipelineCache.js.map +0 -1
- package/dist/trinityal/webgpu/core/psoDescription.js.map +0 -1
- package/dist/trinityal/webgpu/core/renderTarget.js.map +0 -1
- package/dist/trinityal/webgpu/core/samplerSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/textureSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchDispatcher.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchResolver.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityPassEncoder.js.map +0 -1
- package/dist/trinityal/webgpu/core/workQueue.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2EffectStateManager.js","sources":["../../../../src/trinity/shader/Tr2EffectStateManager.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectStateManager.h\n// Maintained CarbonEngineJS implementation; generated schema is reference-only.\n//\n// STILL INCOMPLETE, and not finished-by-design - but much less so than this\n// note used to claim, and the claim was left standing long after it stopped\n// being true. Implemented: the registration half (registerShader,\n// registerShaderProgram, registerRenderStateSetup, getVertexDeclarationHandle),\n// the m_currentValues redundancy cache, ApplyShaderProgram, ApplyRenderStates,\n// ApplyVertexDeclaration, ApplyStandardStates, ApplyStreamSource,\n// ApplyIndexBuffer, and the viewport and render-target families.\n//\n// Still absent: RegisterShaderProgramOverride, which costs the pixel-shader\n// override path, and DoApplyRenderStates, which is where a state handle turns\n// into the AL's SetRenderStates.\n//\n// This class declares no @carbon.method, so the parity audit cannot see it:\n// an entirely unimplemented class reports clean. Do not read a green audit as\n// evidence that this file is finished.\nimport { type } from \"#schema\";\nimport { CjsModel } from \"#model\";\nimport { RenderingMode } from \"#consts/graphics\";\nimport {\n BlendMode,\n BlendOperation,\n CompareFunc,\n CullMode,\n FillMode,\n RenderState\n} from \"#consts/render-context\";\nimport { Tr2VertexDefinition } from \"../core/vertex/Tr2VertexDefinition.js\";\nimport { Tr2RenderStateSetup } from \"#resource/shader\";\nimport { Failed } from \"../../trinityal/ALResult.js\";\n\n// Carbon's tables are file-scope statics shared across every state manager\n// (Tr2EffectStateManager.cpp:17-27, \"These are shared across managers.\"). Ours\n// are module-scope for the same reason: a handle must mean the same thing to\n// every consumer that compares one.\n//\n// The rows hold IDENTITY ONLY. Carbon's row is the Tr2ShaderAL itself, which it\n// can do because its abstraction layer is compile-time selected and sits below\n// Trinity in one binary. Ours is a sibling layer, so the engine keeps its own\n// handle-to-object map and Trinity never has a field a device object could\n// occupy. Same indirection, boundary drawn at our layering.\n\n// Carbon's UNKNOWN (.h:56), module scope so the reset factory can reach it.\nconst UNKNOWN = 0xFFFFFFFF;\n\n// Carbon's VERTEX_STREAM_MAX_COUNT (.h:55).\nconst VERTEX_STREAM_MAX_COUNT = 4;\n\n/**\n * A reset redundancy cache (`CurrentValues::Reset`, cpp:415-431).\n *\n * Every handle starts UNKNOWN rather than zero, because zero is a VALID handle\n * - it is RM_ANY's empty render-state setup and the first interned program -\n * so a zeroed cache would filter out the very first bind of a span.\n */\nfunction NewCurrentValues()\n{\n const streams = [];\n\n for (let i = 0; i < VERTEX_STREAM_MAX_COUNT; i++)\n {\n streams.push({ vertexBuffer: null, offset: UNKNOWN, stride: UNKNOWN });\n }\n\n return {\n shaderProgram: UNKNOWN,\n vertexDeclaration: UNKNOWN,\n streams,\n indexBuffer: null,\n indexStride: 0,\n renderingMode: UNKNOWN,\n renderStateSetup: UNKNOWN\n };\n}\n\n/** Registered shader identities; the index is the handle. */\nconst shaders = [];\n\n/** Registered shader programs; the index is the handle. */\nconst shaderPrograms = [];\n\n// Carbon s_vertexLayoutMap (Tr2EffectStateManager.cpp:863-877): file-scope,\n// mutex-guarded pairs of (Tr2VertexDefinition, Tr2VertexLayoutAL*), appended on\n// first sight, linear-scanned by the definition's own operator==. Ours holds\n// the definition identity only - the layout half of Carbon's pair is a device\n// object, and per the layering note above the engine keeps its own\n// handle-to-object map (ApplyVertexDeclaration's lazy hvl.Create at cpp:895-903\n// happens on that side of the boundary). Single-threaded JS needs no mutex.\n\n/** Interned vertex declarations; the index is the handle. */\nconst vertexLayouts = [];\n\n/**\n * Realized layouts per context, per handle.\n *\n * Carbon stores the created Tr2VertexLayoutAL beside the definition in its own\n * intern table, because one backend is compiled. Ours must key by CONTEXT too:\n * the table is module-level and shared, and a layout made by one backend must\n * never be handed to another. A WeakMap so a dead context takes its layouts.\n */\nconst vertexLayoutObjects = new WeakMap();\n\n/** Realized shader programs per context, per handle; see vertexLayoutObjects. */\nconst shaderProgramObjects = new WeakMap();\n\n// Carbon interns once at asset load and stores the handle on the mesh, so its\n// linear scan never runs per draw. This runtime has no load hook, so the handle\n// is memoised against the element list or definition a payload already owns -\n// same cost profile, no payload mutation, and it lapses with the payload.\nconst vertexLayoutHandles = new WeakMap();\n\n// Carbon's built-in rendering-mode state lists, ported pair for pair from\n// Tr2EffectStateManager.cpp:29-393. A mode's list occupies the render-state\n// handle equal to its own enum value, which is why the table below is indexed\n// by RenderingMode and why registration begins after RM_COUNT.\n//\n// These are the base layer of every draw. Carbon re-applies the current mode's\n// list immediately before a pass's own states, every time\n// (Tr2EffectStateManager.cpp:716), so a pass that authors only a blend mode\n// still gets this mode's depth, cull and colour-write. Reading a pass's states\n// alone yields a pipeline missing most of its state.\n//\n// RM_ANY is deliberately empty: it means \"the caller does not care\", not \"no\n// state\", and Carbon leaves whatever was last applied in place.\nconst { RS_CULLMODE, RS_FILLMODE, RS_ALPHABLENDENABLE, RS_ALPHATESTENABLE, RS_ALPHAFUNC,\n RS_ALPHAREF, RS_ZENABLE, RS_ZWRITEENABLE, RS_ZFUNC, RS_COLORWRITEENABLE, RS_DEPTHBIAS,\n RS_SLOPESCALEDEPTHBIAS, RS_SEPARATEALPHABLENDENABLE, RS_SRCBLEND, RS_DESTBLEND, RS_BLENDOP,\n RS_BLENDOPALPHA, RS_SRCBLENDALPHA, RS_DESTBLENDALPHA } = RenderState;\n\nconst { CULLMODE_CW, CULLMODE_NONE } = CullMode;\nconst { FM_SOLID } = FillMode;\nconst { CMP_LESSEQUAL, CMP_GREATER, CMP_ALWAYS, CMP_EQUAL } = CompareFunc;\nconst { BM_ONE, BM_SRCALPHA, BM_INVSRCALPHA } = BlendMode;\nconst { BO_ADD } = BlendOperation;\n\nconst ALL_CHANNELS = 0x0f;\nconst RGB_CHANNELS = 0x7;\nconst FALSE = 0;\nconst TRUE = 1;\n\n/** Indexed by RenderingMode; the index IS the render-state handle. */\nconst STANDARD_MODE_PAIRS = Object.freeze([\n // RM_ANY\n [],\n // RM_OPAQUE\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_LESSEQUAL, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DECAL\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, TRUE, RS_ALPHAFUNC, CMP_GREATER, RS_ALPHAREF, 127,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DECAL_NO_DEPTH\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, TRUE, RS_ALPHAFUNC, CMP_GREATER, RS_ALPHAREF, 127,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_ALPHA\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_SRCALPHA, RS_DESTBLEND, BM_INVSRCALPHA, RS_BLENDOP, BO_ADD,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_ALPHA_ADDITIVE - note the colour write is RGB only, alpha is left alone.\n [ RS_FILLMODE, FM_SOLID, RS_CULLMODE, CULLMODE_NONE, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_ONE, RS_BLENDOP, BO_ADD,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, RGB_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DEPTH_ONLY - writes depth and no colour at all.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_LESSEQUAL, RS_COLORWRITEENABLE, 0, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_PICKING\n [ RS_CULLMODE, CULLMODE_CW, RS_ALPHABLENDENABLE, FALSE, RS_ALPHATESTENABLE, FALSE,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_FILLMODE, FM_SOLID, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_FULLSCREEN - no depth at all, and Carbon authors no separate-alpha pair.\n [ RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE, RS_ALPHATESTENABLE, FALSE,\n RS_CULLMODE, CULLMODE_NONE, RS_ZENABLE, FALSE, RS_ZWRITEENABLE, FALSE,\n RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0 ],\n // RM_SPRITE2D - Carbon writes RS_CULLMODE twice; the second wins, so the\n // effective cull is NONE. Kept verbatim rather than tidied.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_INVSRCALPHA, RS_BLENDOP, BO_ADD,\n RS_ALPHATESTENABLE, FALSE, RS_CULLMODE, CULLMODE_NONE, RS_ZENABLE, FALSE,\n RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS,\n RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_CULL - the one-state mode, cull only.\n [ RS_CULLMODE, CULLMODE_CW ],\n // RM_LIGHT - the only mode authoring separate alpha blending. Carbon repeats\n // RS_SLOPESCALEDEPTHBIAS; harmless and kept.\n [ RS_FILLMODE, FM_SOLID, RS_CULLMODE, CULLMODE_NONE, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_ONE, RS_BLENDOP, BO_ADD,\n RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL, RS_ZENABLE, TRUE,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, TRUE, RS_BLENDOPALPHA, BO_ADD,\n RS_SRCBLENDALPHA, BM_ONE, RS_DESTBLENDALPHA, BM_ONE ],\n // RM_ERASE - always passes depth and rewrites it.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0 ],\n // RM_PREPASS_COLOR - tests equal against the prepass depth and never writes.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE,\n RS_ZFUNC, CMP_EQUAL, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ]\n].map(pairs => Object.freeze(pairs)));\n\n\n// Carbon seeds this table with RM_COUNT built-in rendering-mode setups, so\n// handle `i` IS mode `i` for i < RM_COUNT (Tr2EffectStateManager.cpp:397-410),\n// and truncates back to them on device loss rather than emptying (:1012).\n// The mode state lists are not ported yet, so the slots are reserved rather\n// than filled: reserving now keeps every later handle stable when they land.\n// Slot 0 carries RM_ANY's genuinely empty list, which is what makes an\n// unauthored setup intern to 0 exactly as Carbon's does.\nconst renderStateSetups = STANDARD_MODE_PAIRS.map(keyValues => ({\n keyValues,\n setup: Tr2RenderStateSetup.fromKeyValues(keyValues)\n}));\n\n/**\n * Whether two byte sequences are identical.\n *\n * Carbon compares size then `memcmp` over the whole body\n * (Tr2EffectStateManager.cpp:487-491) - never by pointer, so two identical\n * bodies read from different offsets still collapse to one entry.\n *\n * @param {Uint8Array} first Left bytes.\n * @param {Uint8Array} second Right bytes.\n * @returns {boolean} Whether the bytes match.\n */\nfunction isSameBytecode(first, second)\n{\n if (first === second) return true;\n if (!first || !second || first.length !== second.length) return false;\n for (let index = 0; index < first.length; index += 1)\n {\n if (first[index] !== second[index]) return false;\n }\n return true;\n}\n\n/**\n * A canonical key for a stage's static sampler signature.\n *\n * Carbon compares `signature.samplers` and nothing else\n * (Tr2EffectStateManager.cpp:493). Registers, pipeline inputs and thread-group\n * size deliberately do not participate, which is why two effects sharing\n * bytecode but declaring different registers collapse to one entry and the\n * second signature is discarded. That is Carbon's behaviour, reproduced.\n *\n * @param {Map|null} samplers Sampler setup map keyed by register index.\n * @returns {string} Canonical identity.\n */\n/**\n * A canonical key for the backend block riding a stage's signature: FNV-1a over\n * its bytes, so two passes with the same bytecode and different blocks intern\n * as two shaders.\n *\n * @param {object|null} block `{ bytes, size }`, or nothing.\n * @returns {string} The key; empty for no block.\n */\nfunction backendBlockKey(block)\n{\n const bytes = block?.bytes;\n\n if (!bytes || !bytes.length) return \"\";\n\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < bytes.length; index += 1)\n {\n hash ^= bytes[index];\n hash = Math.imul(hash, 0x01000193) >>> 0;\n }\n\n return `${bytes.length}:${hash.toString(16)}`;\n}\n\nfunction samplerSignatureKey(samplers)\n{\n if (!samplers || typeof samplers.entries !== \"function\") return \"[]\";\n const entries = [ ...samplers.entries() ]\n .map(([ register, setup ]) => [\n Number(register),\n typeof setup?.GetValues === \"function\" ? setup.GetValues() : setup ?? null\n ])\n .sort((left, right) => left[0] - right[0]);\n return JSON.stringify(entries);\n}\n\nfunction failState(message)\n{\n const error = new Error(`Tr2EffectStateManager: ${message}`);\n error.code = \"CJS_EFFECT_STATE_INVALID\";\n throw error;\n}\n\n/** Tracks the portable render, stream, buffer, viewport, and override state used while applying an effect, owns the process-wide shader, shader-program and render-state registration tables its handle fields index, and filters redundant binds out of the Apply* surface that carries those handles to the abstraction layer. */\n@type.define({ className: \"Tr2EffectStateManager\", family: \"shader\" })\nexport class Tr2EffectStateManager extends CjsModel\n{\n\n /** m_renderContext (Tr2RenderContext&) */\n @type.rawStruct(\"Tr2RenderContext\")\n renderContext = null;\n\n /** m_perObjectConstantBuffers (Tr2ConstantBufferAL) */\n @type.rawStruct(\"Tr2ConstantBufferAL\")\n perObjectConstantBuffers = null;\n\n // Carbon's CurrentValues and RenderStates are PRIVATE nested structs\n // (Tr2EffectStateManager.h:171-206), and nothing serializes a state manager:\n // it is a runtime object, not a resource. The generator had flattened both\n // structs into schema properties, which declared persisted defaults for state\n // that is neither persisted nor reachable from outside. They are private\n // instance fields here, in Carbon's own shape.\n\n /** m_currentValues - the redundancy cache (.h:193). */\n #currentValues = NewCurrentValues();\n\n /** m_isManagedRendering (.h:195). */\n #isManagedRendering = false;\n\n /**\n * m_renderStateOverrides (.h:209), as FLAGS rather than as value tables.\n *\n * Carbon holds an array of `const uint32_t*` indexed by render state, each\n * pointing at a table indexed by the AUTHORED VALUE, and resolves authored\n * pairs through it at apply time (cpp:722-753). It caches the resolved pairs\n * per setup behind a dirty flag because it re-resolves on every draw.\n *\n * Ours cannot use that table: a registered setup is interpreted ONCE at\n * registration into named values, so there are no raw pairs left to index.\n * The equivalent tables live in interpreted space on Tr2RenderStateSetup, and\n * this holds only which of them apply. Carbon's per-setup cache has no\n * counterpart either, and needs none: the projection feeds a pipeline key\n * that already includes the flags' effect, so the two variants are distinct\n * cache entries rather than one entry that must be invalidated.\n *\n * Wireframe (`SetWireframeRendering`, cpp:800-812) is NOT YET PORTED, which\n * is different from being unwanted - it is a working tool for anyone looking\n * at geometry.\n *\n * An earlier note here said it was \"deliberately absent\" because neither\n * browser backend has a fill mode. Half of that is true and the conclusion\n * is not. Neither has an equivalent of `glPolygonMode`, so Carbon's\n * render-state route genuinely cannot be projected - but wireframe does not\n * need one:\n *\n * - LINE TOPOLOGY, reachable today. Carbon's topology 2 and 3 already map\n * to line primitives in the engine layer, so a pass can be drawn as\n * lines by choosing its topology. Edges are shared, so a triangle list\n * drawn this way is not a true wireframe without an index rebuild.\n * - BARYCENTRIC EDGES in the fragment shader. No new geometry, no index\n * rebuild, and usable line widths. This is the usual browser answer.\n *\n * So the blocker is a decision about which route to take, not a missing\n * capability. What must NOT happen is the toggle silently doing nothing.\n */\n #overrides = { invertedDepthTest: false, invertedCullMode: false, wireframe: false };\n\n /** m_renderTargetWidth (int) */\n @type.int32\n renderTargetWidth = 0;\n\n /** m_renderTargetHeight (int) */\n @type.int32\n renderTargetHeight = 0;\n\n /** m_viewport (CTriViewport) */\n @type.rawStruct(\"CTriViewport\")\n viewport = null;\n\n /** m_viewportOnDevice (Tr2Viewport) */\n @type.rawStruct(\"Tr2Viewport\")\n viewportOnDevice = null;\n\n /** m_viewportStack (std::list<CTriViewport>) */\n @type.rawStruct(\"std::list<CTriViewport>\")\n viewportStack = null;\n\n /** m_viewportSizeVar (Tr2Variable) */\n @type.rawStruct(\"Tr2Variable\")\n viewportSizeVar = null;\n\n static RenderingMode = RenderingMode;\n\n /**\n * Carbon's failure and unset handle (`UNKNOWN`, Tr2EffectStateManager.h:56).\n *\n * The same numeric value is spelled `UNINITIALIZED_DECLARATION` (.h:81) and\n * `Tr2EffectStageInput::INVALID` (Tr2EffectDescription.h:172). It must stay\n * `0xFFFFFFFF` rather than `-1`, or the unsigned range checks below flip\n * sign.\n */\n static Unknown = UNKNOWN;\n\n /**\n * Bind an empty vertex layout (`NULL_DECLARATION`, .h:82).\n *\n * A meaningful value, not an error, and deliberately distinct from\n * `Unknown` - do not collapse the two.\n */\n static NullDeclaration = 0xFFFFFFFE;\n\n /**\n * Interns one shader stage's identity and returns its handle.\n *\n * Carbon `RegisterShader` (Tr2EffectStateManager.cpp:466-513) creates the\n * device object here, on the main-thread render context. We register at\n * prepare instead of at read, so this stores identity only and the engine\n * realizes against the handle; see the effect read path decision.\n *\n * Dedupe is Carbon's exactly: stage type, then byte-for-byte body equality,\n * then the static sampler signature. A body registered under a different\n * stage type is a different entry, and so is the same body with different\n * samplers.\n *\n * @param {number} stageType Carbon shader stage type.\n * @param {Uint8Array} bytecode Compiled stage body.\n * @param {object} [signature] Stage signature; only `samplers` participates.\n * @returns {number} Stable handle, or `Unknown` when the body is absent.\n */\n static registerShader(stageType, bytecode, signature = null)\n {\n if (!bytecode || bytecode.length === 0) return Tr2EffectStateManager.Unknown;\n\n const type = Number(stageType);\n // THE BACKEND BLOCK IS PART OF THE KEY. Carbon dedupes on bytecode and\n // samplers because the signature is derived from the bytecode; ours also\n // carries the pass's per-backend block on the signature, and two passes\n // can share a stage's bytecode while laying its bindings out differently.\n // Keyed on bytecode alone, the second pass compiled against the first\n // pass's block.\n const samplerKey = `${samplerSignatureKey(signature?.samplers)}|${backendBlockKey(signature?.backendBlock)}`;\n\n for (let handle = 0; handle < shaders.length; handle += 1)\n {\n const existing = shaders[handle];\n if (existing.stageType !== type) continue;\n if (!isSameBytecode(existing.bytecode, bytecode)) continue;\n if (existing.samplerKey !== samplerKey) continue;\n return handle;\n }\n\n // THE SIGNATURE IS KEPT, not just its sampler key. The key is the identity\n // half - two shaders with the same bytecode and different sampler bindings\n // are different shaders - but the signature itself is what a backend needs\n // to create a shader object, and dropping it here made the row unable to\n // produce one. Carbon does not face this: its row holds the created\n // Tr2ShaderAL, which carries the signature already.\n return shaders.push({ stageType: type, bytecode, samplerKey, signature }) - 1;\n }\n\n /**\n * Interns a program over already-registered stage handles.\n *\n * Carbon `RegisterShaderProgram` (Tr2EffectStateManager.cpp:545-579). The key\n * is the exact ordered handle list, so it is length- and order-sensitive:\n * `[vs, ps]` and `[ps, vs]` are two programs. Carbon's caller fills the array\n * in the effect file's stage order, not by stage type.\n *\n * @param {number[]} shaderHandles Handles from `registerShader`.\n * @returns {number} Stable handle, or `Unknown` for an empty or stale list.\n */\n static registerShaderProgram(shaderHandles)\n {\n const handles = [ ...(shaderHandles ?? []) ].map(Number);\n if (handles.length === 0) return Tr2EffectStateManager.Unknown;\n // An out-of-range member also catches Unknown and INVALID, because both are\n // 0xFFFFFFFF and every table check is a range check rather than a sentinel\n // comparison (Tr2EffectStateManager.cpp:558-561).\n if (handles.some(handle => !(handle >= 0 && handle < shaders.length)))\n {\n return Tr2EffectStateManager.Unknown;\n }\n\n for (let handle = 0; handle < shaderPrograms.length; handle += 1)\n {\n const existing = shaderPrograms[handle].shaderHandles;\n if (existing.length !== handles.length) continue;\n if (existing.every((value, index) => value === handles[index])) return handle;\n }\n\n return shaderPrograms.push({ shaderHandles: handles }) - 1;\n }\n\n /**\n * Interns a pass's authored render states and returns its handle.\n *\n * Carbon `RegisterRenderStateSetup` (Tr2EffectStateManager.cpp:442-464) keys\n * on the authored pairs flattened in render-state order, which its\n * `std::map` gives it for free. We sort explicitly and collapse duplicate\n * ids the same way.\n *\n * Keyed on the AUTHORED pairs rather than on the interpreted\n * `Tr2RenderStateSetup.Key()`, so handles match Carbon's numbering: a pass\n * that authors a state at its default value is a distinct setup there even\n * though it draws identically.\n *\n * @param {object} pass Reflected pass carrying `renderStateValues`.\n * @returns {number} Stable handle. This one never fails.\n */\n static registerRenderStateSetup(pass)\n {\n const authored = new Map();\n for (const entry of pass?.renderStateValues ?? [])\n {\n authored.set(Number(entry.state), Number(entry.value));\n }\n\n const keyValues = [ ...authored.entries() ]\n .sort((left, right) => left[0] - right[0])\n .flat();\n\n for (let handle = 0; handle < renderStateSetups.length; handle += 1)\n {\n const existing = renderStateSetups[handle].keyValues;\n if (existing === null || existing.length !== keyValues.length) continue;\n if (existing.every((value, index) => value === keyValues[index])) return handle;\n }\n\n return renderStateSetups.push({\n keyValues,\n setup: Tr2RenderStateSetup.fromPass(pass)\n }) - 1;\n }\n\n /**\n * Stamps every pass of a resolved shader with its registration handles.\n *\n * Carbon does this inside `Tr2EffectDescription::Read`\n * (Tr2EffectDescription.cpp:587-666), because there the shader body and the\n * registration tables are on the same side of the layering. Ours are not:\n * `Tr2Pass` belongs to the resource layer's reflection, and the resource\n * layer may not import Trinity. So the stamp happens at the Trinity boundary\n * instead, on the first rebuild that resolves a shader.\n *\n * That is a timing difference with no behavioural one. Registration interns\n * identity and creates nothing, so it neither needs a device nor makes the\n * reflection graph device-dependent, and interning is idempotent: re-stamping\n * the same shader yields the same handles.\n *\n * Program members are collected in the pass's retained file order, not by\n * stage type, because Carbon indexes its handle array by position while\n * reading (`shaderHandles[stageIx]`, Tr2EffectDescription.cpp:592) and the\n * program key is order-sensitive. `Tr2Pass.stageOrder` exists precisely\n * because that ordering is authored rather than derivable.\n *\n * @param {object} shader Resolved `Tr2Shader`.\n * @returns {object} The same shader, stamped.\n */\n static registerShaderHandles(shader)\n {\n const techniques = shader?.GetEffect()?.techniques ?? [];\n\n for (const technique of techniques)\n {\n for (const pass of technique?.passes ?? [])\n {\n const stageInputs = pass?.stageInputs ?? [];\n const ordered = pass?.stageOrder?.length\n ? pass.stageOrder\n : stageInputs.map((_, stageType) => stageType).filter(stageType => stageInputs[stageType]?.exists);\n\n const programMembers = [];\n\n for (const stageType of ordered)\n {\n const stage = stageInputs[stageType];\n if (!stage?.exists) continue;\n\n const handle = Tr2EffectStateManager.registerShader(\n stageType,\n stage.sourceProgram?.bytes ?? null,\n stage.signature\n );\n\n stage.shader = handle;\n programMembers.push(handle);\n }\n\n pass.shaderProgram = Tr2EffectStateManager.registerShaderProgram(programMembers);\n pass.renderStates = Tr2EffectStateManager.registerRenderStateSetup(pass);\n }\n }\n\n // Carbon packs the sort key from the handles it has just assigned\n // (Tr2Shader.cpp:235-240); until they exist the key is unavoidably zero.\n shader?.ProcessEffect();\n\n return shader;\n }\n\n /**\n * The stable handle for a vertex declaration, interning it on first sight.\n *\n * Carbon `GetVertexDeclarationHandle` (Tr2EffectStateManager.cpp:863-877):\n * linear-scan the intern table for an equal definition, return its index, or\n * append and return the new index. The handle is what a batch carries and\n * what binning and sorting compare.\n *\n * WHY THE TABLE HOLDS A UNION and does not normalise at the door: Carbon's\n * signature admits only Tr2VertexDefinition, so its map is uniform. Ours\n * also interns payload element lists, which speak the PRODUCER's type\n * vocabulary (\"Float32\" + elementCount, not \"FLOAT32_3\") and carry no\n * ledger. Wrapping one into a definition would either fabricate ledger\n * values the byte arithmetic cannot derive from those type names, or\n * zero-fill them - and a zero ledger then fails Carbon's own equality\n * (which compares all four slots) against an authored definition with the\n * same items. Storing what arrived keeps interning correct across both\n * producers; isSameDefinition compares the ledger only when both sides\n * carry one. Revisit if CarbonVertexElements ever normalises type names.\n *\n * @param {Array|Tr2VertexDefinition} elements A definition or plain element list.\n * @returns {number} Stable handle.\n */\n static getVertexDeclarationHandle(elements)\n {\n const key = elements?.items ?? elements ?? [];\n const memoised = vertexLayoutHandles.get(key);\n\n if (memoised !== undefined) return memoised;\n\n let handle = vertexLayouts.findIndex(candidate => Tr2VertexDefinition.isSameDefinition(candidate, elements));\n\n if (handle < 0)\n {\n handle = vertexLayouts.push(elements) - 1;\n }\n\n if (typeof key === \"object\") vertexLayoutHandles.set(key, handle);\n\n return handle;\n }\n\n /**\n * The declaration a handle was interned from, or null for an unknown handle.\n *\n * Carbon `GetVertexDeclarationElements` (Tr2EffectStateManager.cpp:912-923)\n * copies the definition into an out parameter and returns a bool; returning\n * the interned identity or null is the same contract without the copy.\n *\n * @param {number} handle Vertex-declaration handle.\n * @returns {Array|Tr2VertexDefinition|null} The interned declaration.\n */\n static getVertexDeclarationElements(handle)\n {\n return vertexLayouts[handle] ?? null;\n }\n\n /**\n * The identity a shader handle was interned from, or null when out of range.\n *\n * @param {number} handle Shader handle.\n * @returns {object|null} Interned identity.\n */\n static getShaderRecord(handle)\n {\n return shaders[handle] ?? null;\n }\n\n /**\n * The member handles a program was interned from, or null when out of range.\n *\n * Carbon `GetShaderProgram` (Tr2EffectStateManager.cpp:780-787) returns the\n * device object and null-checks at every call site; ours returns identity for\n * the engine to realize against.\n *\n * @param {number} handle Program handle.\n * @returns {object|null} Interned identity.\n */\n static getShaderProgramRecord(handle)\n {\n return shaderPrograms[handle] ?? null;\n }\n\n /**\n * The interpreted setup a render-state handle was interned from.\n *\n * Null for a reserved built-in slot that has no ported state list yet, and\n * for an out-of-range handle.\n *\n * @param {number} handle Render-state handle.\n * @returns {Tr2RenderStateSetup|null} Interpreted setup.\n */\n static getRenderStateSetup(handle)\n {\n return renderStateSetups[handle]?.setup ?? null;\n }\n\n /**\n * The effective render state for a pass drawn in a rendering mode.\n *\n * Carbon does not choose between the two: `ApplyRenderStates` re-applies the\n * current mode's standard states and THEN the pass's own, every time\n * (Tr2EffectStateManager.cpp:703-720). So a pass authoring only a blend mode\n * still draws with its mode's depth, cull and colour-write, and reading the\n * pass alone yields a pipeline missing most of its state.\n *\n * Merging is concatenation because a repeated state id overwrites the earlier\n * one. RM_ANY contributes nothing, which is its meaning.\n *\n * @param {number} renderingMode A `RenderingMode` member.\n * @param {number} [handle] Registered pass render-state handle.\n * @returns {Tr2RenderStateSetup|null} Merged setup, or null when neither exists.\n */\n static resolveRenderStates(renderingMode, handle = Tr2EffectStateManager.Unknown)\n {\n const standard = STANDARD_MODE_PAIRS[renderingMode] ?? [];\n const pass = renderStateSetups[handle]?.keyValues ?? null;\n\n // A handle inside the reserved range IS a mode, already covered by the\n // standard half; merging it with itself would be harmless but confusing.\n if (!pass || handle < RenderingMode.RM_COUNT)\n {\n return standard.length ? Tr2RenderStateSetup.fromKeyValues(standard) : null;\n }\n\n return Tr2RenderStateSetup.fromKeyValues([ ...standard, ...pass ]);\n }\n\n\n /**\n * Drops every registered identity, as Carbon does on device loss.\n *\n * Carbon `ReleaseDeviceResources` (Tr2EffectStateManager.cpp:982-1023) clears\n * the shader and program tables and truncates the render-state table back to\n * its built-in modes, keeping handles 0..RM_COUNT-1 stable across a reset. It\n * leaves the vertex-layout table alone: only the device objects behind it are\n * invalidated, and the declarations survive.\n *\n * Every handle held on a pass is stale afterwards. Carbon's recovery is that\n * releasing the effect resource forces a re-parse and re-registration.\n *\n * @returns {void}\n */\n static releaseDeviceResources()\n {\n shaders.length = 0;\n shaderPrograms.length = 0;\n renderStateSetups.length = RenderingMode.RM_COUNT;\n }\n\n\n // ---------------------------------------------------------------------\n // The viewport family (Tr2EffectStateManager.cpp:1065-1245).\n //\n // TWO VIEWPORTS, AND THAT IS THE POINT. `viewport` is what the caller asked\n // for and is what `GetViewport` returns. `viewportOnDevice` is that CLIPPED\n // to the bound render target, and it is the only one the backend ever sees.\n // Carbon derives the second from the first on every set, so a caller may\n // author a viewport larger than its target and still produce a legal draw.\n //\n // The clip floors each edge at one pixel, with Carbon's reason attached:\n // \"using zero edge length causes dx error\". A browser refuses it too, so the\n // floor earns its place here rather than being D3D trivia.\n //\n // These live HERE and not on the render context because that is where Carbon\n // puts them: the context is the abstraction layer, and its `SetViewport`\n // takes the already-clipped device viewport.\n\n /** The render context this manager applies state to (Carbon's m_renderContext). */\n #renderContext = null;\n\n /**\n * Binds the render context this manager applies state through.\n *\n * Carbon constructs the manager as a member of the context\n * (`Tr2RenderContext.h:35`), so the pairing is fixed there; ours is composed,\n * so it is bound once and never rebound.\n *\n * @param {object} renderContext The owning render context.\n * @returns {Tr2EffectStateManager} This manager.\n */\n SetRenderContext(renderContext)\n {\n this.#renderContext = renderContext;\n\n return this;\n }\n\n /**\n * Forgets every program and vertex layout realized for this manager's\n * context, so the next apply creates them through whatever backend the\n * context holds now.\n *\n * Called when the context's backend changes: the realized objects belong to\n * the backend that made them, and a WebGPU draw handed a stub program\n * refuses the resource set built against it.\n *\n * @returns {void}\n */\n ReleaseRealizedObjects()\n {\n if (!this.#renderContext) return;\n\n shaderProgramObjects.delete(this.#renderContext);\n vertexLayoutObjects.delete(this.#renderContext);\n }\n\n /**\n * Binds a render target to a slot and refreshes the viewport for slot zero.\n *\n * Carbon's is `SetRenderTarget(index, rt, updateViewport, slice)`\n * (cpp:1133-1152): it sets through the abstraction layer and then, for slot\n * zero only, asks the CONTEXT for the target's extent. Its comment says why\n * the context and not the texture: \"don't use rt.GetWidth/Height, rt may be\n * nullRT\".\n *\n * @param {number} index Target slot.\n * @param {object|null} renderTarget The target.\n * @param {boolean} [updateViewport] Whether slot zero moves the viewport.\n * @returns {boolean} Whether the bind was accepted.\n */\n SetRenderTarget(index, renderTarget, updateViewport = true)\n {\n const bound = this.#renderContext.SetRenderTarget(index, renderTarget);\n\n if (index === 0 && updateViewport) this.#RefreshRenderTargetViewport();\n\n return bound;\n }\n\n /**\n * Saves the target bound to a slot, and binds a new one if given.\n *\n * Carbon's two overloads (cpp:1043-1052): the slot-only form saves and binds\n * nothing, the two-argument form saves and then sets.\n *\n * @param {object|null} [renderTarget] The target to bind after saving.\n * @param {number} [slot] Target slot.\n * @returns {boolean} True.\n */\n PushRenderTarget(renderTarget = null, slot = 0)\n {\n this.#renderContext.PushRenderTarget(slot);\n\n if (renderTarget != null) this.SetRenderTarget(slot, renderTarget);\n\n return true;\n }\n\n /**\n * Restores the target saved for a slot and refreshes the viewport.\n *\n * @param {number} [slot] Target slot.\n * @returns {boolean} False when nothing was saved.\n */\n PopRenderTarget(slot = 0)\n {\n const popped = this.#renderContext.PopRenderTarget(slot);\n\n if (slot === 0) this.#RefreshRenderTargetViewport();\n\n return popped;\n }\n\n /**\n * Binds the depth-stencil surface.\n *\n * @param {object|null} depthStencil The surface, or null to unbind.\n * @returns {boolean} Whether the bind was accepted.\n */\n SetDepthStencilBuffer(depthStencil)\n {\n return this.#renderContext.SetDepthStencil(depthStencil);\n }\n\n /**\n * Saves the bound depth-stencil, and binds another if one is given.\n *\n * Carbon has three overloads and the difference between two of them matters:\n * no argument saves and binds nothing, while an explicitly EMPTY texture\n * saves and then unbinds (`TriStepPushDepthStencil.cpp:44,48`). Passing\n * `undefined` is the first; passing `null` is the second.\n *\n * @param {object|null} [depthStencil] The surface to bind after saving.\n * @returns {boolean} True.\n */\n PushDepthStencilBuffer(depthStencil = undefined)\n {\n this.#renderContext.PushDepthStencil();\n\n if (depthStencil !== undefined) this.SetDepthStencilBuffer(depthStencil);\n\n return true;\n }\n\n /**\n * Restores the saved depth-stencil.\n *\n * @returns {boolean} False when nothing was saved.\n */\n PopDepthStencilBuffer()\n {\n return this.#renderContext.PopDepthStencil();\n }\n\n /** Reads the bound target's extent and resets the viewport to it. */\n #RefreshRenderTargetViewport()\n {\n const size = this.#renderContext.GetRenderTargetSize(0);\n\n if (Failed(size.result)) return;\n\n this.UpdateRenderTargetViewport(size.width, size.height);\n\n // Carbon stops at the update, because its backend applies the viewport as\n // part of the target bind. Ours does not, so the derived viewport is pushed\n // here - the backend forces this, not preference.\n this.SetupViewport();\n }\n\n /**\n * The viewport as authored, which is not necessarily the one being drawn.\n *\n * @returns {object|null} The authored viewport, or null before one is set.\n */\n GetViewport()\n {\n return this.viewport;\n }\n\n /**\n * The viewport actually handed to the backend, clipped to the render target.\n *\n * @returns {object|null} The device viewport, or null before one is set.\n */\n GetDeviceViewport()\n {\n return this.viewportOnDevice;\n }\n\n /**\n * Sets the authored viewport and derives the device one.\n *\n * @param {object} viewport `{ x, y, width, height, minZ, maxZ }`.\n * @returns {void}\n */\n SetViewport(viewport)\n {\n this.viewport = {\n x: viewport.x ?? 0,\n y: viewport.y ?? 0,\n width: viewport.width ?? 0,\n height: viewport.height ?? 0,\n minZ: viewport.minZ ?? 0,\n maxZ: viewport.maxZ ?? 1\n };\n\n this.SetupViewport();\n }\n\n /**\n * Sets the authored viewport to the whole render target.\n *\n * @returns {void}\n */\n SetFullScreenViewport()\n {\n this.viewport = {\n x: 0,\n y: 0,\n width: this.renderTargetWidth,\n height: this.renderTargetHeight,\n minZ: 0,\n maxZ: 1\n };\n\n this.SetupViewport();\n }\n\n /**\n * Clips the authored viewport to the render target and hands it to the\n * backend.\n *\n * @returns {void}\n */\n SetupViewport()\n {\n const authored = this.viewport;\n\n if (!authored) failState(\"SetupViewport needs an authored viewport\");\n\n const x1 = authored.x + authored.width;\n const y1 = authored.y + authored.height;\n const x = Math.max(authored.x, 0);\n const y = Math.max(authored.y, 0);\n\n // ONE DEPARTURE, AND IT IS A REFUSAL TO INVENT. Carbon always has a render\n // target, so its extent is always known and the clip always applies. Ours\n // can be asked before anything is bound, and clipping to an extent of zero\n // would floor the viewport at ONE PIXEL - a frame that draws, in the wrong\n // place, silently. With no extent recorded the authored viewport passes\n // through unclipped; once a target is bound the clip is Carbon's exactly.\n const clipped = this.renderTargetWidth > 0 && this.renderTargetHeight > 0;\n\n this.viewportOnDevice = {\n x,\n y,\n // Floored at one: a zero edge is refused by the backend, not merely odd.\n width: clipped ? Math.max(Math.min(x1, this.renderTargetWidth) - x, 1) : authored.width,\n height: clipped ? Math.max(Math.min(y1, this.renderTargetHeight) - y, 1) : authored.height,\n minZ: authored.minZ,\n maxZ: authored.maxZ\n };\n\n // Carbon assigns a Vector4 of the AUTHORED extent and the target's\n // (cpp:1242). Note it uses the DEVICE extent in UpdateRenderTargetViewport\n // instead - transcribed as it stands rather than made consistent.\n this.viewportSizeVar = [\n authored.width,\n authored.height,\n this.renderTargetWidth,\n this.renderTargetHeight\n ];\n\n if (this.#renderContext) this.#renderContext.SetViewport(this.viewportOnDevice);\n }\n\n /**\n * Records the bound render target's extent and resets both viewports to it.\n *\n * Carbon writes both viewports directly here rather than going through\n * `SetupViewport`, and does NOT push to the backend: the target bind that\n * called this carries the viewport with it (cpp:1193-1214).\n *\n * @param {number} width Render target width.\n * @param {number} height Render target height.\n * @returns {void}\n */\n UpdateRenderTargetViewport(width, height)\n {\n if (!(width > 0) || !(height > 0)) failState(\"a render target's viewport needs a non-zero extent\");\n\n this.renderTargetWidth = width;\n this.renderTargetHeight = height;\n\n this.viewport = { x: 0, y: 0, width, height, minZ: 0, maxZ: 1 };\n this.viewportOnDevice = { x: 0, y: 0, width, height, minZ: 0, maxZ: 1 };\n this.viewportSizeVar = [ width, height, width, height ];\n }\n\n /**\n * Saves the authored viewport.\n *\n * @returns {void}\n */\n PushViewport()\n {\n if (!Array.isArray(this.viewportStack)) this.viewportStack = [];\n\n this.viewportStack.push(this.viewport);\n }\n\n /**\n * Restores the last saved viewport, deriving the device one again.\n *\n * @returns {boolean} False when nothing was saved.\n */\n PopViewport()\n {\n if (!Array.isArray(this.viewportStack) || !this.viewportStack.length) return false;\n\n const restored = this.viewportStack.pop();\n\n if (restored) this.SetViewport(restored);\n\n return true;\n }\n\n /**\n * Depth of the viewport save stack.\n *\n * @returns {number} Saved viewports.\n */\n GetStackSizeViewport()\n {\n return Array.isArray(this.viewportStack) ? this.viewportStack.length : 0;\n }\n\n /**\n * Begins a managed-rendering span, in which redundant applies are filtered.\n *\n * Carbon resets the redundancy cache and unbinds the shader program first\n * (cpp:670-694), because outside a span nothing tracks what the device holds\n * and a stale cache would skip a needed bind.\n *\n * The cull-mode argument is not a state to set: it selects mirroring, so\n * `CULLMODE_CCW` means \"this span is mirrored\" and `CULLMODE_NONE` leaves the\n * current setting alone.\n *\n * @param {number} [cullMode] A `CullMode` member.\n * @returns {void}\n */\n BeginManagedRendering(cullMode = CullMode.CULLMODE_NONE)\n {\n this.#currentValues = NewCurrentValues();\n this.#isManagedRendering = true;\n\n if (cullMode === CullMode.CULLMODE_CW) this.SetInvertedCullMode(false);\n else if (cullMode === CullMode.CULLMODE_CCW) this.SetInvertedCullMode(true);\n }\n\n /**\n * Ends the span. The overrides survive it, as they do in Carbon.\n *\n * @returns {void}\n */\n EndManagedRendering()\n {\n this.#isManagedRendering = false;\n }\n\n /**\n * Whether redundant applies are currently being filtered.\n *\n * @returns {boolean}\n */\n IsManagedRendering()\n {\n return this.#isManagedRendering;\n }\n\n /**\n * Draws this span with the depth comparison reversed.\n *\n * Carbon installs a table over RS_ZFUNC that swaps LESS with GREATER and\n * LEQUAL with GEQUAL, leaving NEVER, EQUAL, NOTEQUAL and ALWAYS untouched\n * (cpp:834-856). It is a per-manager setting rather than authored per pass,\n * because the same registered setup is drawn both ways.\n *\n * @param {boolean} inverted\n * @returns {void}\n */\n SetInvertedDepthTest(inverted)\n {\n this.#overrides.invertedDepthTest = !!inverted;\n }\n\n /**\n * @returns {boolean} Whether the depth comparison is reversed.\n */\n IsDepthTestInverted()\n {\n return this.#overrides.invertedDepthTest;\n }\n\n /**\n * Draws this span mirrored, swapping the two winding orders and leaving NONE\n * alone (cpp:815-827).\n *\n * @param {boolean} inverted\n * @returns {void}\n */\n SetInvertedCullMode(inverted)\n {\n this.#overrides.invertedCullMode = !!inverted;\n }\n\n /**\n * @returns {boolean} Whether the winding order is mirrored.\n */\n IsCullModeInverted()\n {\n return this.#overrides.invertedCullMode;\n }\n\n /**\n * Draws this span as wireframe (cpp:800-812).\n *\n * Carbon sets an `RS_FILLMODE` override of\n * `{ 0, FM_POINT, FM_WIREFRAME, FM_WIREFRAME }` and clears it to turn the\n * mode off, using the same override machinery as the cull mode above. Ours\n * keeps the named flag rather than the raw table, for the reason the class\n * head gives: a registered setup is interpreted once, so there are no raw\n * pairs left to index.\n *\n * THE FLAG IS RECORDED HERE; NO BACKEND HONOURS IT YET. Neither browser API\n * has an equivalent of `glPolygonMode`, so Carbon's fill-mode route cannot be\n * projected - but wireframe does not need one (line topology, or barycentric\n * edges in the fragment shader). The blocker is which route to take.\n *\n * Until one is taken, `IsWireframeRendering` is the flag a backend must read,\n * and a backend that cannot honour it must REFUSE rather than draw solid.\n * A toggle that silently does nothing is the thing this must not become.\n *\n * @param {boolean} enabled Whether to draw wireframe.\n * @returns {boolean} The flag as stored.\n */\n SetWireframeRendering(enabled)\n {\n this.#overrides.wireframe = !!enabled;\n\n return this.#overrides.wireframe;\n }\n\n /**\n * @returns {boolean} Whether this span is set to draw wireframe.\n */\n IsWireframeRendering()\n {\n return this.#overrides.wireframe;\n }\n\n /**\n * Which of Carbon's render-state overrides this manager currently applies.\n *\n * This is where Carbon's DoApplyRenderStates would land, and deliberately\n * stops short of it. Carbon resolves authored pairs against its override\n * tables and submits them to the render context; a backend that bakes the\n * same states into a pipeline has no such call, and one that sets them\n * imperatively wants them in its own vocabulary. So the manager hands over\n * WHICH overrides are active and the backend's projection applies them - the\n * inversion tables live in interpreted space on Tr2RenderStateSetup, beside\n * the values they rewrite.\n *\n * Carbon's dirty-flagged per-setup cache has no counterpart and needs none: a\n * projected state set feeds a pipeline key that already includes the flags'\n * effect, so the two variants are distinct entries rather than one entry that\n * must be invalidated.\n *\n * @returns {{invertedDepthTest: boolean, invertedCullMode: boolean}} A copy.\n */\n GetRenderStateOverrides()\n {\n return { ...this.#overrides };\n }\n\n /**\n * Records the rendering mode and returns whether its standard states must be\n * applied.\n *\n * Carbon re-applies the mode's states ahead of every pass setup rather than\n * restoring after one (cpp:703-719), which is why a pass's states leak into\n * whatever draws next without an intervening ApplyRenderStates. It then sets\n * the current setup to UNKNOWN, so the next ApplyRenderStates cannot be\n * filtered out.\n *\n * @param {number} renderingMode A `RenderingMode` member.\n * @returns {boolean} Whether the mode carries states to apply.\n */\n ApplyStandardStates(renderingMode)\n {\n // THE PREDICATE IS CARBON'S, AND SO IS ACTING ON IT. This returned the\n // condition and applied nothing until 2026-09-09, so the base depth, cull\n // and colour-write block for every rendering mode was never set - and all\n // four callers discard the boolean, so nothing noticed. Carbon\n // (`cpp:790-799`):\n //\n // if( rm > RM_ANY && rm < RM_COUNT ) { DoApplyRenderStates( uint32_t( rm ) ); }\n //\n // The mode IS the handle: the first RM_COUNT setup slots are the standard\n // states, which is why interned registration begins after RM_COUNT.\n const carriesStates = renderingMode > RenderingMode.RM_ANY && renderingMode < RenderingMode.RM_COUNT;\n\n if (carriesStates) this.DoApplyRenderStates(renderingMode);\n\n this.#currentValues.renderingMode = renderingMode;\n this.#currentValues.renderStateSetup = Tr2EffectStateManager.Unknown;\n\n // Carbon returns void; the boolean is kept because callers already take it,\n // and it now reports what was applied rather than what could have been.\n return carriesStates;\n }\n\n /**\n * Applies a render-state setup to the backend.\n *\n * Carbon (`cpp:703-720`) filters a redundant handle inside a managed span,\n * then does TWO things: re-applies the current rendering mode's standard\n * states, and only then the pass's own. Reading a pass's states alone yields a\n * pipeline missing most of its state, which is why the order is transcribed\n * rather than simplified.\n *\n * @param {number} handle Render-state handle.\n * @returns {boolean} False when the handle is already current in a managed span.\n */\n ApplyRenderStates(handle)\n {\n if (this.#isManagedRendering && handle === this.#currentValues.renderStateSetup) return false;\n\n if (handle < Tr2EffectStateManager.getRenderStateSetupCount())\n {\n this.ApplyStandardStates(this.#currentValues.renderingMode);\n this.DoApplyRenderStates(handle);\n\n this.#currentValues.renderStateSetup = handle;\n\n return true;\n }\n\n this.#currentValues.renderStateSetup = handle;\n\n return false;\n }\n\n /**\n * Resolves a setup against the current overrides and hands it to the backend.\n *\n * Carbon `DoApplyRenderStates` (`cpp:722-755`) walks the registered\n * state-PAIR list substituting `m_renderStateOverrides[state][value]`, caches\n * the resolved list per setup behind a dirty flag, and calls\n * `m_renderContext.SetRenderStates( &kv[0], kv.size() / 2 )`.\n *\n * OURS RESOLVES A PROJECTION RATHER THAN A PAIR LIST, for the reason the class\n * head gives: a registered setup is interpreted ONCE at registration, so there\n * are no raw pairs left to index. The override tables live in interpreted\n * space on `Tr2RenderStateSetup`, whose `GetWebgpuRecipe` already accepts\n * `invertedDepthTest` and `invertedCullMode`. Same substitution, one layer up.\n *\n * CARBON'S PER-SETUP CACHE HAS NO COUNTERPART HERE, and adding one would be\n * cargo. Carbon caches because it performs the substitution itself and the\n * result is a list it would otherwise rebuild every draw. We substitute\n * nothing - the setup and the overrides go to the backend, which projects\n * them - and the projection's result is already cached by the pipeline cache,\n * keyed on the recipe the overrides changed. Two caches for one derivation is\n * how they fall out of step.\n *\n * WIREFRAME REFUSES HERE, and that is the answer to this class's own note\n * about the toggle. `GetWebgpuRecipe` throws for any fill mode but solid,\n * because WebGPU has no `glPolygonMode` - so the flag reaches a backend that\n * says it cannot honour it, rather than being quietly dropped.\n *\n * @param {number} handle Render-state handle.\n * @returns {boolean} Whether a setup reached the backend.\n */\n DoApplyRenderStates(handle)\n {\n const setup = Tr2EffectStateManager.getRenderStateSetup(handle);\n\n if (!setup || !this.#renderContext) return false;\n\n return this.#renderContext.SetRenderStates(this.#OverMode(handle, setup), this.GetRenderStateOverrides());\n }\n\n /**\n * A pass setup carrying the current rendering mode's states underneath it.\n *\n * RENDER STATES ARE STICKY IN CARBON, and reproducing that is the whole point\n * of this method. Carbon sets them one at a time through D3D, so\n * `ApplyStandardStates` lays down the rendering mode's block and a pass setup\n * then speaks only for what it changes. Ours interprets a setup ONCE into a\n * complete projection, so handing the backend a pass setup REPLACED the mode's\n * block and turned the pass's silence into interpreted defaults.\n *\n * It cost a hull. RM_OPAQUE asks for `CULLMODE_CW` - cull the FRONT faces,\n * D3D's clockwise-is-front convention - and every `quadv5` pass authors no\n * cull at all, so the default `CULLMODE_CCW` culled the back ones instead.\n * Every EVE ship drew its own interior: right silhouette, wrong surfaces,\n * which is a genuinely hard thing to see. ccpwgl sets `CULL_CW` to\n * `gl.cullFace(gl.FRONT)` against `frontFace(CW)` and agrees exactly\n * (`Tw2Device.js:272,1343-1346,1604`).\n *\n * A MODE HANDLE IS NOT OVERLAID ON ITSELF: the first `RM_COUNT` slots ARE the\n * standard states, so those apply as they are.\n *\n * Merged setups are cached per mode and handle, so the backend keeps seeing\n * one stable object and its redundant-apply check still bites.\n *\n * @param {number} handle The setup being applied.\n * @param {object} setup The interpreted setup for that handle.\n * @returns {object} The setup to hand the backend.\n */\n #OverMode(handle, setup)\n {\n const mode = this.#currentValues.renderingMode;\n const carriesStates = mode > RenderingMode.RM_ANY && mode < RenderingMode.RM_COUNT;\n\n // Only a mode applying ITS OWN block is left alone. An earlier version\n // excluded every handle below RM_COUNT, which caught the reserved RM_ANY\n // slot - and a pass that registers no states gets exactly that handle, whose\n // interpreted setup is a full projection of DEFAULTS. Applying it over the\n // mode erased the mode.\n if (!carriesStates || handle === mode) return setup;\n\n const key = `${mode}:${handle}`;\n const cached = this.#overMode.get(key);\n\n if (cached) return cached;\n\n const merged = Tr2RenderStateSetup.Overlay(Tr2EffectStateManager.getRenderStateSetup(mode), setup);\n\n this.#overMode.set(key, merged);\n\n return merged;\n }\n\n /** Merged mode-plus-pass setups, keyed by both handles. */\n #overMode = new Map();\n\n /**\n * Whether this shader program needs binding.\n *\n * Carbon updates the cached value only INSIDE the managed branch (cpp:758-771)\n * and this keeps that asymmetry: outside a span nothing tracks the device, so\n * recording a value there would let the next span's first bind be skipped.\n *\n * @param {number} handle Shader-program handle.\n * @returns {boolean}\n */\n ApplyShaderProgram(handle)\n {\n if (this.#isManagedRendering)\n {\n if (handle === this.#currentValues.shaderProgram) return false;\n\n this.#currentValues.shaderProgram = handle;\n }\n\n // IT BINDS. This recorded the handle and reached no backend until\n // 2026-09-09. Carbon `cpp:758-778`: an in-range handle sets the interned\n // program, and an out-of-range one sets a DEFAULT-CONSTRUCTED program -\n // which unbinds. Both halves are here, because the else branch is what\n // stops a span inheriting the previous span's program.\n if (!this.#renderContext) return true;\n\n const program = handle >= 0 && handle < shaderPrograms.length\n ? this.GetShaderProgram(handle)\n : null;\n\n this.#renderContext.SetShaderProgram(program);\n\n return true;\n }\n\n /**\n * Creates the backend's program for an interned handle, once.\n *\n * Carbon's row already HOLDS the created `Tr2ShaderProgramAL`\n * (`s_shaderPrograms[ix].first`), because it compiles one backend and can put\n * a device object in its own table. Ours holds identity plus the bytecode and\n * signature each stage registered, and the backend builds from those - the\n * same reason `CreateVertexLayout` and `CreateBuffer` live on the context.\n *\n * Carbon's `GetShaderProgram` (`Tr2EffectStateManager.cpp`), which\n * `Tr2Material::ApplyMaterialDataForPass` calls to hand the program to\n * `Tr2ResourceSetAL::Create` (`Tr2Material.cpp:232-234`). Public for the\n * same caller here.\n *\n * @param {number} handle A shader-program handle.\n * @returns {object|null} The realized program, or null when a stage refused.\n */\n GetShaderProgram(handle)\n {\n if (!this.#renderContext) return null;\n if (!(handle >= 0 && handle < shaderPrograms.length)) return null;\n\n const realized = shaderProgramObjects.get(this.#renderContext) ?? new Map();\n const cached = realized.get(handle);\n\n // A cached NULL is a remembered refusal. Without this a program whose stage\n // failed to compile is rebuilt on every apply, which turns one bad shader\n // into per-draw work.\n if (cached !== undefined) return cached;\n\n const stages = [];\n\n for (const shaderHandle of shaderPrograms[handle].shaderHandles)\n {\n const row = shaders[shaderHandle];\n const stage = row\n ? this.#renderContext.CreateShader(row.stageType, row.bytecode, row.signature ?? null, \"\")\n : null;\n\n if (!stage) { stages.length = 0; break; }\n\n stages.push(stage);\n }\n\n const program = stages.length > 0 ? this.#renderContext.CreateShaderProgram(stages) : null;\n\n realized.set(handle, program);\n shaderProgramObjects.set(this.#renderContext, realized);\n\n return program;\n }\n\n /**\n * Whether this vertex declaration needs binding.\n *\n * @param {number} handle Vertex-declaration handle.\n * @returns {boolean}\n */\n ApplyVertexDeclaration(handle)\n {\n if (this.#isManagedRendering && handle === this.#currentValues.vertexDeclaration) return false;\n\n this.#currentValues.vertexDeclaration = handle;\n\n // IT BINDS. This recorded the handle and reached no backend until\n // 2026-09-09, so a draw ran with whatever layout the abstraction layer\n // last held. Carbon `cpp:879-910`: NULL_DECLARATION unbinds with a default\n // layout, otherwise the interned layout is created ON FIRST USE and set.\n //\n // Carbon can hold a `Tr2VertexLayoutAL` in its own table because it\n // compiles one backend. We ship every backend at once, so the layout is\n // created by the context - the same reason `CreateBuffer` lives there -\n // and cached per handle so a second apply reuses it, as `hvl.IsValid()`\n // does for Carbon.\n // A manager with no context records and reaches nothing, exactly as\n // DoApplyRenderStates does. Carbon's manager always has one; ours is\n // constructed before it is bound.\n if (!this.#renderContext) return handle !== Tr2EffectStateManager.Unknown;\n\n // TWO SENTINELS, AND THEY ARE NOT THE SAME ONE. Carbon asserts against\n // UNINITIALIZED_DECLARATION and unbinds on NULL_DECLARATION\n // (`cpp:886-893`); they are `~0u` and `~0u - 1`. This tested `Unknown` -\n // the UNINITIALIZED one - which meant a batch carrying NullDeclaration fell\n // past the unbind, found no elements for 0xFFFFFFFE, and bound nothing at\n // all. And because the redundancy cache was already written above, the\n // filter suppressed every retry, so the previous layout stuck. The field's\n // own docstring says \"do not collapse the two\"; collapsing them is exactly\n // what this did between two commits on 2026-09-09.\n if (handle === Tr2EffectStateManager.NullDeclaration)\n {\n this.#renderContext.SetVertexLayout(null);\n\n return true;\n }\n\n // Carbon ASSERTS here rather than handling it: applying an uninitialized\n // declaration is a caller defect. We have no assert, and binding nothing\n // while reporting success is what hid the bug above, so it reports failure.\n if (handle === Tr2EffectStateManager.Unknown) return false;\n\n const elements = Tr2EffectStateManager.getVertexDeclarationElements(handle);\n\n // A HANDLE THAT WAS NEVER INTERNED NAMES NOTHING. Carbon cannot reach this:\n // every declaration handle it holds came out of `getVertexDeclarationHandle`\n // and indexes its own table. Ours can be handed a bare number, and creating\n // a layout from null would make an empty definition look like a real one -\n // which the stub layout then reports as valid, because Carbon stores the\n // definition before checking it.\n if (!elements) return false;\n\n const realized = vertexLayoutObjects.get(this.#renderContext) ?? new Map();\n\n let layout = realized.get(handle) ?? null;\n\n if (!layout)\n {\n layout = this.#renderContext.CreateVertexLayout(elements);\n\n realized.set(handle, layout);\n vertexLayoutObjects.set(this.#renderContext, realized);\n }\n\n this.#renderContext.SetVertexLayout(layout);\n\n return true;\n }\n\n /**\n * Binds one vertex stream unless it is already bound.\n *\n * THE FILTER ONLY RUNS INSIDE A MANAGED SPAN (cpp:930-948). Outside one\n * nothing tracks what the device holds, so every call must reach it; a\n * cached value recorded there would let the next span skip a bind it needs.\n *\n * Carbon's suballocated-buffer overload just unpacks the allocation and calls\n * this, so it is not a second method here.\n *\n * @param {number} stream The stream index.\n * @param {object} buffer A `Tr2BufferAL`.\n * @param {number} offset Byte offset into the buffer.\n * @param {number} stride Bytes per vertex.\n * @returns {boolean} False when the bind was filtered out as redundant.\n */\n ApplyStreamSource(stream, buffer, offset, stride)\n {\n const current = this.#currentValues.streams[stream];\n\n if (!current) throw new Error(`Tr2EffectStateManager: no vertex stream ${stream}.`);\n\n if (this.#isManagedRendering)\n {\n if (buffer === current.vertexBuffer && offset === current.offset && stride === current.stride)\n {\n return false;\n }\n\n current.vertexBuffer = buffer;\n current.offset = offset;\n current.stride = stride;\n }\n\n this.#renderContext.SetStreamSource(stream, buffer, offset, stride);\n\n return true;\n }\n\n /**\n * Binds the index buffer unless it is already bound.\n *\n * A ONE-BYTE INDEX STRIDE IS A BUG, and Carbon says so at the top of this\n * method - \"Oh no! This is a big bug!\" (cpp:963-966) - because no backend has\n * 8-bit indices and the value can only have come from an uninitialised\n * description. It warns and carries on there; here it fails, because a bind\n * that cannot be right should not reach a device.\n *\n * @param {object} indices A `Tr2BufferAL`.\n * @param {number} stride Bytes per index.\n * @returns {boolean} False when the bind was filtered out as redundant.\n */\n ApplyIndexBuffer(indices, stride)\n {\n if (stride === 1) throw new Error(\"Tr2EffectStateManager: a one-byte index stride is never right.\");\n\n if (this.#isManagedRendering)\n {\n if (indices === this.#currentValues.indexBuffer && stride === this.#currentValues.indexStride)\n {\n return false;\n }\n\n this.#currentValues.indexBuffer = indices;\n this.#currentValues.indexStride = stride;\n }\n\n this.#renderContext.SetIndices(indices, stride);\n\n return true;\n }\n\n /**\n * The current redundancy cache, for a caller that must reason about what is\n * bound. A copy, because it is this class's private state.\n *\n * @returns {object}\n */\n GetCurrentValues()\n {\n return { ...this.#currentValues, streams: this.#currentValues.streams.map(s => ({ ...s })) };\n }\n\n /**\n * How many render-state handles are registered, which is the range\n * `ApplyRenderStates` checks against.\n *\n * @returns {number}\n */\n static getRenderStateSetupCount()\n {\n return renderStateSetups.length;\n }\n}\n"],"names":["UNKNOWN","VERTEX_STREAM_MAX_COUNT","NewCurrentValues","streams","i","push","vertexBuffer","offset","stride","shaderProgram","vertexDeclaration","indexBuffer","indexStride","renderingMode","renderStateSetup","shaders","shaderPrograms","vertexLayouts","vertexLayoutObjects","WeakMap","shaderProgramObjects","vertexLayoutHandles","RS_CULLMODE","RS_FILLMODE","RS_ALPHABLENDENABLE","RS_ALPHATESTENABLE","RS_ALPHAFUNC","RS_ALPHAREF","RS_ZENABLE","RS_ZWRITEENABLE","RS_ZFUNC","RS_COLORWRITEENABLE","RS_DEPTHBIAS","RS_SLOPESCALEDEPTHBIAS","RS_SEPARATEALPHABLENDENABLE","RS_SRCBLEND","RS_DESTBLEND","RS_BLENDOP","RS_BLENDOPALPHA","RS_SRCBLENDALPHA","RS_DESTBLENDALPHA","RenderState","CULLMODE_CW","CULLMODE_NONE","CullMode","FM_SOLID","FillMode","CMP_LESSEQUAL","CMP_GREATER","CMP_ALWAYS","CMP_EQUAL","CompareFunc","BM_ONE","BM_SRCALPHA","BM_INVSRCALPHA","BlendMode","BO_ADD","BlendOperation","ALL_CHANNELS","RGB_CHANNELS","FALSE","TRUE","STANDARD_MODE_PAIRS","Object","freeze","map","pairs","renderStateSetups","keyValues","setup","Tr2RenderStateSetup","fromKeyValues","isSameBytecode","first","second","length","index","backendBlockKey","block","bytes","hash","Math","imul","toString","samplerSignatureKey","samplers","entries","register","Number","GetValues","sort","left","right","JSON","stringify","failState","message","error","Error","code","_Tr2EffectStateManage","_identity","Tr2EffectStateManager","CjsModel","e","_init_renderContext","_init_extra_renderContext","_init_perObjectConstantBuffers","_init_extra_perObjectConstantBuffers","_init_renderTargetWidth","_init_extra_renderTargetWidth","_init_renderTargetHeight","_init_extra_renderTargetHeight","_init_viewport","_init_extra_viewport","_init_viewportOnDevice","_init_extra_viewportOnDevice","_init_viewportStack","_init_extra_viewportStack","_init_viewportSizeVar","_init_extra_viewportSizeVar","c","_initClass","_applyDecs","type","define","className","family","rawStruct","int32","renderContext","perObjectConstantBuffers","invertedDepthTest","invertedCullMode","wireframe","renderTargetWidth","renderTargetHeight","viewport","viewportOnDevice","viewportStack","viewportSizeVar","registerShader","stageType","bytecode","signature","Unknown","samplerKey","backendBlock","handle","existing","registerShaderProgram","shaderHandles","handles","some","every","value","registerRenderStateSetup","pass","authored","Map","entry","renderStateValues","set","state","flat","fromPass","registerShaderHandles","shader","techniques","GetEffect","technique","passes","stageInputs","ordered","stageOrder","_","filter","exists","programMembers","stage","sourceProgram","renderStates","ProcessEffect","getVertexDeclarationHandle","elements","key","items","memoised","get","undefined","findIndex","candidate","Tr2VertexDefinition","isSameDefinition","getVertexDeclarationElements","getShaderRecord","getShaderProgramRecord","getRenderStateSetup","resolveRenderStates","standard","RenderingMode","RM_COUNT","releaseDeviceResources","SetRenderContext","ReleaseRealizedObjects","delete","SetRenderTarget","renderTarget","updateViewport","bound","PushRenderTarget","slot","PopRenderTarget","popped","SetDepthStencilBuffer","depthStencil","SetDepthStencil","PushDepthStencilBuffer","PushDepthStencil","PopDepthStencilBuffer","PopDepthStencil","#RefreshRenderTargetViewport","size","GetRenderTargetSize","Failed","result","UpdateRenderTargetViewport","width","height","SetupViewport","GetViewport","GetDeviceViewport","SetViewport","x","y","minZ","maxZ","SetFullScreenViewport","x1","y1","max","clipped","min","PushViewport","Array","isArray","PopViewport","restored","pop","GetStackSizeViewport","BeginManagedRendering","cullMode","SetInvertedCullMode","CULLMODE_CCW","EndManagedRendering","IsManagedRendering","SetInvertedDepthTest","inverted","IsDepthTestInverted","IsCullModeInverted","SetWireframeRendering","enabled","IsWireframeRendering","GetRenderStateOverrides","ApplyStandardStates","carriesStates","RM_ANY","DoApplyRenderStates","ApplyRenderStates","getRenderStateSetupCount","SetRenderStates","#OverMode","mode","cached","merged","Overlay","ApplyShaderProgram","program","GetShaderProgram","SetShaderProgram","realized","stages","shaderHandle","row","CreateShader","CreateShaderProgram","ApplyVertexDeclaration","NullDeclaration","SetVertexLayout","layout","CreateVertexLayout","ApplyStreamSource","stream","buffer","current","SetStreamSource","ApplyIndexBuffer","indices","SetIndices","GetCurrentValues","s","constructor"],"mappings":";;;;;;;;;;;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,OAAO,GAAG,UAAU;;AAE1B;AACA,MAAMC,uBAAuB,GAAG,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,GACzB;EACE,MAAMC,OAAO,GAAG,EAAE;EAElB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,uBAAuB,EAAEG,CAAC,EAAE,EAChD;IACED,OAAO,CAACE,IAAI,CAAC;AAAEC,MAAAA,YAAY,EAAE,IAAI;AAAEC,MAAAA,MAAM,EAAEP,OAAO;AAAEQ,MAAAA,MAAM,EAAER;AAAQ,KAAC,CAAC;AACxE,EAAA;EAEA,OAAO;AACLS,IAAAA,aAAa,EAAET,OAAO;AACtBU,IAAAA,iBAAiB,EAAEV,OAAO;IAC1BG,OAAO;AACPQ,IAAAA,WAAW,EAAE,IAAI;AACjBC,IAAAA,WAAW,EAAE,CAAC;AACdC,IAAAA,aAAa,EAAEb,OAAO;AACtBc,IAAAA,gBAAgB,EAAEd;GACnB;AACH;;AAEA;AACA,MAAMe,OAAO,GAAG,EAAE;;AAElB;AACA,MAAMC,cAAc,GAAG,EAAE;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,aAAa,GAAG,EAAE;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,IAAIC,OAAO,EAAE;;AAEzC;AACA,MAAMC,oBAAoB,GAAG,IAAID,OAAO,EAAE;;AAE1C;AACA;AACA;A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O,IAAI;AACb,IAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACEmS,IAAAA,gBAAgBA,GAChB;MACE,OAAO;QAAE,GAAG,IAAI,CAAC,cAAc;QAAExS,OAAO,EAAE,IAAI,CAAC,cAAc,CAACA,OAAO,CAAC8D,GAAG,CAAC2O,CAAC,KAAK;UAAE,GAAGA;AAAE,SAAC,CAAC;OAAG;AAC9F,IAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;IACE,OAAO/B,wBAAwBA,GAC/B;MACE,OAAO1M,iBAAiB,CAACQ,MAAM;AACjC,IAAA;GACD;AA9uCQ6H,EAAAA,aAAa,GAAGA,aAAa;AAU7BvD,EAAAA,OAAO,GAAGjJ,OAAO;AAQjB+R,EAAAA,eAAe,GAAG,UAAU;EAACc,WAAAA,GAAA;IAAA,KAAA,CAAAzM,qBAAA,GAAAsB,UAAA,EAAA;AAAA,EAAA;AAAA,CAAA,EAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Tr2EffectStateManager.js","sources":["../../../../src/trinity/shader/Tr2EffectStateManager.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectStateManager.h\n// Maintained CarbonEngineJS implementation; generated schema is reference-only.\n//\n// STILL INCOMPLETE, and not finished-by-design - but much less so than this\n// note used to claim, and the claim was left standing long after it stopped\n// being true. Implemented: the registration half (registerShader,\n// registerShaderProgram, registerRenderStateSetup, getVertexDeclarationHandle),\n// the m_currentValues redundancy cache, ApplyShaderProgram, ApplyRenderStates,\n// ApplyVertexDeclaration, ApplyStandardStates, ApplyStreamSource,\n// ApplyIndexBuffer, and the viewport and render-target families.\n//\n// Still absent: RegisterShaderProgramOverride, which costs the pixel-shader\n// override path, and DoApplyRenderStates, which is where a state handle turns\n// into the AL's SetRenderStates.\n//\n// This class declares no @carbon.method, so the parity audit cannot see it:\n// an entirely unimplemented class reports clean. Do not read a green audit as\n// evidence that this file is finished.\nimport { type } from \"#schema\";\nimport { CjsModel } from \"#model\";\nimport { RenderingMode } from \"#consts/graphics\";\nimport {\n BlendMode,\n BlendOperation,\n CompareFunc,\n CullMode,\n FillMode,\n RenderState\n} from \"#consts/render-context\";\nimport { Tr2VertexDefinition } from \"../core/vertex/Tr2VertexDefinition/index.js\";\nimport { Tr2RenderStateSetup } from \"#resource/shader\";\nimport { Failed } from \"../../trinityal/ALResult.js\";\n\n// Carbon's tables are file-scope statics shared across every state manager\n// (Tr2EffectStateManager.cpp:17-27, \"These are shared across managers.\"). Ours\n// are module-scope for the same reason: a handle must mean the same thing to\n// every consumer that compares one.\n//\n// The rows hold IDENTITY ONLY. Carbon's row is the Tr2ShaderAL itself, which it\n// can do because its abstraction layer is compile-time selected and sits below\n// Trinity in one binary. Ours is a sibling layer, so the engine keeps its own\n// handle-to-object map and Trinity never has a field a device object could\n// occupy. Same indirection, boundary drawn at our layering.\n\n// Carbon's UNKNOWN (.h:56), module scope so the reset factory can reach it.\nconst UNKNOWN = 0xFFFFFFFF;\n\n// Carbon's VERTEX_STREAM_MAX_COUNT (.h:55).\nconst VERTEX_STREAM_MAX_COUNT = 4;\n\n/**\n * A reset redundancy cache (`CurrentValues::Reset`, cpp:415-431).\n *\n * Every handle starts UNKNOWN rather than zero, because zero is a VALID handle\n * - it is RM_ANY's empty render-state setup and the first interned program -\n * so a zeroed cache would filter out the very first bind of a span.\n */\nfunction NewCurrentValues()\n{\n const streams = [];\n\n for (let i = 0; i < VERTEX_STREAM_MAX_COUNT; i++)\n {\n streams.push({ vertexBuffer: null, offset: UNKNOWN, stride: UNKNOWN });\n }\n\n return {\n shaderProgram: UNKNOWN,\n vertexDeclaration: UNKNOWN,\n streams,\n indexBuffer: null,\n indexStride: 0,\n renderingMode: UNKNOWN,\n renderStateSetup: UNKNOWN\n };\n}\n\n/** Registered shader identities; the index is the handle. */\nconst shaders = [];\n\n/** Registered shader programs; the index is the handle. */\nconst shaderPrograms = [];\n\n// Carbon s_vertexLayoutMap (Tr2EffectStateManager.cpp:863-877): file-scope,\n// mutex-guarded pairs of (Tr2VertexDefinition, Tr2VertexLayoutAL*), appended on\n// first sight, linear-scanned by the definition's own operator==. Ours holds\n// the definition identity only - the layout half of Carbon's pair is a device\n// object, and per the layering note above the engine keeps its own\n// handle-to-object map (ApplyVertexDeclaration's lazy hvl.Create at cpp:895-903\n// happens on that side of the boundary). Single-threaded JS needs no mutex.\n\n/** Interned vertex declarations; the index is the handle. */\nconst vertexLayouts = [];\n\n/**\n * Realized layouts per context, per handle.\n *\n * Carbon stores the created Tr2VertexLayoutAL beside the definition in its own\n * intern table, because one backend is compiled. Ours must key by CONTEXT too:\n * the table is module-level and shared, and a layout made by one backend must\n * never be handed to another. A WeakMap so a dead context takes its layouts.\n */\nconst vertexLayoutObjects = new WeakMap();\n\n/** Realized shader programs per context, per handle; see vertexLayoutObjects. */\nconst shaderProgramObjects = new WeakMap();\n\n// Carbon interns once at asset load and stores the handle on the mesh, so its\n// linear scan never runs per draw. This runtime has no load hook, so the handle\n// is memoised against the element list or definition a payload already owns -\n// same cost profile, no payload mutation, and it lapses with the payload.\nconst vertexLayoutHandles = new WeakMap();\n\n// Carbon's built-in rendering-mode state lists, ported pair for pair from\n// Tr2EffectStateManager.cpp:29-393. A mode's list occupies the render-state\n// handle equal to its own enum value, which is why the table below is indexed\n// by RenderingMode and why registration begins after RM_COUNT.\n//\n// These are the base layer of every draw. Carbon re-applies the current mode's\n// list immediately before a pass's own states, every time\n// (Tr2EffectStateManager.cpp:716), so a pass that authors only a blend mode\n// still gets this mode's depth, cull and colour-write. Reading a pass's states\n// alone yields a pipeline missing most of its state.\n//\n// RM_ANY is deliberately empty: it means \"the caller does not care\", not \"no\n// state\", and Carbon leaves whatever was last applied in place.\nconst { RS_CULLMODE, RS_FILLMODE, RS_ALPHABLENDENABLE, RS_ALPHATESTENABLE, RS_ALPHAFUNC,\n RS_ALPHAREF, RS_ZENABLE, RS_ZWRITEENABLE, RS_ZFUNC, RS_COLORWRITEENABLE, RS_DEPTHBIAS,\n RS_SLOPESCALEDEPTHBIAS, RS_SEPARATEALPHABLENDENABLE, RS_SRCBLEND, RS_DESTBLEND, RS_BLENDOP,\n RS_BLENDOPALPHA, RS_SRCBLENDALPHA, RS_DESTBLENDALPHA } = RenderState;\n\nconst { CULLMODE_CW, CULLMODE_NONE } = CullMode;\nconst { FM_SOLID } = FillMode;\nconst { CMP_LESSEQUAL, CMP_GREATER, CMP_ALWAYS, CMP_EQUAL } = CompareFunc;\nconst { BM_ONE, BM_SRCALPHA, BM_INVSRCALPHA } = BlendMode;\nconst { BO_ADD } = BlendOperation;\n\nconst ALL_CHANNELS = 0x0f;\nconst RGB_CHANNELS = 0x7;\nconst FALSE = 0;\nconst TRUE = 1;\n\n/** Indexed by RenderingMode; the index IS the render-state handle. */\nconst STANDARD_MODE_PAIRS = Object.freeze([\n // RM_ANY\n [],\n // RM_OPAQUE\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_LESSEQUAL, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DECAL\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, TRUE, RS_ALPHAFUNC, CMP_GREATER, RS_ALPHAREF, 127,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DECAL_NO_DEPTH\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, TRUE, RS_ALPHAFUNC, CMP_GREATER, RS_ALPHAREF, 127,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_ALPHA\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_SRCALPHA, RS_DESTBLEND, BM_INVSRCALPHA, RS_BLENDOP, BO_ADD,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_ALPHA_ADDITIVE - note the colour write is RGB only, alpha is left alone.\n [ RS_FILLMODE, FM_SOLID, RS_CULLMODE, CULLMODE_NONE, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_ONE, RS_BLENDOP, BO_ADD,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, RGB_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_DEPTH_ONLY - writes depth and no colour at all.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_LESSEQUAL, RS_COLORWRITEENABLE, 0, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_PICKING\n [ RS_CULLMODE, CULLMODE_CW, RS_ALPHABLENDENABLE, FALSE, RS_ALPHATESTENABLE, FALSE,\n RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE, RS_ZFUNC, CMP_LESSEQUAL,\n RS_FILLMODE, FM_SOLID, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_FULLSCREEN - no depth at all, and Carbon authors no separate-alpha pair.\n [ RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE, RS_ALPHATESTENABLE, FALSE,\n RS_CULLMODE, CULLMODE_NONE, RS_ZENABLE, FALSE, RS_ZWRITEENABLE, FALSE,\n RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0 ],\n // RM_SPRITE2D - Carbon writes RS_CULLMODE twice; the second wins, so the\n // effective cull is NONE. Kept verbatim rather than tidied.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_INVSRCALPHA, RS_BLENDOP, BO_ADD,\n RS_ALPHATESTENABLE, FALSE, RS_CULLMODE, CULLMODE_NONE, RS_ZENABLE, FALSE,\n RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS,\n RS_DEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ],\n // RM_CULL - the one-state mode, cull only.\n [ RS_CULLMODE, CULLMODE_CW ],\n // RM_LIGHT - the only mode authoring separate alpha blending. Carbon repeats\n // RS_SLOPESCALEDEPTHBIAS; harmless and kept.\n [ RS_FILLMODE, FM_SOLID, RS_CULLMODE, CULLMODE_NONE, RS_ALPHABLENDENABLE, TRUE,\n RS_SRCBLEND, BM_ONE, RS_DESTBLEND, BM_ONE, RS_BLENDOP, BO_ADD,\n RS_ZWRITEENABLE, FALSE, RS_ZFUNC, CMP_LESSEQUAL, RS_ZENABLE, TRUE,\n RS_ALPHATESTENABLE, FALSE, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SLOPESCALEDEPTHBIAS, 0,\n RS_SEPARATEALPHABLENDENABLE, TRUE, RS_BLENDOPALPHA, BO_ADD,\n RS_SRCBLENDALPHA, BM_ONE, RS_DESTBLENDALPHA, BM_ONE ],\n // RM_ERASE - always passes depth and rewrites it.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, TRUE,\n RS_ZFUNC, CMP_ALWAYS, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0 ],\n // RM_PREPASS_COLOR - tests equal against the prepass depth and never writes.\n [ RS_CULLMODE, CULLMODE_CW, RS_FILLMODE, FM_SOLID, RS_ALPHABLENDENABLE, FALSE,\n RS_ALPHATESTENABLE, FALSE, RS_ZENABLE, TRUE, RS_ZWRITEENABLE, FALSE,\n RS_ZFUNC, CMP_EQUAL, RS_COLORWRITEENABLE, ALL_CHANNELS, RS_DEPTHBIAS, 0,\n RS_SLOPESCALEDEPTHBIAS, 0, RS_SEPARATEALPHABLENDENABLE, FALSE ]\n].map(pairs => Object.freeze(pairs)));\n\n\n// Carbon seeds this table with RM_COUNT built-in rendering-mode setups, so\n// handle `i` IS mode `i` for i < RM_COUNT (Tr2EffectStateManager.cpp:397-410),\n// and truncates back to them on device loss rather than emptying (:1012).\n// The mode state lists are not ported yet, so the slots are reserved rather\n// than filled: reserving now keeps every later handle stable when they land.\n// Slot 0 carries RM_ANY's genuinely empty list, which is what makes an\n// unauthored setup intern to 0 exactly as Carbon's does.\nconst renderStateSetups = STANDARD_MODE_PAIRS.map(keyValues => ({\n keyValues,\n setup: Tr2RenderStateSetup.fromKeyValues(keyValues)\n}));\n\n/**\n * Whether two byte sequences are identical.\n *\n * Carbon compares size then `memcmp` over the whole body\n * (Tr2EffectStateManager.cpp:487-491) - never by pointer, so two identical\n * bodies read from different offsets still collapse to one entry.\n *\n * @param {Uint8Array} first Left bytes.\n * @param {Uint8Array} second Right bytes.\n * @returns {boolean} Whether the bytes match.\n */\nfunction isSameBytecode(first, second)\n{\n if (first === second) return true;\n if (!first || !second || first.length !== second.length) return false;\n for (let index = 0; index < first.length; index += 1)\n {\n if (first[index] !== second[index]) return false;\n }\n return true;\n}\n\n/**\n * A canonical key for a stage's static sampler signature.\n *\n * Carbon compares `signature.samplers` and nothing else\n * (Tr2EffectStateManager.cpp:493). Registers, pipeline inputs and thread-group\n * size deliberately do not participate, which is why two effects sharing\n * bytecode but declaring different registers collapse to one entry and the\n * second signature is discarded. That is Carbon's behaviour, reproduced.\n *\n * @param {Map|null} samplers Sampler setup map keyed by register index.\n * @returns {string} Canonical identity.\n */\n/**\n * A canonical key for the backend block riding a stage's signature: FNV-1a over\n * its bytes, so two passes with the same bytecode and different blocks intern\n * as two shaders.\n *\n * @param {object|null} block `{ bytes, size }`, or nothing.\n * @returns {string} The key; empty for no block.\n */\nfunction backendBlockKey(block)\n{\n const bytes = block?.bytes;\n\n if (!bytes || !bytes.length) return \"\";\n\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < bytes.length; index += 1)\n {\n hash ^= bytes[index];\n hash = Math.imul(hash, 0x01000193) >>> 0;\n }\n\n return `${bytes.length}:${hash.toString(16)}`;\n}\n\nfunction samplerSignatureKey(samplers)\n{\n if (!samplers || typeof samplers.entries !== \"function\") return \"[]\";\n const entries = [ ...samplers.entries() ]\n .map(([ register, setup ]) => [\n Number(register),\n typeof setup?.GetValues === \"function\" ? setup.GetValues() : setup ?? null\n ])\n .sort((left, right) => left[0] - right[0]);\n return JSON.stringify(entries);\n}\n\nfunction failState(message)\n{\n const error = new Error(`Tr2EffectStateManager: ${message}`);\n error.code = \"CJS_EFFECT_STATE_INVALID\";\n throw error;\n}\n\n/** Tracks the portable render, stream, buffer, viewport, and override state used while applying an effect, owns the process-wide shader, shader-program and render-state registration tables its handle fields index, and filters redundant binds out of the Apply* surface that carries those handles to the abstraction layer. */\n@type.define({ className: \"Tr2EffectStateManager\", family: \"shader\" })\nexport class Tr2EffectStateManager extends CjsModel\n{\n\n /** m_renderContext (Tr2RenderContext&) */\n @type.rawStruct(\"Tr2RenderContext\")\n renderContext = null;\n\n /** m_perObjectConstantBuffers (Tr2ConstantBufferAL) */\n @type.rawStruct(\"Tr2ConstantBufferAL\")\n perObjectConstantBuffers = null;\n\n // Carbon's CurrentValues and RenderStates are PRIVATE nested structs\n // (Tr2EffectStateManager.h:171-206), and nothing serializes a state manager:\n // it is a runtime object, not a resource. The generator had flattened both\n // structs into schema properties, which declared persisted defaults for state\n // that is neither persisted nor reachable from outside. They are private\n // instance fields here, in Carbon's own shape.\n\n /** m_currentValues - the redundancy cache (.h:193). */\n #currentValues = NewCurrentValues();\n\n /** m_isManagedRendering (.h:195). */\n #isManagedRendering = false;\n\n /**\n * m_renderStateOverrides (.h:209), as FLAGS rather than as value tables.\n *\n * Carbon holds an array of `const uint32_t*` indexed by render state, each\n * pointing at a table indexed by the AUTHORED VALUE, and resolves authored\n * pairs through it at apply time (cpp:722-753). It caches the resolved pairs\n * per setup behind a dirty flag because it re-resolves on every draw.\n *\n * Ours cannot use that table: a registered setup is interpreted ONCE at\n * registration into named values, so there are no raw pairs left to index.\n * The equivalent tables live in interpreted space on Tr2RenderStateSetup, and\n * this holds only which of them apply. Carbon's per-setup cache has no\n * counterpart either, and needs none: the projection feeds a pipeline key\n * that already includes the flags' effect, so the two variants are distinct\n * cache entries rather than one entry that must be invalidated.\n *\n * Wireframe (`SetWireframeRendering`, cpp:800-812) is NOT YET PORTED, which\n * is different from being unwanted - it is a working tool for anyone looking\n * at geometry.\n *\n * An earlier note here said it was \"deliberately absent\" because neither\n * browser backend has a fill mode. Half of that is true and the conclusion\n * is not. Neither has an equivalent of `glPolygonMode`, so Carbon's\n * render-state route genuinely cannot be projected - but wireframe does not\n * need one:\n *\n * - LINE TOPOLOGY, reachable today. Carbon's topology 2 and 3 already map\n * to line primitives in the engine layer, so a pass can be drawn as\n * lines by choosing its topology. Edges are shared, so a triangle list\n * drawn this way is not a true wireframe without an index rebuild.\n * - BARYCENTRIC EDGES in the fragment shader. No new geometry, no index\n * rebuild, and usable line widths. This is the usual browser answer.\n *\n * So the blocker is a decision about which route to take, not a missing\n * capability. What must NOT happen is the toggle silently doing nothing.\n */\n #overrides = { invertedDepthTest: false, invertedCullMode: false, wireframe: false };\n\n /** m_renderTargetWidth (int) */\n @type.int32\n renderTargetWidth = 0;\n\n /** m_renderTargetHeight (int) */\n @type.int32\n renderTargetHeight = 0;\n\n /** m_viewport (CTriViewport) */\n @type.rawStruct(\"CTriViewport\")\n viewport = null;\n\n /** m_viewportOnDevice (Tr2Viewport) */\n @type.rawStruct(\"Tr2Viewport\")\n viewportOnDevice = null;\n\n /** m_viewportStack (std::list<CTriViewport>) */\n @type.rawStruct(\"std::list<CTriViewport>\")\n viewportStack = null;\n\n /** m_viewportSizeVar (Tr2Variable) */\n @type.rawStruct(\"Tr2Variable\")\n viewportSizeVar = null;\n\n static RenderingMode = RenderingMode;\n\n /**\n * Carbon's failure and unset handle (`UNKNOWN`, Tr2EffectStateManager.h:56).\n *\n * The same numeric value is spelled `UNINITIALIZED_DECLARATION` (.h:81) and\n * `Tr2EffectStageInput::INVALID` (Tr2EffectDescription.h:172). It must stay\n * `0xFFFFFFFF` rather than `-1`, or the unsigned range checks below flip\n * sign.\n */\n static Unknown = UNKNOWN;\n\n /**\n * Bind an empty vertex layout (`NULL_DECLARATION`, .h:82).\n *\n * A meaningful value, not an error, and deliberately distinct from\n * `Unknown` - do not collapse the two.\n */\n static NullDeclaration = 0xFFFFFFFE;\n\n /**\n * Interns one shader stage's identity and returns its handle.\n *\n * Carbon `RegisterShader` (Tr2EffectStateManager.cpp:466-513) creates the\n * device object here, on the main-thread render context. We register at\n * prepare instead of at read, so this stores identity only and the engine\n * realizes against the handle; see the effect read path decision.\n *\n * Dedupe is Carbon's exactly: stage type, then byte-for-byte body equality,\n * then the static sampler signature. A body registered under a different\n * stage type is a different entry, and so is the same body with different\n * samplers.\n *\n * @param {number} stageType Carbon shader stage type.\n * @param {Uint8Array} bytecode Compiled stage body.\n * @param {object} [signature] Stage signature; only `samplers` participates.\n * @returns {number} Stable handle, or `Unknown` when the body is absent.\n */\n static registerShader(stageType, bytecode, signature = null)\n {\n if (!bytecode || bytecode.length === 0) return Tr2EffectStateManager.Unknown;\n\n const type = Number(stageType);\n // THE BACKEND BLOCK IS PART OF THE KEY. Carbon dedupes on bytecode and\n // samplers because the signature is derived from the bytecode; ours also\n // carries the pass's per-backend block on the signature, and two passes\n // can share a stage's bytecode while laying its bindings out differently.\n // Keyed on bytecode alone, the second pass compiled against the first\n // pass's block.\n const samplerKey = `${samplerSignatureKey(signature?.samplers)}|${backendBlockKey(signature?.backendBlock)}`;\n\n for (let handle = 0; handle < shaders.length; handle += 1)\n {\n const existing = shaders[handle];\n if (existing.stageType !== type) continue;\n if (!isSameBytecode(existing.bytecode, bytecode)) continue;\n if (existing.samplerKey !== samplerKey) continue;\n return handle;\n }\n\n // THE SIGNATURE IS KEPT, not just its sampler key. The key is the identity\n // half - two shaders with the same bytecode and different sampler bindings\n // are different shaders - but the signature itself is what a backend needs\n // to create a shader object, and dropping it here made the row unable to\n // produce one. Carbon does not face this: its row holds the created\n // Tr2ShaderAL, which carries the signature already.\n return shaders.push({ stageType: type, bytecode, samplerKey, signature }) - 1;\n }\n\n /**\n * Interns a program over already-registered stage handles.\n *\n * Carbon `RegisterShaderProgram` (Tr2EffectStateManager.cpp:545-579). The key\n * is the exact ordered handle list, so it is length- and order-sensitive:\n * `[vs, ps]` and `[ps, vs]` are two programs. Carbon's caller fills the array\n * in the effect file's stage order, not by stage type.\n *\n * @param {number[]} shaderHandles Handles from `registerShader`.\n * @returns {number} Stable handle, or `Unknown` for an empty or stale list.\n */\n static registerShaderProgram(shaderHandles)\n {\n const handles = [ ...(shaderHandles ?? []) ].map(Number);\n if (handles.length === 0) return Tr2EffectStateManager.Unknown;\n // An out-of-range member also catches Unknown and INVALID, because both are\n // 0xFFFFFFFF and every table check is a range check rather than a sentinel\n // comparison (Tr2EffectStateManager.cpp:558-561).\n if (handles.some(handle => !(handle >= 0 && handle < shaders.length)))\n {\n return Tr2EffectStateManager.Unknown;\n }\n\n for (let handle = 0; handle < shaderPrograms.length; handle += 1)\n {\n const existing = shaderPrograms[handle].shaderHandles;\n if (existing.length !== handles.length) continue;\n if (existing.every((value, index) => value === handles[index])) return handle;\n }\n\n return shaderPrograms.push({ shaderHandles: handles }) - 1;\n }\n\n /**\n * Interns a pass's authored render states and returns its handle.\n *\n * Carbon `RegisterRenderStateSetup` (Tr2EffectStateManager.cpp:442-464) keys\n * on the authored pairs flattened in render-state order, which its\n * `std::map` gives it for free. We sort explicitly and collapse duplicate\n * ids the same way.\n *\n * Keyed on the AUTHORED pairs rather than on the interpreted\n * `Tr2RenderStateSetup.Key()`, so handles match Carbon's numbering: a pass\n * that authors a state at its default value is a distinct setup there even\n * though it draws identically.\n *\n * @param {object} pass Reflected pass carrying `renderStateValues`.\n * @returns {number} Stable handle. This one never fails.\n */\n static registerRenderStateSetup(pass)\n {\n const authored = new Map();\n for (const entry of pass?.renderStateValues ?? [])\n {\n authored.set(Number(entry.state), Number(entry.value));\n }\n\n const keyValues = [ ...authored.entries() ]\n .sort((left, right) => left[0] - right[0])\n .flat();\n\n for (let handle = 0; handle < renderStateSetups.length; handle += 1)\n {\n const existing = renderStateSetups[handle].keyValues;\n if (existing === null || existing.length !== keyValues.length) continue;\n if (existing.every((value, index) => value === keyValues[index])) return handle;\n }\n\n return renderStateSetups.push({\n keyValues,\n setup: Tr2RenderStateSetup.fromPass(pass)\n }) - 1;\n }\n\n /**\n * Stamps every pass of a resolved shader with its registration handles.\n *\n * Carbon does this inside `Tr2EffectDescription::Read`\n * (Tr2EffectDescription.cpp:587-666), because there the shader body and the\n * registration tables are on the same side of the layering. Ours are not:\n * `Tr2Pass` belongs to the resource layer's reflection, and the resource\n * layer may not import Trinity. So the stamp happens at the Trinity boundary\n * instead, on the first rebuild that resolves a shader.\n *\n * That is a timing difference with no behavioural one. Registration interns\n * identity and creates nothing, so it neither needs a device nor makes the\n * reflection graph device-dependent, and interning is idempotent: re-stamping\n * the same shader yields the same handles.\n *\n * Program members are collected in the pass's retained file order, not by\n * stage type, because Carbon indexes its handle array by position while\n * reading (`shaderHandles[stageIx]`, Tr2EffectDescription.cpp:592) and the\n * program key is order-sensitive. `Tr2Pass.stageOrder` exists precisely\n * because that ordering is authored rather than derivable.\n *\n * @param {object} shader Resolved `Tr2Shader`.\n * @returns {object} The same shader, stamped.\n */\n static registerShaderHandles(shader)\n {\n const techniques = shader?.GetEffect()?.techniques ?? [];\n\n for (const technique of techniques)\n {\n for (const pass of technique?.passes ?? [])\n {\n const stageInputs = pass?.stageInputs ?? [];\n const ordered = pass?.stageOrder?.length\n ? pass.stageOrder\n : stageInputs.map((_, stageType) => stageType).filter(stageType => stageInputs[stageType]?.exists);\n\n const programMembers = [];\n\n for (const stageType of ordered)\n {\n const stage = stageInputs[stageType];\n if (!stage?.exists) continue;\n\n const handle = Tr2EffectStateManager.registerShader(\n stageType,\n stage.sourceProgram?.bytes ?? null,\n stage.signature\n );\n\n stage.shader = handle;\n programMembers.push(handle);\n }\n\n pass.shaderProgram = Tr2EffectStateManager.registerShaderProgram(programMembers);\n pass.renderStates = Tr2EffectStateManager.registerRenderStateSetup(pass);\n }\n }\n\n // Carbon packs the sort key from the handles it has just assigned\n // (Tr2Shader.cpp:235-240); until they exist the key is unavoidably zero.\n shader?.ProcessEffect();\n\n return shader;\n }\n\n /**\n * The stable handle for a vertex declaration, interning it on first sight.\n *\n * Carbon `GetVertexDeclarationHandle` (Tr2EffectStateManager.cpp:863-877):\n * linear-scan the intern table for an equal definition, return its index, or\n * append and return the new index. The handle is what a batch carries and\n * what binning and sorting compare.\n *\n * WHY THE TABLE HOLDS A UNION and does not normalise at the door: Carbon's\n * signature admits only Tr2VertexDefinition, so its map is uniform. Ours\n * also interns payload element lists, which speak the PRODUCER's type\n * vocabulary (\"Float32\" + elementCount, not \"FLOAT32_3\") and carry no\n * ledger. Wrapping one into a definition would either fabricate ledger\n * values the byte arithmetic cannot derive from those type names, or\n * zero-fill them - and a zero ledger then fails Carbon's own equality\n * (which compares all four slots) against an authored definition with the\n * same items. Storing what arrived keeps interning correct across both\n * producers; isSameDefinition compares the ledger only when both sides\n * carry one. Revisit if CarbonVertexElements ever normalises type names.\n *\n * @param {Array|Tr2VertexDefinition} elements A definition or plain element list.\n * @returns {number} Stable handle.\n */\n static getVertexDeclarationHandle(elements)\n {\n const key = elements?.items ?? elements ?? [];\n const memoised = vertexLayoutHandles.get(key);\n\n if (memoised !== undefined) return memoised;\n\n let handle = vertexLayouts.findIndex(candidate => Tr2VertexDefinition.isSameDefinition(candidate, elements));\n\n if (handle < 0)\n {\n handle = vertexLayouts.push(elements) - 1;\n }\n\n if (typeof key === \"object\") vertexLayoutHandles.set(key, handle);\n\n return handle;\n }\n\n /**\n * The declaration a handle was interned from, or null for an unknown handle.\n *\n * Carbon `GetVertexDeclarationElements` (Tr2EffectStateManager.cpp:912-923)\n * copies the definition into an out parameter and returns a bool; returning\n * the interned identity or null is the same contract without the copy.\n *\n * @param {number} handle Vertex-declaration handle.\n * @returns {Array|Tr2VertexDefinition|null} The interned declaration.\n */\n static getVertexDeclarationElements(handle)\n {\n return vertexLayouts[handle] ?? null;\n }\n\n /**\n * The identity a shader handle was interned from, or null when out of range.\n *\n * @param {number} handle Shader handle.\n * @returns {object|null} Interned identity.\n */\n static getShaderRecord(handle)\n {\n return shaders[handle] ?? null;\n }\n\n /**\n * The member handles a program was interned from, or null when out of range.\n *\n * Carbon `GetShaderProgram` (Tr2EffectStateManager.cpp:780-787) returns the\n * device object and null-checks at every call site; ours returns identity for\n * the engine to realize against.\n *\n * @param {number} handle Program handle.\n * @returns {object|null} Interned identity.\n */\n static getShaderProgramRecord(handle)\n {\n return shaderPrograms[handle] ?? null;\n }\n\n /**\n * The interpreted setup a render-state handle was interned from.\n *\n * Null for a reserved built-in slot that has no ported state list yet, and\n * for an out-of-range handle.\n *\n * @param {number} handle Render-state handle.\n * @returns {Tr2RenderStateSetup|null} Interpreted setup.\n */\n static getRenderStateSetup(handle)\n {\n return renderStateSetups[handle]?.setup ?? null;\n }\n\n /**\n * The effective render state for a pass drawn in a rendering mode.\n *\n * Carbon does not choose between the two: `ApplyRenderStates` re-applies the\n * current mode's standard states and THEN the pass's own, every time\n * (Tr2EffectStateManager.cpp:703-720). So a pass authoring only a blend mode\n * still draws with its mode's depth, cull and colour-write, and reading the\n * pass alone yields a pipeline missing most of its state.\n *\n * Merging is concatenation because a repeated state id overwrites the earlier\n * one. RM_ANY contributes nothing, which is its meaning.\n *\n * @param {number} renderingMode A `RenderingMode` member.\n * @param {number} [handle] Registered pass render-state handle.\n * @returns {Tr2RenderStateSetup|null} Merged setup, or null when neither exists.\n */\n static resolveRenderStates(renderingMode, handle = Tr2EffectStateManager.Unknown)\n {\n const standard = STANDARD_MODE_PAIRS[renderingMode] ?? [];\n const pass = renderStateSetups[handle]?.keyValues ?? null;\n\n // A handle inside the reserved range IS a mode, already covered by the\n // standard half; merging it with itself would be harmless but confusing.\n if (!pass || handle < RenderingMode.RM_COUNT)\n {\n return standard.length ? Tr2RenderStateSetup.fromKeyValues(standard) : null;\n }\n\n return Tr2RenderStateSetup.fromKeyValues([ ...standard, ...pass ]);\n }\n\n\n /**\n * Drops every registered identity, as Carbon does on device loss.\n *\n * Carbon `ReleaseDeviceResources` (Tr2EffectStateManager.cpp:982-1023) clears\n * the shader and program tables and truncates the render-state table back to\n * its built-in modes, keeping handles 0..RM_COUNT-1 stable across a reset. It\n * leaves the vertex-layout table alone: only the device objects behind it are\n * invalidated, and the declarations survive.\n *\n * Every handle held on a pass is stale afterwards. Carbon's recovery is that\n * releasing the effect resource forces a re-parse and re-registration.\n *\n * @returns {void}\n */\n static releaseDeviceResources()\n {\n shaders.length = 0;\n shaderPrograms.length = 0;\n renderStateSetups.length = RenderingMode.RM_COUNT;\n }\n\n\n // ---------------------------------------------------------------------\n // The viewport family (Tr2EffectStateManager.cpp:1065-1245).\n //\n // TWO VIEWPORTS, AND THAT IS THE POINT. `viewport` is what the caller asked\n // for and is what `GetViewport` returns. `viewportOnDevice` is that CLIPPED\n // to the bound render target, and it is the only one the backend ever sees.\n // Carbon derives the second from the first on every set, so a caller may\n // author a viewport larger than its target and still produce a legal draw.\n //\n // The clip floors each edge at one pixel, with Carbon's reason attached:\n // \"using zero edge length causes dx error\". A browser refuses it too, so the\n // floor earns its place here rather than being D3D trivia.\n //\n // These live HERE and not on the render context because that is where Carbon\n // puts them: the context is the abstraction layer, and its `SetViewport`\n // takes the already-clipped device viewport.\n\n /** The render context this manager applies state to (Carbon's m_renderContext). */\n #renderContext = null;\n\n /**\n * Binds the render context this manager applies state through.\n *\n * Carbon constructs the manager as a member of the context\n * (`Tr2RenderContext.h:35`), so the pairing is fixed there; ours is composed,\n * so it is bound once and never rebound.\n *\n * @param {object} renderContext The owning render context.\n * @returns {Tr2EffectStateManager} This manager.\n */\n SetRenderContext(renderContext)\n {\n this.#renderContext = renderContext;\n\n return this;\n }\n\n /**\n * Forgets every program and vertex layout realized for this manager's\n * context, so the next apply creates them through whatever backend the\n * context holds now.\n *\n * Called when the context's backend changes: the realized objects belong to\n * the backend that made them, and a WebGPU draw handed a stub program\n * refuses the resource set built against it.\n *\n * @returns {void}\n */\n ReleaseRealizedObjects()\n {\n if (!this.#renderContext) return;\n\n shaderProgramObjects.delete(this.#renderContext);\n vertexLayoutObjects.delete(this.#renderContext);\n }\n\n /**\n * Binds a render target to a slot and refreshes the viewport for slot zero.\n *\n * Carbon's is `SetRenderTarget(index, rt, updateViewport, slice)`\n * (cpp:1133-1152): it sets through the abstraction layer and then, for slot\n * zero only, asks the CONTEXT for the target's extent. Its comment says why\n * the context and not the texture: \"don't use rt.GetWidth/Height, rt may be\n * nullRT\".\n *\n * @param {number} index Target slot.\n * @param {object|null} renderTarget The target.\n * @param {boolean} [updateViewport] Whether slot zero moves the viewport.\n * @returns {boolean} Whether the bind was accepted.\n */\n SetRenderTarget(index, renderTarget, updateViewport = true, slice = 0)\n {\n // SLICE IS CARBON'S FOURTH ARGUMENT (`Tr2EffectStateManager.h:147`) and it\n // was being dropped here. The WebGPU backend already accepts one, so a\n // caller rendering into a cascade or a cube face was silently writing\n // slice 0 - a correct-looking image in the wrong place.\n const bound = this.#renderContext.SetRenderTarget(index, renderTarget, slice);\n\n if (index === 0 && updateViewport) this.#RefreshRenderTargetViewport();\n\n return bound;\n }\n\n /**\n * Saves the target bound to a slot, and binds a new one if given.\n *\n * Carbon's two overloads (cpp:1043-1052): the slot-only form saves and binds\n * nothing, the two-argument form saves and then sets.\n *\n * @param {object|null} [renderTarget] The target to bind after saving.\n * @param {number} [slot] Target slot.\n * @returns {boolean} True.\n */\n PushRenderTarget(renderTarget = undefined, slot = 0)\n {\n this.#renderContext.PushRenderTarget(slot);\n\n // UNDEFINED IS \"SAVE ONLY\"; NULL IS \"SAVE AND UNBIND\". Carbon draws that\n // distinction with its two overloads plus a default-constructed\n // Tr2TextureAL, which is a real argument that binds an EMPTY texture and so\n // clears the slot (`Tr2ShadowMap.cpp:238`, commented \"empty texture\").\n // Testing `!= null` instead made the unbind unreachable: a shadow pass asking\n // for it silently kept the scene's colour target bound for the whole pass.\n // PushDepthStencilBuffer below already uses this sentinel.\n if (renderTarget !== undefined) this.SetRenderTarget(slot, renderTarget);\n\n return true;\n }\n\n /**\n * Restores the target saved for a slot and refreshes the viewport.\n *\n * @param {number} [slot] Target slot.\n * @returns {boolean} False when nothing was saved.\n */\n PopRenderTarget(slot = 0)\n {\n const popped = this.#renderContext.PopRenderTarget(slot);\n\n if (slot === 0) this.#RefreshRenderTargetViewport();\n\n return popped;\n }\n\n /**\n * Binds the depth-stencil surface.\n *\n * @param {object|null} depthStencil The surface, or null to unbind.\n * @returns {boolean} Whether the bind was accepted.\n */\n SetDepthStencilBuffer(depthStencil)\n {\n return this.#renderContext.SetDepthStencil(depthStencil);\n }\n\n /**\n * Saves the bound depth-stencil, and binds another if one is given.\n *\n * Carbon has three overloads and the difference between two of them matters:\n * no argument saves and binds nothing, while an explicitly EMPTY texture\n * saves and then unbinds (`TriStepPushDepthStencil.cpp:44,48`). Passing\n * `undefined` is the first; passing `null` is the second.\n *\n * @param {object|null} [depthStencil] The surface to bind after saving.\n * @returns {boolean} True.\n */\n PushDepthStencilBuffer(depthStencil = undefined)\n {\n this.#renderContext.PushDepthStencil();\n\n if (depthStencil !== undefined) this.SetDepthStencilBuffer(depthStencil);\n\n return true;\n }\n\n /**\n * Restores the saved depth-stencil.\n *\n * @returns {boolean} False when nothing was saved.\n */\n PopDepthStencilBuffer()\n {\n return this.#renderContext.PopDepthStencil();\n }\n\n /** Reads the bound target's extent and resets the viewport to it. */\n #RefreshRenderTargetViewport()\n {\n const size = this.#renderContext.GetRenderTargetSize(0);\n\n if (Failed(size.result)) return;\n\n this.UpdateRenderTargetViewport(size.width, size.height);\n\n // Carbon stops at the update, because its backend applies the viewport as\n // part of the target bind. Ours does not, so the derived viewport is pushed\n // here - the backend forces this, not preference.\n this.SetupViewport();\n }\n\n /**\n * The viewport as authored, which is not necessarily the one being drawn.\n *\n * @returns {object|null} The authored viewport, or null before one is set.\n */\n GetViewport()\n {\n return this.viewport;\n }\n\n /**\n * The viewport actually handed to the backend, clipped to the render target.\n *\n * @returns {object|null} The device viewport, or null before one is set.\n */\n GetDeviceViewport()\n {\n return this.viewportOnDevice;\n }\n\n /**\n * Sets the authored viewport and derives the device one.\n *\n * @param {object} viewport `{ x, y, width, height, minZ, maxZ }`.\n * @returns {void}\n */\n SetViewport(viewport)\n {\n this.viewport = {\n x: viewport.x ?? 0,\n y: viewport.y ?? 0,\n width: viewport.width ?? 0,\n height: viewport.height ?? 0,\n minZ: viewport.minZ ?? 0,\n maxZ: viewport.maxZ ?? 1\n };\n\n this.SetupViewport();\n }\n\n /**\n * Sets the authored viewport to the whole render target.\n *\n * @returns {void}\n */\n SetFullScreenViewport()\n {\n this.viewport = {\n x: 0,\n y: 0,\n width: this.renderTargetWidth,\n height: this.renderTargetHeight,\n minZ: 0,\n maxZ: 1\n };\n\n this.SetupViewport();\n }\n\n /**\n * Clips the authored viewport to the render target and hands it to the\n * backend.\n *\n * @returns {void}\n */\n SetupViewport()\n {\n const authored = this.viewport;\n\n if (!authored) failState(\"SetupViewport needs an authored viewport\");\n\n const x1 = authored.x + authored.width;\n const y1 = authored.y + authored.height;\n const x = Math.max(authored.x, 0);\n const y = Math.max(authored.y, 0);\n\n // ONE DEPARTURE, AND IT IS A REFUSAL TO INVENT. Carbon always has a render\n // target, so its extent is always known and the clip always applies. Ours\n // can be asked before anything is bound, and clipping to an extent of zero\n // would floor the viewport at ONE PIXEL - a frame that draws, in the wrong\n // place, silently. With no extent recorded the authored viewport passes\n // through unclipped; once a target is bound the clip is Carbon's exactly.\n const clipped = this.renderTargetWidth > 0 && this.renderTargetHeight > 0;\n\n this.viewportOnDevice = {\n x,\n y,\n // Floored at one: a zero edge is refused by the backend, not merely odd.\n width: clipped ? Math.max(Math.min(x1, this.renderTargetWidth) - x, 1) : authored.width,\n height: clipped ? Math.max(Math.min(y1, this.renderTargetHeight) - y, 1) : authored.height,\n minZ: authored.minZ,\n maxZ: authored.maxZ\n };\n\n // Carbon assigns a Vector4 of the AUTHORED extent and the target's\n // (cpp:1242). Note it uses the DEVICE extent in UpdateRenderTargetViewport\n // instead - transcribed as it stands rather than made consistent.\n this.viewportSizeVar = [\n authored.width,\n authored.height,\n this.renderTargetWidth,\n this.renderTargetHeight\n ];\n\n if (this.#renderContext) this.#renderContext.SetViewport(this.viewportOnDevice);\n }\n\n /**\n * Records the bound render target's extent and resets both viewports to it.\n *\n * Carbon writes both viewports directly here rather than going through\n * `SetupViewport`, and does NOT push to the backend: the target bind that\n * called this carries the viewport with it (cpp:1193-1214).\n *\n * @param {number} width Render target width.\n * @param {number} height Render target height.\n * @returns {void}\n */\n UpdateRenderTargetViewport(width, height)\n {\n if (!(width > 0) || !(height > 0)) failState(\"a render target's viewport needs a non-zero extent\");\n\n this.renderTargetWidth = width;\n this.renderTargetHeight = height;\n\n this.viewport = { x: 0, y: 0, width, height, minZ: 0, maxZ: 1 };\n this.viewportOnDevice = { x: 0, y: 0, width, height, minZ: 0, maxZ: 1 };\n this.viewportSizeVar = [ width, height, width, height ];\n }\n\n /**\n * Saves the authored viewport.\n *\n * @returns {void}\n */\n PushViewport()\n {\n if (!Array.isArray(this.viewportStack)) this.viewportStack = [];\n\n this.viewportStack.push(this.viewport);\n }\n\n /**\n * Restores the last saved viewport, deriving the device one again.\n *\n * @returns {boolean} False when nothing was saved.\n */\n PopViewport()\n {\n if (!Array.isArray(this.viewportStack) || !this.viewportStack.length) return false;\n\n const restored = this.viewportStack.pop();\n\n if (restored) this.SetViewport(restored);\n\n return true;\n }\n\n /**\n * Depth of the viewport save stack.\n *\n * @returns {number} Saved viewports.\n */\n GetStackSizeViewport()\n {\n return Array.isArray(this.viewportStack) ? this.viewportStack.length : 0;\n }\n\n /**\n * Begins a managed-rendering span, in which redundant applies are filtered.\n *\n * Carbon resets the redundancy cache and unbinds the shader program first\n * (cpp:670-694), because outside a span nothing tracks what the device holds\n * and a stale cache would skip a needed bind.\n *\n * The cull-mode argument is not a state to set: it selects mirroring, so\n * `CULLMODE_CCW` means \"this span is mirrored\" and `CULLMODE_NONE` leaves the\n * current setting alone.\n *\n * @param {number} [cullMode] A `CullMode` member.\n * @returns {void}\n */\n BeginManagedRendering(cullMode = CullMode.CULLMODE_NONE)\n {\n this.#currentValues = NewCurrentValues();\n this.#isManagedRendering = true;\n\n if (cullMode === CullMode.CULLMODE_CW) this.SetInvertedCullMode(false);\n else if (cullMode === CullMode.CULLMODE_CCW) this.SetInvertedCullMode(true);\n }\n\n /**\n * Ends the span. The overrides survive it, as they do in Carbon.\n *\n * @returns {void}\n */\n EndManagedRendering()\n {\n this.#isManagedRendering = false;\n }\n\n /**\n * Whether redundant applies are currently being filtered.\n *\n * @returns {boolean}\n */\n IsManagedRendering()\n {\n return this.#isManagedRendering;\n }\n\n /**\n * Draws this span with the depth comparison reversed.\n *\n * Carbon installs a table over RS_ZFUNC that swaps LESS with GREATER and\n * LEQUAL with GEQUAL, leaving NEVER, EQUAL, NOTEQUAL and ALWAYS untouched\n * (cpp:834-856). It is a per-manager setting rather than authored per pass,\n * because the same registered setup is drawn both ways.\n *\n * @param {boolean} inverted\n * @returns {void}\n */\n SetInvertedDepthTest(inverted)\n {\n this.#overrides.invertedDepthTest = !!inverted;\n }\n\n /**\n * @returns {boolean} Whether the depth comparison is reversed.\n */\n IsDepthTestInverted()\n {\n return this.#overrides.invertedDepthTest;\n }\n\n /**\n * Draws this span mirrored, swapping the two winding orders and leaving NONE\n * alone (cpp:815-827).\n *\n * @param {boolean} inverted\n * @returns {void}\n */\n SetInvertedCullMode(inverted)\n {\n this.#overrides.invertedCullMode = !!inverted;\n }\n\n /**\n * @returns {boolean} Whether the winding order is mirrored.\n */\n IsCullModeInverted()\n {\n return this.#overrides.invertedCullMode;\n }\n\n /**\n * Draws this span as wireframe (cpp:800-812).\n *\n * Carbon sets an `RS_FILLMODE` override of\n * `{ 0, FM_POINT, FM_WIREFRAME, FM_WIREFRAME }` and clears it to turn the\n * mode off, using the same override machinery as the cull mode above. Ours\n * keeps the named flag rather than the raw table, for the reason the class\n * head gives: a registered setup is interpreted once, so there are no raw\n * pairs left to index.\n *\n * THE FLAG IS RECORDED HERE; NO BACKEND HONOURS IT YET. Neither browser API\n * has an equivalent of `glPolygonMode`, so Carbon's fill-mode route cannot be\n * projected - but wireframe does not need one (line topology, or barycentric\n * edges in the fragment shader). The blocker is which route to take.\n *\n * Until one is taken, `IsWireframeRendering` is the flag a backend must read,\n * and a backend that cannot honour it must REFUSE rather than draw solid.\n * A toggle that silently does nothing is the thing this must not become.\n *\n * @param {boolean} enabled Whether to draw wireframe.\n * @returns {boolean} The flag as stored.\n */\n SetWireframeRendering(enabled)\n {\n this.#overrides.wireframe = !!enabled;\n\n return this.#overrides.wireframe;\n }\n\n /**\n * @returns {boolean} Whether this span is set to draw wireframe.\n */\n IsWireframeRendering()\n {\n return this.#overrides.wireframe;\n }\n\n /**\n * Which of Carbon's render-state overrides this manager currently applies.\n *\n * This is where Carbon's DoApplyRenderStates would land, and deliberately\n * stops short of it. Carbon resolves authored pairs against its override\n * tables and submits them to the render context; a backend that bakes the\n * same states into a pipeline has no such call, and one that sets them\n * imperatively wants them in its own vocabulary. So the manager hands over\n * WHICH overrides are active and the backend's projection applies them - the\n * inversion tables live in interpreted space on Tr2RenderStateSetup, beside\n * the values they rewrite.\n *\n * Carbon's dirty-flagged per-setup cache has no counterpart and needs none: a\n * projected state set feeds a pipeline key that already includes the flags'\n * effect, so the two variants are distinct entries rather than one entry that\n * must be invalidated.\n *\n * @returns {{invertedDepthTest: boolean, invertedCullMode: boolean}} A copy.\n */\n GetRenderStateOverrides()\n {\n return { ...this.#overrides };\n }\n\n /**\n * Records the rendering mode and returns whether its standard states must be\n * applied.\n *\n * Carbon re-applies the mode's states ahead of every pass setup rather than\n * restoring after one (cpp:703-719), which is why a pass's states leak into\n * whatever draws next without an intervening ApplyRenderStates. It then sets\n * the current setup to UNKNOWN, so the next ApplyRenderStates cannot be\n * filtered out.\n *\n * @param {number} renderingMode A `RenderingMode` member.\n * @returns {boolean} Whether the mode carries states to apply.\n */\n ApplyStandardStates(renderingMode)\n {\n // THE PREDICATE IS CARBON'S, AND SO IS ACTING ON IT. This returned the\n // condition and applied nothing until 2026-09-09, so the base depth, cull\n // and colour-write block for every rendering mode was never set - and all\n // four callers discard the boolean, so nothing noticed. Carbon\n // (`cpp:790-799`):\n //\n // if( rm > RM_ANY && rm < RM_COUNT ) { DoApplyRenderStates( uint32_t( rm ) ); }\n //\n // The mode IS the handle: the first RM_COUNT setup slots are the standard\n // states, which is why interned registration begins after RM_COUNT.\n const carriesStates = renderingMode > RenderingMode.RM_ANY && renderingMode < RenderingMode.RM_COUNT;\n\n if (carriesStates) this.DoApplyRenderStates(renderingMode);\n\n this.#currentValues.renderingMode = renderingMode;\n this.#currentValues.renderStateSetup = Tr2EffectStateManager.Unknown;\n\n // Carbon returns void; the boolean is kept because callers already take it,\n // and it now reports what was applied rather than what could have been.\n return carriesStates;\n }\n\n /**\n * Applies a render-state setup to the backend.\n *\n * Carbon (`cpp:703-720`) filters a redundant handle inside a managed span,\n * then does TWO things: re-applies the current rendering mode's standard\n * states, and only then the pass's own. Reading a pass's states alone yields a\n * pipeline missing most of its state, which is why the order is transcribed\n * rather than simplified.\n *\n * @param {number} handle Render-state handle.\n * @returns {boolean} False when the handle is already current in a managed span.\n */\n ApplyRenderStates(handle)\n {\n if (this.#isManagedRendering && handle === this.#currentValues.renderStateSetup) return false;\n\n if (handle < Tr2EffectStateManager.getRenderStateSetupCount())\n {\n this.ApplyStandardStates(this.#currentValues.renderingMode);\n this.DoApplyRenderStates(handle);\n\n this.#currentValues.renderStateSetup = handle;\n\n return true;\n }\n\n this.#currentValues.renderStateSetup = handle;\n\n return false;\n }\n\n /**\n * Resolves a setup against the current overrides and hands it to the backend.\n *\n * Carbon `DoApplyRenderStates` (`cpp:722-755`) walks the registered\n * state-PAIR list substituting `m_renderStateOverrides[state][value]`, caches\n * the resolved list per setup behind a dirty flag, and calls\n * `m_renderContext.SetRenderStates( &kv[0], kv.size() / 2 )`.\n *\n * OURS RESOLVES A PROJECTION RATHER THAN A PAIR LIST, for the reason the class\n * head gives: a registered setup is interpreted ONCE at registration, so there\n * are no raw pairs left to index. The override tables live in interpreted\n * space on `Tr2RenderStateSetup`, whose `GetWebgpuRecipe` already accepts\n * `invertedDepthTest` and `invertedCullMode`. Same substitution, one layer up.\n *\n * CARBON'S PER-SETUP CACHE HAS NO COUNTERPART HERE, and adding one would be\n * cargo. Carbon caches because it performs the substitution itself and the\n * result is a list it would otherwise rebuild every draw. We substitute\n * nothing - the setup and the overrides go to the backend, which projects\n * them - and the projection's result is already cached by the pipeline cache,\n * keyed on the recipe the overrides changed. Two caches for one derivation is\n * how they fall out of step.\n *\n * WIREFRAME REFUSES HERE, and that is the answer to this class's own note\n * about the toggle. `GetWebgpuRecipe` throws for any fill mode but solid,\n * because WebGPU has no `glPolygonMode` - so the flag reaches a backend that\n * says it cannot honour it, rather than being quietly dropped.\n *\n * @param {number} handle Render-state handle.\n * @returns {boolean} Whether a setup reached the backend.\n */\n DoApplyRenderStates(handle)\n {\n const setup = Tr2EffectStateManager.getRenderStateSetup(handle);\n\n if (!setup || !this.#renderContext) return false;\n\n return this.#renderContext.SetRenderStates(this.#OverMode(handle, setup), this.GetRenderStateOverrides());\n }\n\n /**\n * A pass setup carrying the current rendering mode's states underneath it.\n *\n * RENDER STATES ARE STICKY IN CARBON, and reproducing that is the whole point\n * of this method. Carbon sets them one at a time through D3D, so\n * `ApplyStandardStates` lays down the rendering mode's block and a pass setup\n * then speaks only for what it changes. Ours interprets a setup ONCE into a\n * complete projection, so handing the backend a pass setup REPLACED the mode's\n * block and turned the pass's silence into interpreted defaults.\n *\n * It cost a hull. RM_OPAQUE asks for `CULLMODE_CW` - cull the FRONT faces,\n * D3D's clockwise-is-front convention - and every `quadv5` pass authors no\n * cull at all, so the default `CULLMODE_CCW` culled the back ones instead.\n * Every EVE ship drew its own interior: right silhouette, wrong surfaces,\n * which is a genuinely hard thing to see. ccpwgl sets `CULL_CW` to\n * `gl.cullFace(gl.FRONT)` against `frontFace(CW)` and agrees exactly\n * (`Tw2Device.js:272,1343-1346,1604`).\n *\n * A MODE HANDLE IS NOT OVERLAID ON ITSELF: the first `RM_COUNT` slots ARE the\n * standard states, so those apply as they are.\n *\n * Merged setups are cached per mode and handle, so the backend keeps seeing\n * one stable object and its redundant-apply check still bites.\n *\n * @param {number} handle The setup being applied.\n * @param {object} setup The interpreted setup for that handle.\n * @returns {object} The setup to hand the backend.\n */\n #OverMode(handle, setup)\n {\n const mode = this.#currentValues.renderingMode;\n const carriesStates = mode > RenderingMode.RM_ANY && mode < RenderingMode.RM_COUNT;\n\n // Only a mode applying ITS OWN block is left alone. An earlier version\n // excluded every handle below RM_COUNT, which caught the reserved RM_ANY\n // slot - and a pass that registers no states gets exactly that handle, whose\n // interpreted setup is a full projection of DEFAULTS. Applying it over the\n // mode erased the mode.\n if (!carriesStates || handle === mode) return setup;\n\n const key = `${mode}:${handle}`;\n const cached = this.#overMode.get(key);\n\n if (cached) return cached;\n\n const merged = Tr2RenderStateSetup.Overlay(Tr2EffectStateManager.getRenderStateSetup(mode), setup);\n\n this.#overMode.set(key, merged);\n\n return merged;\n }\n\n /** Merged mode-plus-pass setups, keyed by both handles. */\n #overMode = new Map();\n\n /**\n * Whether this shader program needs binding.\n *\n * Carbon updates the cached value only INSIDE the managed branch (cpp:758-771)\n * and this keeps that asymmetry: outside a span nothing tracks the device, so\n * recording a value there would let the next span's first bind be skipped.\n *\n * @param {number} handle Shader-program handle.\n * @returns {boolean}\n */\n ApplyShaderProgram(handle)\n {\n if (this.#isManagedRendering)\n {\n if (handle === this.#currentValues.shaderProgram) return false;\n\n this.#currentValues.shaderProgram = handle;\n }\n\n // IT BINDS. This recorded the handle and reached no backend until\n // 2026-09-09. Carbon `cpp:758-778`: an in-range handle sets the interned\n // program, and an out-of-range one sets a DEFAULT-CONSTRUCTED program -\n // which unbinds. Both halves are here, because the else branch is what\n // stops a span inheriting the previous span's program.\n if (!this.#renderContext) return true;\n\n const program = handle >= 0 && handle < shaderPrograms.length\n ? this.GetShaderProgram(handle)\n : null;\n\n this.#renderContext.SetShaderProgram(program);\n\n return true;\n }\n\n /**\n * Creates the backend's program for an interned handle, once.\n *\n * Carbon's row already HOLDS the created `Tr2ShaderProgramAL`\n * (`s_shaderPrograms[ix].first`), because it compiles one backend and can put\n * a device object in its own table. Ours holds identity plus the bytecode and\n * signature each stage registered, and the backend builds from those - the\n * same reason `CreateVertexLayout` and `CreateBuffer` live on the context.\n *\n * Carbon's `GetShaderProgram` (`Tr2EffectStateManager.cpp`), which\n * `Tr2Material::ApplyMaterialDataForPass` calls to hand the program to\n * `Tr2ResourceSetAL::Create` (`Tr2Material.cpp:232-234`). Public for the\n * same caller here.\n *\n * @param {number} handle A shader-program handle.\n * @returns {object|null} The realized program, or null when a stage refused.\n */\n GetShaderProgram(handle)\n {\n if (!this.#renderContext) return null;\n if (!(handle >= 0 && handle < shaderPrograms.length)) return null;\n\n const realized = shaderProgramObjects.get(this.#renderContext) ?? new Map();\n const cached = realized.get(handle);\n\n // A cached NULL is a remembered refusal. Without this a program whose stage\n // failed to compile is rebuilt on every apply, which turns one bad shader\n // into per-draw work.\n if (cached !== undefined) return cached;\n\n const stages = [];\n\n for (const shaderHandle of shaderPrograms[handle].shaderHandles)\n {\n const row = shaders[shaderHandle];\n const stage = row\n ? this.#renderContext.CreateShader(row.stageType, row.bytecode, row.signature ?? null, \"\")\n : null;\n\n if (!stage) { stages.length = 0; break; }\n\n stages.push(stage);\n }\n\n const program = stages.length > 0 ? this.#renderContext.CreateShaderProgram(stages) : null;\n\n realized.set(handle, program);\n shaderProgramObjects.set(this.#renderContext, realized);\n\n return program;\n }\n\n /**\n * Whether this vertex declaration needs binding.\n *\n * @param {number} handle Vertex-declaration handle.\n * @returns {boolean}\n */\n ApplyVertexDeclaration(handle)\n {\n if (this.#isManagedRendering && handle === this.#currentValues.vertexDeclaration) return false;\n\n this.#currentValues.vertexDeclaration = handle;\n\n // IT BINDS. This recorded the handle and reached no backend until\n // 2026-09-09, so a draw ran with whatever layout the abstraction layer\n // last held. Carbon `cpp:879-910`: NULL_DECLARATION unbinds with a default\n // layout, otherwise the interned layout is created ON FIRST USE and set.\n //\n // Carbon can hold a `Tr2VertexLayoutAL` in its own table because it\n // compiles one backend. We ship every backend at once, so the layout is\n // created by the context - the same reason `CreateBuffer` lives there -\n // and cached per handle so a second apply reuses it, as `hvl.IsValid()`\n // does for Carbon.\n // A manager with no context records and reaches nothing, exactly as\n // DoApplyRenderStates does. Carbon's manager always has one; ours is\n // constructed before it is bound.\n if (!this.#renderContext) return handle !== Tr2EffectStateManager.Unknown;\n\n // TWO SENTINELS, AND THEY ARE NOT THE SAME ONE. Carbon asserts against\n // UNINITIALIZED_DECLARATION and unbinds on NULL_DECLARATION\n // (`cpp:886-893`); they are `~0u` and `~0u - 1`. This tested `Unknown` -\n // the UNINITIALIZED one - which meant a batch carrying NullDeclaration fell\n // past the unbind, found no elements for 0xFFFFFFFE, and bound nothing at\n // all. And because the redundancy cache was already written above, the\n // filter suppressed every retry, so the previous layout stuck. The field's\n // own docstring says \"do not collapse the two\"; collapsing them is exactly\n // what this did between two commits on 2026-09-09.\n if (handle === Tr2EffectStateManager.NullDeclaration)\n {\n this.#renderContext.SetVertexLayout(null);\n\n return true;\n }\n\n // Carbon ASSERTS here rather than handling it: applying an uninitialized\n // declaration is a caller defect. We have no assert, and binding nothing\n // while reporting success is what hid the bug above, so it reports failure.\n if (handle === Tr2EffectStateManager.Unknown) return false;\n\n const elements = Tr2EffectStateManager.getVertexDeclarationElements(handle);\n\n // A HANDLE THAT WAS NEVER INTERNED NAMES NOTHING. Carbon cannot reach this:\n // every declaration handle it holds came out of `getVertexDeclarationHandle`\n // and indexes its own table. Ours can be handed a bare number, and creating\n // a layout from null would make an empty definition look like a real one -\n // which the stub layout then reports as valid, because Carbon stores the\n // definition before checking it.\n if (!elements) return false;\n\n const realized = vertexLayoutObjects.get(this.#renderContext) ?? new Map();\n\n let layout = realized.get(handle) ?? null;\n\n if (!layout)\n {\n layout = this.#renderContext.CreateVertexLayout(elements);\n\n realized.set(handle, layout);\n vertexLayoutObjects.set(this.#renderContext, realized);\n }\n\n this.#renderContext.SetVertexLayout(layout);\n\n return true;\n }\n\n /**\n * Binds one vertex stream unless it is already bound.\n *\n * THE FILTER ONLY RUNS INSIDE A MANAGED SPAN (cpp:930-948). Outside one\n * nothing tracks what the device holds, so every call must reach it; a\n * cached value recorded there would let the next span skip a bind it needs.\n *\n * Carbon's suballocated-buffer overload just unpacks the allocation and calls\n * this, so it is not a second method here.\n *\n * @param {number} stream The stream index.\n * @param {object} buffer A `Tr2BufferAL`.\n * @param {number} offset Byte offset into the buffer.\n * @param {number} stride Bytes per vertex.\n * @returns {boolean} False when the bind was filtered out as redundant.\n */\n ApplyStreamSource(stream, buffer, offset, stride)\n {\n const current = this.#currentValues.streams[stream];\n\n if (!current) throw new Error(`Tr2EffectStateManager: no vertex stream ${stream}.`);\n\n if (this.#isManagedRendering)\n {\n if (buffer === current.vertexBuffer && offset === current.offset && stride === current.stride)\n {\n return false;\n }\n\n current.vertexBuffer = buffer;\n current.offset = offset;\n current.stride = stride;\n }\n\n this.#renderContext.SetStreamSource(stream, buffer, offset, stride);\n\n return true;\n }\n\n /**\n * Binds the index buffer unless it is already bound.\n *\n * A ONE-BYTE INDEX STRIDE IS A BUG, and Carbon says so at the top of this\n * method - \"Oh no! This is a big bug!\" (cpp:963-966) - because no backend has\n * 8-bit indices and the value can only have come from an uninitialised\n * description. It warns and carries on there; here it fails, because a bind\n * that cannot be right should not reach a device.\n *\n * @param {object} indices A `Tr2BufferAL`.\n * @param {number} stride Bytes per index.\n * @returns {boolean} False when the bind was filtered out as redundant.\n */\n ApplyIndexBuffer(indices, stride)\n {\n if (stride === 1) throw new Error(\"Tr2EffectStateManager: a one-byte index stride is never right.\");\n\n if (this.#isManagedRendering)\n {\n if (indices === this.#currentValues.indexBuffer && stride === this.#currentValues.indexStride)\n {\n return false;\n }\n\n this.#currentValues.indexBuffer = indices;\n this.#currentValues.indexStride = stride;\n }\n\n this.#renderContext.SetIndices(indices, stride);\n\n return true;\n }\n\n /**\n * The current redundancy cache, for a caller that must reason about what is\n * bound. A copy, because it is this class's private state.\n *\n * @returns {object}\n */\n GetCurrentValues()\n {\n return { ...this.#currentValues, streams: this.#currentValues.streams.map(s => ({ ...s })) };\n }\n\n /**\n * How many render-state handles are registered, which is the range\n * `ApplyRenderStates` checks against.\n *\n * @returns {number}\n */\n static getRenderStateSetupCount()\n {\n return renderStateSetups.length;\n }\n}\n"],"names":["UNKNOWN","VERTEX_STREAM_MAX_COUNT","NewCurrentValues","streams","i","push","vertexBuffer","offset","stride","shaderProgram","vertexDeclaration","indexBuffer","indexStride","renderingMode","renderStateSetup","shaders","shaderPrograms","vertexLayouts","vertexLayoutObjects","WeakMap","shaderProgramObjects","vertexLayoutHandles","RS_CULLMODE","RS_FILLMODE","RS_ALPHABLENDENABLE","RS_ALPHATESTENABLE","RS_ALPHAFUNC","RS_ALPHAREF","RS_ZENABLE","RS_ZWRITEENABLE","RS_ZFUNC","RS_COLORWRITEENABLE","RS_DEPTHBIAS","RS_SLOPESCALEDEPTHBIAS","RS_SEPARATEALPHABLENDENABLE","RS_SRCBLEND","RS_DESTBLEND","RS_BLENDOP","RS_BLENDOPALPHA","RS_SRCBLENDALPHA","RS_DESTBLENDALPHA","RenderState","CULLMODE_CW","CULLMODE_NONE","CullMode","FM_SOLID","FillMode","CMP_LESSEQUAL","CMP_GREATER","CMP_ALWAYS","CMP_EQUAL","CompareFunc","BM_ONE","BM_SRCALPHA","BM_INVSRCALPHA","BlendMode","BO_ADD","BlendOperation","ALL_CHANNELS","RGB_CHANNELS","FALSE","TRUE","STANDARD_MODE_PAIRS","Object","freeze","map","pairs","renderStateSetups","keyValues","setup","Tr2RenderStateSetup","fromKeyValues","isSameBytecode","first","second","length","index","backendBlockKey","block","bytes","hash","Math","imul","toString","samplerSignatureKey","samplers","entries","register","Number","GetValues","sort","left","right","JSON","stringify","failState","message","error","Error","code","_Tr2EffectStateManage","_identity","Tr2EffectStateManager","CjsModel","e","_init_renderContext","_init_extra_renderContext","_init_perObjectConstantBuffers","_init_extra_perObjectConstantBuffers","_init_renderTargetWidth","_init_extra_renderTargetWidth","_init_renderTargetHeight","_init_extra_renderTargetHeight","_init_viewport","_init_extra_viewport","_init_viewportOnDevice","_init_extra_viewportOnDevice","_init_viewportStack","_init_extra_viewportStack","_init_viewportSizeVar","_init_extra_viewportSizeVar","c","_initClass","_applyDecs","type","define","className","family","rawStruct","int32","renderContext","perObjectConstantBuffers","invertedDepthTest","invertedCullMode","wireframe","renderTargetWidth","renderTargetHeight","viewport","viewportOnDevice","viewportStack","viewportSizeVar","registerShader","stageType","bytecode","signature","Unknown","samplerKey","backendBlock","handle","existing","registerShaderProgram","shaderHandles","handles","some","every","value","registerRenderStateSetup","pass","authored","Map","entry","renderStateValues","set","state","flat","fromPass","registerShaderHandles","shader","techniques","GetEffect","technique","passes","stageInputs","ordered","stageOrder","_","filter","exists","programMembers","stage","sourceProgram","renderStates","ProcessEffect","getVertexDeclarationHandle","elements","key","items","memoised","get","undefined","findIndex","candidate","Tr2VertexDefinition","isSameDefinition","getVertexDeclarationElements","getShaderRecord","getShaderProgramRecord","getRenderStateSetup","resolveRenderStates","standard","RenderingMode","RM_COUNT","releaseDeviceResources","SetRenderContext","ReleaseRealizedObjects","delete","SetRenderTarget","renderTarget","updateViewport","slice","bound","PushRenderTarget","slot","PopRenderTarget","popped","SetDepthStencilBuffer","depthStencil","SetDepthStencil","PushDepthStencilBuffer","PushDepthStencil","PopDepthStencilBuffer","PopDepthStencil","#RefreshRenderTargetViewport","size","GetRenderTargetSize","Failed","result","UpdateRenderTargetViewport","width","height","SetupViewport","GetViewport","GetDeviceViewport","SetViewport","x","y","minZ","maxZ","SetFullScreenViewport","x1","y1","max","clipped","min","PushViewport","Array","isArray","PopViewport","restored","pop","GetStackSizeViewport","BeginManagedRendering","cullMode","SetInvertedCullMode","CULLMODE_CCW","EndManagedRendering","IsManagedRendering","SetInvertedDepthTest","inverted","IsDepthTestInverted","IsCullModeInverted","SetWireframeRendering","enabled","IsWireframeRendering","GetRenderStateOverrides","ApplyStandardStates","carriesStates","RM_ANY","DoApplyRenderStates","ApplyRenderStates","getRenderStateSetupCount","SetRenderStates","#OverMode","mode","cached","merged","Overlay","ApplyShaderProgram","program","GetShaderProgram","SetShaderProgram","realized","stages","shaderHandle","row","CreateShader","CreateShaderProgram","ApplyVertexDeclaration","NullDeclaration","SetVertexLayout","layout","CreateVertexLayout","ApplyStreamSource","stream","buffer","current","SetStreamSource","ApplyIndexBuffer","indices","SetIndices","GetCurrentValues","s","constructor"],"mappings":";;;;;;;;;;;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,OAAO,GAAG,UAAU;;AAE1B;AACA,MAAMC,uBAAuB,GAAG,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,GACzB;EACE,MAAMC,OAAO,GAAG,EAAE;EAElB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,uBAAuB,EAAEG,CAAC,EAAE,EAChD;IACED,OAAO,CAACE,IAAI,CAAC;AAAEC,MAAAA,YAAY,EAAE,IAAI;AAAEC,MAAAA,MAAM,EAAEP,OAAO;AAAEQ,MAAAA,MAAM,EAAER;AAAQ,KAAC,CAAC;AACxE,EAAA;EAEA,OAAO;AACLS,IAAAA,aAAa,EAAET,OAAO;AACtBU,IAAAA,iBAAiB,EAAEV,OAAO;IAC1BG,OAAO;AACPQ,IAAAA,WAAW,EAAE,IAAI;AACjBC,IAAAA,WAAW,EAAE,CAAC;AACdC,IAAAA,aAAa,EAAEb,OAAO;AACtBc,IAAAA,gBAAgB,EAAEd;GACnB;AACH;;A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IAAI,CAAC,mBAAmB,EAC5B;AACE,QAAA,IAAIwM,OAAO,KAAK,IAAI,CAAC,cAAc,CAAC/R,WAAW,IAAIH,MAAM,KAAK,IAAI,CAAC,cAAc,CAACI,WAAW,EAC7F;AACE,UAAA,OAAO,KAAK;AACd,QAAA;AAEA,QAAA,IAAI,CAAC,cAAc,CAACD,WAAW,GAAG+R,OAAO;AACzC,QAAA,IAAI,CAAC,cAAc,CAAC9R,WAAW,GAAGJ,MAAM;AAC1C,MAAA;MAEA,IAAI,CAAC,cAAc,CAACmS,UAAU,CAACD,OAAO,EAAElS,MAAM,CAAC;AAE/C,MAAA,OAAO,IAAI;AACb,IAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACEoS,IAAAA,gBAAgBA,GAChB;MACE,OAAO;QAAE,GAAG,IAAI,CAAC,cAAc;QAAEzS,OAAO,EAAE,IAAI,CAAC,cAAc,CAACA,OAAO,CAAC8D,GAAG,CAAC4O,CAAC,KAAK;UAAE,GAAGA;AAAE,SAAC,CAAC;OAAG;AAC9F,IAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;IACE,OAAO/B,wBAAwBA,GAC/B;MACE,OAAO3M,iBAAiB,CAACQ,MAAM;AACjC,IAAA;GACD;AAzvCQ6H,EAAAA,aAAa,GAAGA,aAAa;AAU7BvD,EAAAA,OAAO,GAAGjJ,OAAO;AAQjBgS,EAAAA,eAAe,GAAG,UAAU;EAACc,WAAAA,GAAA;IAAA,KAAA,CAAA1M,qBAAA,GAAAsB,UAAA,EAAA;AAAA,EAAA;AAAA,CAAA,EAAA;;;;"}
|
|
@@ -6,13 +6,30 @@ import { ShaderType, CompareFunc } from '#consts/render-context';
|
|
|
6
6
|
import { hashFnv1Floats, FNV1_INITIAL } from '../../global/utils/hash.js';
|
|
7
7
|
import { Failed } from '../../trinityal/ALResult.js';
|
|
8
8
|
import '../../trinityal/Tr2BitmapDimensions.js';
|
|
9
|
-
import '../../trinityal/Tr2DrawUPHelper.js';
|
|
10
9
|
import '../../global/consts/renderContext/formats.js';
|
|
11
10
|
import '../../global/consts/renderContext/pipeline.js';
|
|
12
|
-
import '../../trinityal/
|
|
13
|
-
import
|
|
11
|
+
import '../../trinityal/Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js';
|
|
12
|
+
import '../../trinityal/Tr2DrawUPHelper.js';
|
|
13
|
+
import { SAMPLER_LOD_UNBOUNDED } from '../../trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js';
|
|
14
|
+
import '../../trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js';
|
|
15
|
+
import '../../trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js';
|
|
16
|
+
import '../../trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js';
|
|
17
|
+
import '../../trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js';
|
|
18
|
+
import '../../trinityal/stub/Tr2BufferALStub.js';
|
|
19
|
+
import '../../trinityal/stub/Tr2CapsALStub.js';
|
|
14
20
|
import { Tr2ConstantUsageAL } from '../../trinityal/stub/Tr2ConstantBufferALStub.js';
|
|
15
|
-
import '../../trinityal/stub/
|
|
21
|
+
import '../../trinityal/stub/Tr2FenceALStub.js';
|
|
22
|
+
import '../../trinityal/stub/Tr2OcclusionQueryALStub.js';
|
|
23
|
+
import '../../trinityal/stub/Tr2GpuTimerALStub.js';
|
|
24
|
+
import '../../trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js';
|
|
25
|
+
import '../../trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js';
|
|
26
|
+
import '../../trinityal/stub/Tr2SamplerStateALStub.js';
|
|
27
|
+
import '../../trinityal/stub/Tr2ShaderALStub.js';
|
|
28
|
+
import '../../trinityal/stub/Tr2ShaderProgramALStub.js';
|
|
29
|
+
import '../../trinityal/stub/Tr2SwapChainALStub.js';
|
|
30
|
+
import '../../trinityal/stub/Tr2TextureALStub.js';
|
|
31
|
+
import '../../trinityal/stub/Tr2VertexLayoutALStub.js';
|
|
32
|
+
import '../../trinityal/stub/Tr2VideoAdapterInfoStub.js';
|
|
16
33
|
import { Tr2EffectStateManager as _Tr2EffectStateManage } from './Tr2EffectStateManager.js';
|
|
17
34
|
import { EFFECT_CONSTANTS } from '../core/Tr2Renderer.js';
|
|
18
35
|
|