@carbonenginejs/runtime-resource 0.10.0 → 0.11.1
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/dist/format/effect/effectPermutationGraph.js +257 -0
- package/dist/format/effect/effectPermutationGraph.js.map +1 -0
- package/dist/format/effect/effectReflectionPackage.js +636 -0
- package/dist/format/effect/effectReflectionPackage.js.map +1 -0
- package/dist/format/effect/sha256.js +114 -0
- package/dist/format/effect/sha256.js.map +1 -0
- package/dist/formats/dxbc/CjsDxbcFormat.js +142 -0
- package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -0
- package/dist/formats/dxbc/core/DxbcReader.js +266 -0
- package/dist/formats/dxbc/core/DxbcReader.js.map +1 -0
- package/dist/formats/dxbc/core/container.js +169 -0
- package/dist/formats/dxbc/core/container.js.map +1 -0
- package/dist/formats/dxbc/core/decoder.js +789 -0
- package/dist/formats/dxbc/core/decoder.js.map +1 -0
- package/dist/formats/dxbc/core/errors.js +19 -0
- package/dist/formats/dxbc/core/errors.js.map +1 -0
- package/dist/formats/dxbc/core/helpers.js +220 -0
- package/dist/formats/dxbc/core/helpers.js.map +1 -0
- package/dist/formats/dxbc/core/opcodes.js +45 -0
- package/dist/formats/dxbc/core/opcodes.js.map +1 -0
- package/dist/formats/dxbc/core/program.js +91 -0
- package/dist/formats/dxbc/core/program.js.map +1 -0
- package/dist/formats/dxbc/core/signature.js +172 -0
- package/dist/formats/dxbc/core/signature.js.map +1 -0
- package/dist/formats/dxbc/index.js +2 -0
- package/dist/formats/dxbc/index.js.map +1 -0
- package/dist/formats/hlsl/CjsHlslFormat.js +254 -0
- package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -0
- package/dist/formats/hlsl/core/HlslBinaryUtils.js +15 -0
- package/dist/formats/hlsl/core/HlslBinaryUtils.js.map +1 -0
- package/dist/formats/hlsl/core/HlslEffectReadError.js +19 -0
- package/dist/formats/hlsl/core/HlslEffectReadError.js.map +1 -0
- package/dist/formats/hlsl/core/HlslEffectStateManager.js +130 -0
- package/dist/formats/hlsl/core/HlslEffectStateManager.js.map +1 -0
- package/dist/formats/hlsl/core/HlslReader.js +266 -0
- package/dist/formats/hlsl/core/HlslReader.js.map +1 -0
- package/dist/formats/hlsl/core/HlslRenderStateSetup.js +37 -0
- package/dist/formats/hlsl/core/HlslRenderStateSetup.js.map +1 -0
- package/dist/formats/hlsl/core/HlslResourceSetDescription.js +94 -0
- package/dist/formats/hlsl/core/HlslResourceSetDescription.js.map +1 -0
- package/dist/formats/hlsl/core/HlslShaderBytecode.js +44 -0
- package/dist/formats/hlsl/core/HlslShaderBytecode.js.map +1 -0
- package/dist/formats/hlsl/core/analysis.js +51 -0
- package/dist/formats/hlsl/core/analysis.js.map +1 -0
- package/dist/formats/hlsl/core/helpers.js +270 -0
- package/dist/formats/hlsl/core/helpers.js.map +1 -0
- package/dist/formats/hlsl/core/json.js +284 -0
- package/dist/formats/hlsl/core/json.js.map +1 -0
- package/dist/formats/hlsl/core/metadata.js +327 -0
- package/dist/formats/hlsl/core/metadata.js.map +1 -0
- package/dist/formats/hlsl/core/portableReflection.js +848 -0
- package/dist/formats/hlsl/core/portableReflection.js.map +1 -0
- package/dist/formats/hlsl/core/render-states.js +280 -0
- package/dist/formats/hlsl/core/render-states.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js +43 -0
- package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +294 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js +33 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js +416 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js +40 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js +742 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js +52 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js +38 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js +50 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +86 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js +31 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslPass.js +42 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslPass.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js +55 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js +29 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShader.js +220 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShader.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js +30 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js.map +1 -0
- package/dist/formats/hlsl/index.js +2 -0
- package/dist/formats/hlsl/index.js.map +1 -0
- package/dist/formats/hlsl/portable.js +2 -0
- package/dist/formats/hlsl/portable.js.map +1 -0
- package/dist/formats/index.js +4 -0
- package/dist/formats/index.js.map +1 -1
- package/dist/formats/webgl/CjsWebglFormat.js +221 -0
- package/dist/formats/webgl/CjsWebglFormat.js.map +1 -0
- package/dist/formats/webgl/core/cewg/CewgPackage.js +339 -0
- package/dist/formats/webgl/core/cewg/CewgPackage.js.map +1 -0
- package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js +104 -0
- package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js.map +1 -0
- package/dist/formats/webgl/core/cewg/binary.js +101 -0
- package/dist/formats/webgl/core/cewg/binary.js.map +1 -0
- package/dist/formats/webgl/core/cewgCompleteness.js +81 -0
- package/dist/formats/webgl/core/cewgCompleteness.js.map +1 -0
- package/dist/formats/webgl/core/effectPackage.js +789 -0
- package/dist/formats/webgl/core/effectPackage.js.map +1 -0
- package/dist/formats/webgl/core/effectPackageValidation.js +331 -0
- package/dist/formats/webgl/core/effectPackageValidation.js.map +1 -0
- package/dist/formats/webgl/core/errors.js +27 -0
- package/dist/formats/webgl/core/errors.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +2678 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js +89 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +428 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -0
- package/dist/formats/webgl/core/helpers.js +306 -0
- package/dist/formats/webgl/core/helpers.js.map +1 -0
- package/dist/formats/webgl/index.js +2 -0
- package/dist/formats/webgl/index.js.map +1 -0
- package/dist/formats/webgpu/CjsWebgpuFormat.js +376 -0
- package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js +415 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js +100 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/binary.js +93 -0
- package/dist/formats/webgpu/core/cewgpu/binary.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/tags.js +17 -0
- package/dist/formats/webgpu/core/cewgpu/tags.js.map +1 -0
- package/dist/formats/webgpu/core/effectAnalysis.js +82 -0
- package/dist/formats/webgpu/core/effectAnalysis.js.map +1 -0
- package/dist/formats/webgpu/core/effectBackendBodySet.js +305 -0
- package/dist/formats/webgpu/core/effectBackendBodySet.js.map +1 -0
- package/dist/formats/webgpu/core/effectPackageValidation.js +1078 -0
- package/dist/formats/webgpu/core/effectPackageValidation.js.map +1 -0
- package/dist/formats/webgpu/core/errors.js +20 -0
- package/dist/formats/webgpu/core/errors.js.map +1 -0
- package/dist/formats/webgpu/core/helpers.js +448 -0
- package/dist/formats/webgpu/core/helpers.js.map +1 -0
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +223 -0
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js.map +1 -0
- package/dist/formats/webgpu/core/ir/buildControlFlow.js +220 -0
- package/dist/formats/webgpu/core/ir/buildControlFlow.js.map +1 -0
- package/dist/formats/webgpu/core/ir/indexableTemps.js +137 -0
- package/dist/formats/webgpu/core/ir/indexableTemps.js.map +1 -0
- package/dist/formats/webgpu/core/ir/inferValueTypes.js +454 -0
- package/dist/formats/webgpu/core/ir/inferValueTypes.js.map +1 -0
- package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js +494 -0
- package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -0
- package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js +177 -0
- package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js.map +1 -0
- package/dist/formats/webgpu/core/ir/sourceLanes.js +61 -0
- package/dist/formats/webgpu/core/ir/sourceLanes.js.map +1 -0
- package/dist/formats/webgpu/core/packageEffect.js +300 -0
- package/dist/formats/webgpu/core/packageEffect.js.map +1 -0
- package/dist/formats/webgpu/core/packageEffectSelection.js +164 -0
- package/dist/formats/webgpu/core/packageEffectSelection.js.map +1 -0
- package/dist/formats/webgpu/core/packageMetadata.js +8 -0
- package/dist/formats/webgpu/core/packageMetadata.js.map +1 -0
- package/dist/formats/webgpu/core/schema.js +4 -0
- package/dist/formats/webgpu/core/schema.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +275 -0
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +182 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +324 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/emitWgsl.js +356 -0
- package/dist/formats/webgpu/core/wgsl/emitWgsl.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js +77 -0
- package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js +451 -0
- package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +754 -0
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +457 -0
- package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js +1572 -0
- package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js +659 -0
- package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js +734 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js +583 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js +621 -0
- package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js +824 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js +697 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js +559 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js +1328 -0
- package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js +110 -0
- package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/precisionControls.js +55 -0
- package/dist/formats/webgpu/core/wgsl/precisionControls.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js +758 -0
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/uniformity.js +78 -0
- package/dist/formats/webgpu/core/wgsl/uniformity.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js +196 -0
- package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js +37 -0
- package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js.map +1 -0
- package/dist/formats/webgpu/index.js +2 -0
- package/dist/formats/webgpu/index.js.map +1 -0
- package/dist/resource/shader/Tr2EffectRes.js +159 -150
- package/dist/resource/shader/Tr2EffectRes.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialArea.js +23 -28
- package/dist/resource/shader/Tr2MaterialArea.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialMesh.js +21 -27
- package/dist/resource/shader/Tr2MaterialMesh.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialRes.js +24 -29
- package/dist/resource/shader/Tr2MaterialRes.js.map +1 -1
- package/dist/resource/shader/Tr2Shader.js +45 -39
- package/dist/resource/shader/Tr2Shader.js.map +1 -1
- package/dist/resource/shader/Tr2ShaderPermutation.js +30 -32
- package/dist/resource/shader/Tr2ShaderPermutation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +113 -78
- package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDefine.js +17 -23
- package/dist/resource/shader/reflection/Tr2EffectDefine.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +23 -29
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +44 -40
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +82 -86
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +55 -61
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +49 -45
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +25 -30
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +30 -32
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +21 -26
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
- package/docs/formats/README.md +4 -0
- package/docs/formats/provenance.md +11 -3
- package/docs/reference/classes/formats.md +440 -0
- package/format-notices/dxbc/LICENSE +21 -0
- package/format-notices/dxbc/NOTICE +20 -0
- package/format-notices/hlsl/LICENSE +21 -0
- package/format-notices/hlsl/NOTICE +25 -0
- package/format-notices/webgl/LICENSE +21 -0
- package/format-notices/webgl/NOTICE +35 -0
- package/format-notices/webgpu/LICENSE +21 -0
- package/format-notices/webgpu/NOTICE +31 -0
- package/package.json +6 -1
- package/dist/resource/shader/portableValidation.js +0 -461
- package/dist/resource/shader/portableValidation.js.map +0 -1
|
@@ -1,39 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type, impl } from '@carbonenginejs/runtime-utils/schema';
|
|
1
|
+
import { CjsSchema, type, impl } from '@carbonenginejs/runtime-utils/schema';
|
|
3
2
|
import { CjsModel } from '@carbonenginejs/runtime-utils/model';
|
|
4
3
|
import { isPlainObject } from '@carbonenginejs/runtime-utils/is';
|
|
5
4
|
import { cloneCarbonValue } from '@carbonenginejs/runtime-utils/types';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
// Source: trinity/trinity/Shader/Tr2EffectDescription.h
|
|
8
7
|
|
|
9
8
|
/** Reflected sampler name and complete device-free sampler descriptor. */
|
|
10
|
-
let _Tr2SamplerSetup;
|
|
11
9
|
class Tr2SamplerSetup extends CjsModel {
|
|
12
|
-
static {
|
|
13
|
-
({
|
|
14
|
-
e: [_init_name, _init_extra_name, _init_hasName, _init_extra_hasName, _init_sampler, _init_extra_sampler, _init_isDynamic, _init_extra_isDynamic, _initStatic],
|
|
15
|
-
c: [_Tr2SamplerSetup, _initClass]
|
|
16
|
-
} = _applyDecs2311(this, [type.define({
|
|
17
|
-
className: "Tr2SamplerSetup",
|
|
18
|
-
family: "shader"
|
|
19
|
-
})], [[[type, type.string], 16, "name"], [[impl, impl.adapted, void 0, impl.reason("The schema string field cannot distinguish an authored null sampler name from an empty name; portable reflection must retain that distinction for static sampler records."), type, type.boolean], 16, "hasName"], [type.rawStruct("Tr2SamplerStateAL"), 0, "sampler"], [[impl, impl.adapted, void 0, impl.reason("The portable effect contract distinguishes dynamic and static sampler declarations before an engine creates sampler state."), type, type.boolean], 16, "isDynamic"], [[impl, impl.custom, void 0, impl.reason("Carbon reads compiled effect bytes directly; CarbonEngineJS hydrates the browser-safe portable-reflection contract after format parsing.")], 26, "fromPortable"]], 0, void 0, CjsModel));
|
|
20
|
-
_initStatic(this);
|
|
21
|
-
}
|
|
22
|
-
constructor(...args) {
|
|
23
|
-
super(...args);
|
|
24
|
-
_init_extra_isDynamic(this);
|
|
25
|
-
}
|
|
26
10
|
/** name (const char*) */
|
|
27
|
-
name =
|
|
11
|
+
name = "";
|
|
28
12
|
|
|
29
13
|
/** Whether the source sampler carried a name rather than authored null. */
|
|
30
|
-
hasName =
|
|
14
|
+
hasName = false;
|
|
31
15
|
|
|
32
16
|
/** sampler (Tr2SamplerStateAL) */
|
|
33
|
-
sampler =
|
|
17
|
+
sampler = null;
|
|
34
18
|
|
|
35
19
|
/** Whether the sampler occupies a dynamic register rather than static signature state. */
|
|
36
|
-
isDynamic =
|
|
20
|
+
isDynamic = false;
|
|
37
21
|
|
|
38
22
|
/**
|
|
39
23
|
* Construct a canonical sampler record from JS/JSON model values.
|
|
@@ -71,10 +55,21 @@ class Tr2SamplerSetup extends CjsModel {
|
|
|
71
55
|
sampler.isDynamic = !!value.isDynamic;
|
|
72
56
|
return sampler;
|
|
73
57
|
}
|
|
74
|
-
static {
|
|
75
|
-
_initClass();
|
|
76
|
-
}
|
|
77
58
|
}
|
|
78
59
|
|
|
79
|
-
|
|
60
|
+
// Declared imperatively rather than with decorators, so this module stays
|
|
61
|
+
// plain ESM that loads from source without a transform. The decorator
|
|
62
|
+
// expressions are reused verbatim, so the registered metadata is identical.
|
|
63
|
+
// Statics belong in `methods`: decorateMethod targets the prototype and
|
|
64
|
+
// would register a static as an instance field.
|
|
65
|
+
CjsSchema.define(Tr2SamplerSetup, {
|
|
66
|
+
className: "Tr2SamplerSetup",
|
|
67
|
+
family: "shader"
|
|
68
|
+
});
|
|
69
|
+
CjsSchema.decorateField(Tr2SamplerSetup, "name", type.string);
|
|
70
|
+
CjsSchema.decorateField(Tr2SamplerSetup, "hasName", impl.adapted, impl.reason("The schema string field cannot distinguish an authored null sampler name from an empty name; portable reflection must retain that distinction for static sampler records."), type.boolean);
|
|
71
|
+
CjsSchema.decorateField(Tr2SamplerSetup, "sampler", type.rawStruct("Tr2SamplerStateAL"));
|
|
72
|
+
CjsSchema.decorateField(Tr2SamplerSetup, "isDynamic", impl.adapted, impl.reason("The portable effect contract distinguishes dynamic and static sampler declarations before an engine creates sampler state."), type.boolean);
|
|
73
|
+
|
|
74
|
+
export { Tr2SamplerSetup };
|
|
80
75
|
//# sourceMappingURL=Tr2SamplerSetup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2SamplerSetup.js","sources":["../../../../../src/resource/shader/sampler/Tr2SamplerSetup.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport { isPlainObject } from \"@carbonenginejs/runtime-utils/is\";\nimport { cloneCarbonValue } from \"@carbonenginejs/runtime-utils/types\";\n\n/** Reflected sampler name and complete device-free sampler descriptor. */\
|
|
1
|
+
{"version":3,"file":"Tr2SamplerSetup.js","sources":["../../../../../src/resource/shader/sampler/Tr2SamplerSetup.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport { isPlainObject } from \"@carbonenginejs/runtime-utils/is\";\nimport { cloneCarbonValue } from \"@carbonenginejs/runtime-utils/types\";\n\n/** Reflected sampler name and complete device-free sampler descriptor. */\nexport class Tr2SamplerSetup extends CjsModel\n{\n\n /** name (const char*) */\n name = \"\";\n\n /** Whether the source sampler carried a name rather than authored null. */\n hasName = false;\n\n /** sampler (Tr2SamplerStateAL) */\n sampler = null;\n\n /** Whether the sampler occupies a dynamic register rather than static signature state. */\n isDynamic = false;\n\n /**\n * Construct a canonical sampler record from JS/JSON model values.\n *\n * @param {object} values Canonical model values.\n * @param {object} options CjsModel import options.\n * @returns {Tr2SamplerSetup} Hydrated sampler.\n */\n static from(values = {}, options = {})\n {\n let normalized = values;\n if (values && Object.hasOwn(values, \"name\")\n && !Object.hasOwn(values, \"hasName\"))\n {\n normalized = {\n ...values,\n hasName: values.name !== null,\n name: values.name === null ? \"\" : values.name\n };\n }\n return super.from(normalized, options);\n }\n\n /**\n * Build one sampler from its portable JSON reflection record.\n *\n * @param {object} value Portable sampler record.\n * @returns {Tr2SamplerSetup} Reflected sampler.\n */\n static fromPortable(value)\n {\n if (!isPlainObject(value))\n {\n throw new TypeError(\"Portable effect sampler must be an object\");\n }\n const sampler = new this();\n sampler.hasName = value.name !== null;\n sampler.name = sampler.hasName ? String(value.name ?? \"\") : \"\";\n sampler.sampler = cloneCarbonValue(value.descriptor);\n sampler.isDynamic = !!value.isDynamic;\n return sampler;\n }\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays\n// plain ESM that loads from source without a transform. The decorator\n// expressions are reused verbatim, so the registered metadata is identical.\n// Statics belong in `methods`: decorateMethod targets the prototype and\n// would register a static as an instance field.\nCjsSchema.define(Tr2SamplerSetup, {\n className: \"Tr2SamplerSetup\",\n family: \"shader\"\n});\nCjsSchema.decorateField(Tr2SamplerSetup, \"name\", type.string);\nCjsSchema.decorateField(Tr2SamplerSetup, \"hasName\", impl.adapted, impl.reason(\"The schema string field cannot distinguish an authored null sampler name from an empty name; portable reflection must retain that distinction for static sampler records.\"), type.boolean);\nCjsSchema.decorateField(Tr2SamplerSetup, \"sampler\", type.rawStruct(\"Tr2SamplerStateAL\"));\nCjsSchema.decorateField(Tr2SamplerSetup, \"isDynamic\", impl.adapted, impl.reason(\"The portable effect contract distinguishes dynamic and static sampler declarations before an engine creates sampler state.\"), type.boolean);\n"],"names":["Tr2SamplerSetup","CjsModel","name","hasName","sampler","isDynamic","from","values","options","normalized","Object","hasOwn","fromPortable","value","isPlainObject","TypeError","String","cloneCarbonValue","descriptor","CjsSchema","define","className","family","decorateField","type","string","impl","adapted","reason","boolean","rawStruct"],"mappings":";;;;;AAAA;;AAMA;AACO,MAAMA,eAAe,SAASC,QAAQ,CAC7C;AAEE;AACAC,EAAAA,IAAI,GAAG,EAAE;;AAET;AACAC,EAAAA,OAAO,GAAG,KAAK;;AAEf;AACAC,EAAAA,OAAO,GAAG,IAAI;;AAEd;AACAC,EAAAA,SAAS,GAAG,KAAK;;AAEjB;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,IAAIA,CAACC,MAAM,GAAG,EAAE,EAAEC,OAAO,GAAG,EAAE,EACrC;IACE,IAAIC,UAAU,GAAGF,MAAM;IACvB,IAAIA,MAAM,IAAIG,MAAM,CAACC,MAAM,CAACJ,MAAM,EAAE,MAAM,CAAC,IACtC,CAACG,MAAM,CAACC,MAAM,CAACJ,MAAM,EAAE,SAAS,CAAC,EACtC;AACEE,MAAAA,UAAU,GAAG;AACX,QAAA,GAAGF,MAAM;AACTJ,QAAAA,OAAO,EAAEI,MAAM,CAACL,IAAI,KAAK,IAAI;QAC7BA,IAAI,EAAEK,MAAM,CAACL,IAAI,KAAK,IAAI,GAAG,EAAE,GAAGK,MAAM,CAACL;OAC1C;AACH,IAAA;AACA,IAAA,OAAO,KAAK,CAACI,IAAI,CAACG,UAAU,EAAED,OAAO,CAAC;AACxC,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOI,YAAYA,CAACC,KAAK,EACzB;AACE,IAAA,IAAI,CAACC,aAAa,CAACD,KAAK,CAAC,EACzB;AACE,MAAA,MAAM,IAAIE,SAAS,CAAC,2CAA2C,CAAC;AAClE,IAAA;AACA,IAAA,MAAMX,OAAO,GAAG,IAAI,IAAI,EAAE;AAC1BA,IAAAA,OAAO,CAACD,OAAO,GAAGU,KAAK,CAACX,IAAI,KAAK,IAAI;AACrCE,IAAAA,OAAO,CAACF,IAAI,GAAGE,OAAO,CAACD,OAAO,GAAGa,MAAM,CAACH,KAAK,CAACX,IAAI,IAAI,EAAE,CAAC,GAAG,EAAE;IAC9DE,OAAO,CAACA,OAAO,GAAGa,gBAAgB,CAACJ,KAAK,CAACK,UAAU,CAAC;AACpDd,IAAAA,OAAO,CAACC,SAAS,GAAG,CAAC,CAACQ,KAAK,CAACR,SAAS;AACrC,IAAA,OAAOD,OAAO;AAChB,EAAA;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACAe,SAAS,CAACC,MAAM,CAACpB,eAAe,EAAE;AAChCqB,EAAAA,SAAS,EAAE,iBAAiB;AAC5BC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAC;AACFH,SAAS,CAACI,aAAa,CAACvB,eAAe,EAAE,MAAM,EAAEwB,IAAI,CAACC,MAAM,CAAC;AAC7DN,SAAS,CAACI,aAAa,CAACvB,eAAe,EAAE,SAAS,EAAE0B,IAAI,CAACC,OAAO,EAAED,IAAI,CAACE,MAAM,CAAC,2KAA2K,CAAC,EAAEJ,IAAI,CAACK,OAAO,CAAC;AACzQV,SAAS,CAACI,aAAa,CAACvB,eAAe,EAAE,SAAS,EAAEwB,IAAI,CAACM,SAAS,CAAC,mBAAmB,CAAC,CAAC;AACxFX,SAAS,CAACI,aAAa,CAACvB,eAAe,EAAE,WAAW,EAAE0B,IAAI,CAACC,OAAO,EAAED,IAAI,CAACE,MAAM,CAAC,4HAA4H,CAAC,EAAEJ,IAAI,CAACK,OAAO,CAAC;;;;"}
|
package/docs/formats/README.md
CHANGED
|
@@ -41,6 +41,10 @@ metadata. Worker eligibility never changes the format's direct API; see
|
|
|
41
41
|
| Wwise soundbank (`.bnk`) | `CjsBnkFormat` | `@carbonenginejs/runtime-resource/formats/bnk` |
|
|
42
42
|
| CMF (`.cmf`) | `CjsCmfFormat` | `@carbonenginejs/runtime-resource/formats/cmf` |
|
|
43
43
|
| DDS (`.dds`) | `CjsDdsFormat` | `@carbonenginejs/runtime-resource/formats/dds` |
|
|
44
|
+
| DXBC (shader bytecode) | `CjsDxbcFormat` | `@carbonenginejs/runtime-resource/formats/dxbc` |
|
|
45
|
+
| Compiled effect (`.sm_hi`, `.sm_lo`, `.sm_depth`) | `CjsHlslFormat` | `@carbonenginejs/runtime-resource/formats/hlsl` |
|
|
46
|
+
| CEWG WebGL effect package | `CjsWebglFormat` | `@carbonenginejs/runtime-resource/formats/webgl` |
|
|
47
|
+
| CEWGPU WebGPU effect package | `CjsWebgpuFormat` | `@carbonenginejs/runtime-resource/formats/webgpu` |
|
|
44
48
|
| FBX (`.fbx`) | `CjsFbxFormat` | `@carbonenginejs/runtime-resource/formats/fbx` |
|
|
45
49
|
| FLAC (`.flac`) | `CjsFlacFormat` | `@carbonenginejs/runtime-resource/formats/flac` |
|
|
46
50
|
| GIF (`.gif`) | `CjsGifFormat` | `@carbonenginejs/runtime-resource/formats/gif` |
|
|
@@ -18,6 +18,10 @@ under `format-notices/<format>/`.
|
|
|
18
18
|
| `format-black` | `9fcaaff9e5f28c90b628d8a10b7c79aff7913a90` | `CjsBlackFormat` | `@carbonenginejs/runtime-resource/formats/black` |
|
|
19
19
|
| `format-cmf` | unborn working-tree snapshot | `CjsCmfFormat` | `@carbonenginejs/runtime-resource/formats/cmf` |
|
|
20
20
|
| `format-dds` | `66fa149cd826e1114ad0be84479f89dee753ed76` | `CjsDdsFormat` | `@carbonenginejs/runtime-resource/formats/dds` |
|
|
21
|
+
| `format-dxbc` | `3790bda40d7d0d3b774eeb4d82a13827dbe332df` | `CjsDxbcFormat` | `@carbonenginejs/runtime-resource/formats/dxbc` |
|
|
22
|
+
| `format-hlsl` | `e494203f3a1e10866fbe148b460297045cd959ed` | `CjsHlslFormat` | `@carbonenginejs/runtime-resource/formats/hlsl` |
|
|
23
|
+
| `format-webgl` | `428bc141d090b7416745ea43bf3fc320b9e99b43` | `CjsWebglFormat` | `@carbonenginejs/runtime-resource/formats/webgl` |
|
|
24
|
+
| `format-webgpu` | `ffabae8c6a6c658f30807582300aa97522964ee7` | `CjsWebgpuFormat` | `@carbonenginejs/runtime-resource/formats/webgpu` |
|
|
21
25
|
| `format-fbx` | `8d0fcc2fe44c8096b35e360a903bff30b49eb592` | `CjsFbxFormat` | `@carbonenginejs/runtime-resource/formats/fbx` |
|
|
22
26
|
| `format-flac` | unborn working-tree snapshot | `CjsFlacFormat` | `@carbonenginejs/runtime-resource/formats/flac` |
|
|
23
27
|
| `format-gif` | `5d831c5c0533a9579682f776274574289a520899` | `CjsGifFormat` | `@carbonenginejs/runtime-resource/formats/gif` |
|
|
@@ -156,9 +160,13 @@ snapshot must record its new source and digest here.
|
|
|
156
160
|
- `format-carbon` remains the schema emitter/generator and build-time schema
|
|
157
161
|
authority. Black consumes its published definitions; Red exposes the copied
|
|
158
162
|
catalog but does not yet enforce it while reading YAML fields.
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
- The shader formats were excluded from the original migration while their
|
|
164
|
+
implementations were still being finished. That sequencing guard was lifted
|
|
165
|
+
on 2026-07-29 and they moved in as ordinary formats. All four landed:
|
|
166
|
+
`formats/dxbc`, `formats/hlsl`, `formats/webgl`, and `formats/webgpu`. Their
|
|
167
|
+
standalone repositories remain in place, unmodified by the move. Their
|
|
168
|
+
local-only test fixtures are game-derived and were deliberately not copied;
|
|
169
|
+
the suites that need them skip with an explicit reason.
|
|
162
170
|
|
|
163
171
|
## Typed-array ownership adjustments
|
|
164
172
|
|
|
@@ -133,6 +133,78 @@ LSB-first bit reader over a single 128-bit BC7 block bitstream for the software
|
|
|
133
133
|
- Visibility: Internal
|
|
134
134
|
- Kind: Internal implementation class
|
|
135
135
|
|
|
136
|
+
### dxbc
|
|
137
|
+
|
|
138
|
+
<!-- class:CjsDxbcFormat -->
|
|
139
|
+
## `CjsDxbcFormat`
|
|
140
|
+
|
|
141
|
+
DXBC shader-bytecode format profile that reads container chunks, signatures, and the decoded shader program from compiled Direct3D bytecode.
|
|
142
|
+
|
|
143
|
+
- Export: `@carbonenginejs/runtime-resource/formats/dxbc`
|
|
144
|
+
- Source: `src/formats/dxbc/CjsDxbcFormat.js`
|
|
145
|
+
- Visibility: Public
|
|
146
|
+
- Kind: Original CarbonEngineJS class
|
|
147
|
+
|
|
148
|
+
<!-- class:DxbcReader -->
|
|
149
|
+
## `DxbcReader`
|
|
150
|
+
|
|
151
|
+
Bounded little-endian byte cursor over DXBC payloads, with optional shared string-table resolution.
|
|
152
|
+
|
|
153
|
+
- Export: `None`
|
|
154
|
+
- Source: `src/formats/dxbc/core/DxbcReader.js`
|
|
155
|
+
- Visibility: Internal
|
|
156
|
+
- Kind: Internal implementation class
|
|
157
|
+
|
|
158
|
+
<!-- class:DxbcContainer -->
|
|
159
|
+
## `DxbcContainer`
|
|
160
|
+
|
|
161
|
+
Parsed DXBC container that locates and exposes its four-character-code chunks.
|
|
162
|
+
|
|
163
|
+
- Export: `None`
|
|
164
|
+
- Source: `src/formats/dxbc/core/container.js`
|
|
165
|
+
- Visibility: Internal
|
|
166
|
+
- Kind: Internal implementation class
|
|
167
|
+
|
|
168
|
+
<!-- class:DxbcInstructionDecoder -->
|
|
169
|
+
## `DxbcInstructionDecoder`
|
|
170
|
+
|
|
171
|
+
Decodes the DXBC shader token stream into structured instructions, operands, and declarations.
|
|
172
|
+
|
|
173
|
+
- Export: `None`
|
|
174
|
+
- Source: `src/formats/dxbc/core/decoder.js`
|
|
175
|
+
- Visibility: Internal
|
|
176
|
+
- Kind: Internal implementation class
|
|
177
|
+
|
|
178
|
+
<!-- class:DxbcReadError -->
|
|
179
|
+
## `DxbcReadError`
|
|
180
|
+
|
|
181
|
+
Error raised when DXBC bytes are malformed, truncated, or structurally invalid.
|
|
182
|
+
|
|
183
|
+
- Export: `None`
|
|
184
|
+
- Source: `src/formats/dxbc/core/errors.js`
|
|
185
|
+
- Visibility: Internal
|
|
186
|
+
- Kind: Internal implementation class
|
|
187
|
+
|
|
188
|
+
<!-- class:DxbcShaderProgram -->
|
|
189
|
+
## `DxbcShaderProgram`
|
|
190
|
+
|
|
191
|
+
Decoded DXBC shader program: version, stage type, and its ordered instruction stream.
|
|
192
|
+
|
|
193
|
+
- Export: `None`
|
|
194
|
+
- Source: `src/formats/dxbc/core/program.js`
|
|
195
|
+
- Visibility: Internal
|
|
196
|
+
- Kind: Internal implementation class
|
|
197
|
+
|
|
198
|
+
<!-- class:DxbcSignatureChunk -->
|
|
199
|
+
## `DxbcSignatureChunk`
|
|
200
|
+
|
|
201
|
+
Parsed DXBC input, output, or patch-constant signature chunk and its parameter records.
|
|
202
|
+
|
|
203
|
+
- Export: `None`
|
|
204
|
+
- Source: `src/formats/dxbc/core/signature.js`
|
|
205
|
+
- Visibility: Internal
|
|
206
|
+
- Kind: Internal implementation class
|
|
207
|
+
|
|
136
208
|
### fbx
|
|
137
209
|
|
|
138
210
|
<!-- class:CjsFbxFormat -->
|
|
@@ -263,6 +335,228 @@ Adaptive weighted symbol window that Oodle1 dictionaries use to model symbol pro
|
|
|
263
335
|
- Visibility: Internal
|
|
264
336
|
- Kind: Internal implementation class
|
|
265
337
|
|
|
338
|
+
### hlsl
|
|
339
|
+
|
|
340
|
+
<!-- class:CjsHlslFormat -->
|
|
341
|
+
## `CjsHlslFormat`
|
|
342
|
+
|
|
343
|
+
Compiled Carbon effect format profile that reads .sm_* shader packages into permutation, technique, and stage metadata.
|
|
344
|
+
|
|
345
|
+
- Export: `@carbonenginejs/runtime-resource/formats/hlsl`
|
|
346
|
+
- Source: `src/formats/hlsl/CjsHlslFormat.js`
|
|
347
|
+
- Visibility: Public
|
|
348
|
+
- Kind: Original CarbonEngineJS class
|
|
349
|
+
|
|
350
|
+
<!-- class:HlslReader -->
|
|
351
|
+
## `HlslReader`
|
|
352
|
+
|
|
353
|
+
Bounded little-endian byte cursor over compiled effect payloads, with shared string-table resolution.
|
|
354
|
+
|
|
355
|
+
- Export: `None`
|
|
356
|
+
- Source: `src/formats/hlsl/core/HlslReader.js`
|
|
357
|
+
- Visibility: Internal
|
|
358
|
+
- Kind: Internal implementation class
|
|
359
|
+
|
|
360
|
+
<!-- class:HlslEffectReadError -->
|
|
361
|
+
## `HlslEffectReadError`
|
|
362
|
+
|
|
363
|
+
Error raised when compiled effect bytes are malformed, truncated, or an unsupported version.
|
|
364
|
+
|
|
365
|
+
- Export: `None`
|
|
366
|
+
- Source: `src/formats/hlsl/core/HlslEffectReadError.js`
|
|
367
|
+
- Visibility: Internal
|
|
368
|
+
- Kind: Internal implementation class
|
|
369
|
+
|
|
370
|
+
<!-- class:HlslEffectStateManager -->
|
|
371
|
+
## `HlslEffectStateManager`
|
|
372
|
+
|
|
373
|
+
Resolves and caches render-state setups referenced by a compiled effect while it is read.
|
|
374
|
+
|
|
375
|
+
- Export: `None`
|
|
376
|
+
- Source: `src/formats/hlsl/core/HlslEffectStateManager.js`
|
|
377
|
+
- Visibility: Internal
|
|
378
|
+
- Kind: Internal implementation class
|
|
379
|
+
|
|
380
|
+
<!-- class:HlslRenderStateSetup -->
|
|
381
|
+
## `HlslRenderStateSetup`
|
|
382
|
+
|
|
383
|
+
Ordered render-state key and value records attached to one pass.
|
|
384
|
+
|
|
385
|
+
- Export: `None`
|
|
386
|
+
- Source: `src/formats/hlsl/core/HlslRenderStateSetup.js`
|
|
387
|
+
- Visibility: Internal
|
|
388
|
+
- Kind: Internal implementation class
|
|
389
|
+
|
|
390
|
+
<!-- class:HlslResourceSetDescription -->
|
|
391
|
+
## `HlslResourceSetDescription`
|
|
392
|
+
|
|
393
|
+
Describes one resource set bound by a compiled effect stage.
|
|
394
|
+
|
|
395
|
+
- Export: `None`
|
|
396
|
+
- Source: `src/formats/hlsl/core/HlslResourceSetDescription.js`
|
|
397
|
+
- Visibility: Internal
|
|
398
|
+
- Kind: Internal implementation class
|
|
399
|
+
|
|
400
|
+
<!-- class:HlslShaderBytecode -->
|
|
401
|
+
## `HlslShaderBytecode`
|
|
402
|
+
|
|
403
|
+
Stage bytecode payload carried by a compiled effect, with its stage type and name.
|
|
404
|
+
|
|
405
|
+
- Export: `None`
|
|
406
|
+
- Source: `src/formats/hlsl/core/HlslShaderBytecode.js`
|
|
407
|
+
- Visibility: Internal
|
|
408
|
+
- Kind: Internal implementation class
|
|
409
|
+
|
|
410
|
+
<!-- class:HlslEffectRes -->
|
|
411
|
+
## `HlslEffectRes`
|
|
412
|
+
|
|
413
|
+
Parsed compiled effect resource: permutation axes, body offsets, and lazily decoded shader bodies.
|
|
414
|
+
|
|
415
|
+
- Export: `None`
|
|
416
|
+
- Source: `src/formats/hlsl/core/tr2/resources/HlslEffectRes.js`
|
|
417
|
+
- Visibility: Internal
|
|
418
|
+
- Kind: Internal implementation class
|
|
419
|
+
|
|
420
|
+
<!-- class:HlslShaderPermutation -->
|
|
421
|
+
## `HlslShaderPermutation`
|
|
422
|
+
|
|
423
|
+
One permutation axis of a compiled effect, with its ordered options and default.
|
|
424
|
+
|
|
425
|
+
- Export: `None`
|
|
426
|
+
- Source: `src/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js`
|
|
427
|
+
- Visibility: Internal
|
|
428
|
+
- Kind: Internal implementation class
|
|
429
|
+
|
|
430
|
+
<!-- class:HlslEffectBindingManifest -->
|
|
431
|
+
## `HlslEffectBindingManifest`
|
|
432
|
+
|
|
433
|
+
Flattened per-stage binding manifest derived from a resolved effect description.
|
|
434
|
+
|
|
435
|
+
- Export: `None`
|
|
436
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js`
|
|
437
|
+
- Visibility: Internal
|
|
438
|
+
- Kind: Internal implementation class
|
|
439
|
+
|
|
440
|
+
<!-- class:HlslEffectConstant -->
|
|
441
|
+
## `HlslEffectConstant`
|
|
442
|
+
|
|
443
|
+
Reflected shader constant: name, offset, size, type, dimension, and element count.
|
|
444
|
+
|
|
445
|
+
- Export: `None`
|
|
446
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectConstant.js`
|
|
447
|
+
- Visibility: Internal
|
|
448
|
+
- Kind: Internal implementation class
|
|
449
|
+
|
|
450
|
+
<!-- class:HlslEffectDescription -->
|
|
451
|
+
## `HlslEffectDescription`
|
|
452
|
+
|
|
453
|
+
Decoded effect body: techniques, passes, stages, libraries, and top-level annotations.
|
|
454
|
+
|
|
455
|
+
- Export: `None`
|
|
456
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectDescription.js`
|
|
457
|
+
- Visibility: Internal
|
|
458
|
+
- Kind: Internal implementation class
|
|
459
|
+
|
|
460
|
+
<!-- class:HlslEffectLibrary -->
|
|
461
|
+
## `HlslEffectLibrary`
|
|
462
|
+
|
|
463
|
+
Ray-tracing shader library record with its exports, payload size, and stage inputs.
|
|
464
|
+
|
|
465
|
+
- Export: `None`
|
|
466
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js`
|
|
467
|
+
- Visibility: Internal
|
|
468
|
+
- Kind: Internal implementation class
|
|
469
|
+
|
|
470
|
+
<!-- class:HlslEffectParameterAnnotation -->
|
|
471
|
+
## `HlslEffectParameterAnnotation`
|
|
472
|
+
|
|
473
|
+
Typed annotation attached to a reflected effect parameter.
|
|
474
|
+
|
|
475
|
+
- Export: `None`
|
|
476
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js`
|
|
477
|
+
- Visibility: Internal
|
|
478
|
+
- Kind: Internal implementation class
|
|
479
|
+
|
|
480
|
+
<!-- class:HlslEffectResource -->
|
|
481
|
+
## `HlslEffectResource`
|
|
482
|
+
|
|
483
|
+
Reflected shader resource or UAV binding with its register identity and array count.
|
|
484
|
+
|
|
485
|
+
- Export: `None`
|
|
486
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectResource.js`
|
|
487
|
+
- Visibility: Internal
|
|
488
|
+
- Kind: Internal implementation class
|
|
489
|
+
|
|
490
|
+
<!-- class:HlslEffectStageInput -->
|
|
491
|
+
## `HlslEffectStageInput`
|
|
492
|
+
|
|
493
|
+
Reflected stage input: constants, resources, samplers, signatures, and default constant bytes.
|
|
494
|
+
|
|
495
|
+
- Export: `None`
|
|
496
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js`
|
|
497
|
+
- Visibility: Internal
|
|
498
|
+
- Kind: Internal implementation class
|
|
499
|
+
|
|
500
|
+
<!-- class:HlslEffectTechnique -->
|
|
501
|
+
## `HlslEffectTechnique`
|
|
502
|
+
|
|
503
|
+
Named technique of a compiled effect body and its ordered passes.
|
|
504
|
+
|
|
505
|
+
- Export: `None`
|
|
506
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js`
|
|
507
|
+
- Visibility: Internal
|
|
508
|
+
- Kind: Internal implementation class
|
|
509
|
+
|
|
510
|
+
<!-- class:HlslPass -->
|
|
511
|
+
## `HlslPass`
|
|
512
|
+
|
|
513
|
+
One pass of a technique, carrying its stage inputs and render states.
|
|
514
|
+
|
|
515
|
+
- Export: `None`
|
|
516
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslPass.js`
|
|
517
|
+
- Visibility: Internal
|
|
518
|
+
- Kind: Internal implementation class
|
|
519
|
+
|
|
520
|
+
<!-- class:HlslSamplerDescription -->
|
|
521
|
+
## `HlslSamplerDescription`
|
|
522
|
+
|
|
523
|
+
Sampler state description: filters, address modes, LOD bounds, and comparison function.
|
|
524
|
+
|
|
525
|
+
- Export: `None`
|
|
526
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js`
|
|
527
|
+
- Visibility: Internal
|
|
528
|
+
- Kind: Internal implementation class
|
|
529
|
+
|
|
530
|
+
<!-- class:HlslSamplerSetup -->
|
|
531
|
+
## `HlslSamplerSetup`
|
|
532
|
+
|
|
533
|
+
Named or static sampler setup bound by a compiled effect stage.
|
|
534
|
+
|
|
535
|
+
- Export: `None`
|
|
536
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js`
|
|
537
|
+
- Visibility: Internal
|
|
538
|
+
- Kind: Internal implementation class
|
|
539
|
+
|
|
540
|
+
<!-- class:HlslShader -->
|
|
541
|
+
## `HlslShader`
|
|
542
|
+
|
|
543
|
+
Decoded shader body for one permutation index, wrapping its effect description.
|
|
544
|
+
|
|
545
|
+
- Export: `None`
|
|
546
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslShader.js`
|
|
547
|
+
- Visibility: Internal
|
|
548
|
+
- Kind: Internal implementation class
|
|
549
|
+
|
|
550
|
+
<!-- class:HlslShaderOption -->
|
|
551
|
+
## `HlslShaderOption`
|
|
552
|
+
|
|
553
|
+
One option value of a permutation axis.
|
|
554
|
+
|
|
555
|
+
- Export: `None`
|
|
556
|
+
- Source: `src/formats/hlsl/core/tr2/shader/HlslShaderOption.js`
|
|
557
|
+
- Visibility: Internal
|
|
558
|
+
- Kind: Internal implementation class
|
|
559
|
+
|
|
266
560
|
### jpeg
|
|
267
561
|
|
|
268
562
|
<!-- class:CjsJpegFormat -->
|
|
@@ -443,6 +737,152 @@ WAV audio format profile that inspects RIFF chunk metadata and reads supported W
|
|
|
443
737
|
- Visibility: Public
|
|
444
738
|
- Kind: Original CarbonEngineJS class
|
|
445
739
|
|
|
740
|
+
### shared effect layer
|
|
741
|
+
|
|
742
|
+
<!-- class:ReflectionBlobStore -->
|
|
743
|
+
## `ReflectionBlobStore`
|
|
744
|
+
|
|
745
|
+
Content-addressed arena that deduplicates every exact byte payload referenced by portable effect reflection.
|
|
746
|
+
|
|
747
|
+
- Export: `None`
|
|
748
|
+
- Source: `src/format/effect/effectReflectionPackage.js`
|
|
749
|
+
- Visibility: Internal
|
|
750
|
+
- Kind: Internal implementation class
|
|
751
|
+
|
|
752
|
+
### webgl
|
|
753
|
+
|
|
754
|
+
<!-- class:CjsWebglFormat -->
|
|
755
|
+
## `CjsWebglFormat`
|
|
756
|
+
|
|
757
|
+
WebGL shader format profile that translates compiled Carbon effects into CEWG packages carrying GLSL programs and portable source reflection.
|
|
758
|
+
|
|
759
|
+
- Export: `@carbonenginejs/runtime-resource/formats/webgl`
|
|
760
|
+
- Source: `src/formats/webgl/CjsWebglFormat.js`
|
|
761
|
+
- Visibility: Public
|
|
762
|
+
- Kind: Original CarbonEngineJS class
|
|
763
|
+
|
|
764
|
+
<!-- class:CewgPackage -->
|
|
765
|
+
## `CewgPackage`
|
|
766
|
+
|
|
767
|
+
Reader for the flat CEWG container: chunk lookup, cached JSON decoding, and validated portable reflection access.
|
|
768
|
+
|
|
769
|
+
- Export: `None`
|
|
770
|
+
- Source: `src/formats/webgl/core/cewg/CewgPackage.js`
|
|
771
|
+
- Visibility: Internal
|
|
772
|
+
- Kind: Internal implementation class
|
|
773
|
+
|
|
774
|
+
<!-- class:CewgPackageBuilder -->
|
|
775
|
+
## `CewgPackageBuilder`
|
|
776
|
+
|
|
777
|
+
Builds a CEWG container from ordered, uniquely tagged chunks.
|
|
778
|
+
|
|
779
|
+
- Export: `None`
|
|
780
|
+
- Source: `src/formats/webgl/core/cewg/CewgPackageBuilder.js`
|
|
781
|
+
- Visibility: Internal
|
|
782
|
+
- Kind: Internal implementation class
|
|
783
|
+
|
|
784
|
+
<!-- class:WebglReader -->
|
|
785
|
+
## `WebglReader`
|
|
786
|
+
|
|
787
|
+
Bounded little-endian byte cursor over CEWG container bytes.
|
|
788
|
+
|
|
789
|
+
- Export: `None`
|
|
790
|
+
- Source: `src/formats/webgl/core/cewg/binary.js`
|
|
791
|
+
- Visibility: Internal
|
|
792
|
+
- Kind: Internal implementation class
|
|
793
|
+
|
|
794
|
+
<!-- class:WebglReadError -->
|
|
795
|
+
## `WebglReadError`
|
|
796
|
+
|
|
797
|
+
Error raised when CEWG bytes or package documents are malformed or inconsistent.
|
|
798
|
+
|
|
799
|
+
- Export: `None`
|
|
800
|
+
- Source: `src/formats/webgl/core/errors.js`
|
|
801
|
+
- Visibility: Internal
|
|
802
|
+
- Kind: Internal implementation class
|
|
803
|
+
|
|
804
|
+
<!-- class:DxbcGlslEmitter -->
|
|
805
|
+
## `DxbcGlslEmitter`
|
|
806
|
+
|
|
807
|
+
Translates decoded DXBC shader programs into GLSL for the WebGL backend.
|
|
808
|
+
|
|
809
|
+
- Export: `None`
|
|
810
|
+
- Source: `src/formats/webgl/core/glsl/DxbcGlslEmitter.js`
|
|
811
|
+
- Visibility: Internal
|
|
812
|
+
- Kind: Internal implementation class
|
|
813
|
+
|
|
814
|
+
<!-- class:DxbcGlslHelperRegistry -->
|
|
815
|
+
## `DxbcGlslHelperRegistry`
|
|
816
|
+
|
|
817
|
+
Collects and emits the GLSL helper functions a translated program requires.
|
|
818
|
+
|
|
819
|
+
- Export: `None`
|
|
820
|
+
- Source: `src/formats/webgl/core/glsl/DxbcGlslHelpers.js`
|
|
821
|
+
- Visibility: Internal
|
|
822
|
+
- Kind: Internal implementation class
|
|
823
|
+
|
|
824
|
+
<!-- class:DxbcGlslOperandFormatter -->
|
|
825
|
+
## `DxbcGlslOperandFormatter`
|
|
826
|
+
|
|
827
|
+
Formats DXBC operands, swizzles, and modifiers as GLSL expressions.
|
|
828
|
+
|
|
829
|
+
- Export: `None`
|
|
830
|
+
- Source: `src/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js`
|
|
831
|
+
- Visibility: Internal
|
|
832
|
+
- Kind: Internal implementation class
|
|
833
|
+
|
|
834
|
+
### webgpu
|
|
835
|
+
|
|
836
|
+
<!-- class:CjsWebgpuFormat -->
|
|
837
|
+
## `CjsWebgpuFormat`
|
|
838
|
+
|
|
839
|
+
WebGPU shader format profile that translates compiled Carbon effects into CEWGPU packages carrying WGSL programs, bind-group layouts, and portable source reflection.
|
|
840
|
+
|
|
841
|
+
- Export: `@carbonenginejs/runtime-resource/formats/webgpu`
|
|
842
|
+
- Source: `src/formats/webgpu/CjsWebgpuFormat.js`
|
|
843
|
+
- Visibility: Public
|
|
844
|
+
- Kind: Original CarbonEngineJS class
|
|
845
|
+
|
|
846
|
+
<!-- class:CewgpuPackage -->
|
|
847
|
+
## `CewgpuPackage`
|
|
848
|
+
|
|
849
|
+
Reader for the flat CEWGPU container: chunk lookup, cached JSON decoding, and gated portable reflection and backend program access.
|
|
850
|
+
|
|
851
|
+
- Export: `None`
|
|
852
|
+
- Source: `src/formats/webgpu/core/cewgpu/CewgpuPackage.js`
|
|
853
|
+
- Visibility: Internal
|
|
854
|
+
- Kind: Internal implementation class
|
|
855
|
+
|
|
856
|
+
<!-- class:CewgpuPackageBuilder -->
|
|
857
|
+
## `CewgpuPackageBuilder`
|
|
858
|
+
|
|
859
|
+
Builds a CEWGPU container from ordered, uniquely tagged chunks.
|
|
860
|
+
|
|
861
|
+
- Export: `None`
|
|
862
|
+
- Source: `src/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js`
|
|
863
|
+
- Visibility: Internal
|
|
864
|
+
- Kind: Internal implementation class
|
|
865
|
+
|
|
866
|
+
<!-- class:WebgpuReader -->
|
|
867
|
+
## `WebgpuReader`
|
|
868
|
+
|
|
869
|
+
Bounded little-endian byte cursor over CEWGPU container bytes.
|
|
870
|
+
|
|
871
|
+
- Export: `None`
|
|
872
|
+
- Source: `src/formats/webgpu/core/cewgpu/binary.js`
|
|
873
|
+
- Visibility: Internal
|
|
874
|
+
- Kind: Internal implementation class
|
|
875
|
+
|
|
876
|
+
<!-- class:WebgpuReadError -->
|
|
877
|
+
## `WebgpuReadError`
|
|
878
|
+
|
|
879
|
+
Error raised when CEWGPU bytes or package documents are malformed or inconsistent.
|
|
880
|
+
|
|
881
|
+
- Export: `None`
|
|
882
|
+
- Source: `src/formats/webgpu/core/errors.js`
|
|
883
|
+
- Visibility: Internal
|
|
884
|
+
- Kind: Internal implementation class
|
|
885
|
+
|
|
446
886
|
### webm
|
|
447
887
|
|
|
448
888
|
<!-- class:CjsWebmFormat -->
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
carbonenginejs/format-dxbc
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
A pure-JavaScript reader for Microsoft DXBC (Direct3D compiled shader
|
|
5
|
+
bytecode) containers and the SM4/SM5 instruction token stream.
|
|
6
|
+
|
|
7
|
+
Contains no Microsoft, CarbonEngine, or Fenris Creations (CCP Games) code. The
|
|
8
|
+
token-stream layout follows Microsoft's public d3d11TokenizedProgramFormat
|
|
9
|
+
documentation. CarbonEngine and Fenris Creations (CCP Games) are mentioned for
|
|
10
|
+
interoperability and target-ecosystem context only; DXBC itself is a Microsoft
|
|
11
|
+
format. Unity Technologies' HLSLcc (MIT) was used as a behavioral reference
|
|
12
|
+
while auditing instruction semantics; no HLSLcc source is included in this
|
|
13
|
+
repository.
|
|
14
|
+
|
|
15
|
+
This package is not affiliated with or endorsed by CCP Games.
|
|
16
|
+
|
|
17
|
+
CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
|
|
18
|
+
contributors.
|
|
19
|
+
|
|
20
|
+
Repository license: MIT. See LICENSE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|