@forgeax/engine-render 0.1.26 → 0.1.27
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/{chunk-YUQXSEHG.mjs → chunk-XDP6XE5V.mjs} +22 -8
- package/dist/chunk-XDP6XE5V.mjs.map +1 -0
- package/dist/construct-renderer.mjs +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +6 -0
- package/dist/render-system-extract.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/record/__tests__/standard-pbr-ubo-layout.unit.test.ts +68 -1
- package/src/render-system-extract-tail.ts +3 -2
- package/src/render-system-extract.ts +30 -1
- package/dist/chunk-YUQXSEHG.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GlyphText, selectActiveCameraIndex, getActiveCamera } from './chunk-FJ6P52EE.mjs';
|
|
2
2
|
import { MeshRenderer, MeshFilter, DirectionalLight, validateDirectionalLightData, PointLight, computeInvRangeSquared, SpotLight, degToCos, RectAreaLight, validateRectAreaLightData, directionalShadowQualityFromF32, PointLightShadow, Skylight, LightProbe, validateLightProbeData, SkyboxBackground, Atmosphere, Instances, Layer, Points, Lines, SortKey, resolveMeshMaterialBindings, pointShapeFromU32, PostProcessParams, CubeCamera, cubeCameraUpdateIntentFromF32, ReflectionProbe, reflectionProbeUpdateIntentFromF32, tonemapToU32, resolveVisibility, Fog, VolumetricFog, resolveSelectedVolumetricLight, extractVolumetricFog, MotionBlur, Camera, bloomEnabledFromF32, antialiasFromF32, tonemapFromF32, cameraProjectionFromF32 } from './chunk-ADHHVYLW.mjs';
|
|
3
3
|
import { SpriteRegionOverride, SpriteInstances } from './chunk-JDWARUOI.mjs';
|
|
4
|
-
import { PROBE_BLEND_RECORD_CAPACITY, GPU_BUFFER_USAGE_MAP_READ, GPU_BUFFER_USAGE_VERTEX, GPU_BUFFER_USAGE_COPY_DST, IES_SLICE_CAPACITY, COOKIE_SLICE_CAPACITY, isStandardPbrSkinMaterialShader, selectPasses, resolveRenderTargetMaterialSource,
|
|
4
|
+
import { PROBE_BLEND_RECORD_CAPACITY, GPU_BUFFER_USAGE_MAP_READ, GPU_BUFFER_USAGE_VERTEX, GPU_BUFFER_USAGE_COPY_DST, IES_SLICE_CAPACITY, COOKIE_SLICE_CAPACITY, isStandardPbrSkinMaterialShader, selectPasses, resolveRenderTargetMaterialSource, PROBE_BLEND_RECORD_BYTE_SIZE, GPU_BUFFER_USAGE_QUERY_RESOLVE, GPU_BUFFER_USAGE_COPY_SRC, COOKIE_SLICE_SIZE, isCanonicalStandardPbrMaterialShader, isStandardPbrMaterialShader } from './chunk-HKXTW355.mjs';
|
|
5
5
|
import { STANDARD_OUTPUT_TRANSFORM_FEATURE_ID, SHADOW_ATLAS_DEFAULT_LAYERS, SkinMaterialMismatchError, MaterialSkinAttrMissingError, ShadowInvalidConfigError, EnvironmentSourceConflictError, FogCardinalityError, AtmosphereInvalidParameterError } from './chunk-ZZ4YQ474.mjs';
|
|
6
6
|
import { err, ok, RhiError } from '@forgeax/engine-rhi';
|
|
7
7
|
import { resolveAssetHandle, walkMaterialPassesOverSharedRefs, selectMaterialPassProgram, materialParametersToParamSchema as materialParametersToParamSchema$1 } from '@forgeax/engine-assets-runtime';
|
|
@@ -9,7 +9,7 @@ import { SpawnLightInvalidBoundsError, routeWorldError, SpriteInstancesMutuallyE
|
|
|
9
9
|
import { vec3, mat4, frustum, box3 } from '@forgeax/engine-math';
|
|
10
10
|
import { AssetGuid } from '@forgeax/engine-pack/guid';
|
|
11
11
|
import { Transform, GlobalTransform, MorphWeights } from '@forgeax/engine-scene';
|
|
12
|
-
import { STANDARD_PIPELINE_PARAM_SCHEMA } from '@forgeax/engine-shader';
|
|
12
|
+
import { STANDARD_PIPELINE_PARAM_SCHEMA, DEFAULT_STANDARD_SURFACE_MODULE } from '@forgeax/engine-shader';
|
|
13
13
|
import { R_MIN, err as err$1, ok as ok$1, TextError, toShared, handleSlot, AssetError, ASSET_ERROR_HINTS, materialValuesToLinearRuntime, derive, unpackSlot, materialGuidText } from '@forgeax/engine-types';
|
|
14
14
|
import { PROCEDURAL_FLOATS_PER_VERTEX, deriveVertexLayoutProjection } from '@forgeax/engine-geometry';
|
|
15
15
|
import { Skin, SkinInstancesCoexistForbiddenError, SkeletonResolveFailedError, JointCountMismatchError, JointEntityDanglingError } from '@forgeax/engine-skinning';
|
|
@@ -2898,9 +2898,10 @@ function extractFrame(world, context) {
|
|
|
2898
2898
|
paramSnap[k] = v;
|
|
2899
2899
|
}
|
|
2900
2900
|
}
|
|
2901
|
-
const materialParamSchema =
|
|
2901
|
+
const materialParamSchema = materialParamSchemaForMaterial(
|
|
2902
2902
|
resolved.parameters ?? [],
|
|
2903
|
-
authoredFirstPassShader
|
|
2903
|
+
authoredFirstPassShader,
|
|
2904
|
+
allPasses
|
|
2904
2905
|
);
|
|
2905
2906
|
{
|
|
2906
2907
|
const hasSkinSkel = hasSkin && skinSkeletonView !== void 0 && skinSkeletonView !== void 0 && skinSkeletonView !== 0;
|
|
@@ -3874,6 +3875,18 @@ function materialParametersToParamSchema(parameters, shaderId) {
|
|
|
3874
3875
|
if (isCanonicalStandardPbrMaterialShader(shaderId)) return STANDARD_PIPELINE_PARAM_SCHEMA;
|
|
3875
3876
|
return materialParametersToParamSchema$1(parameters);
|
|
3876
3877
|
}
|
|
3878
|
+
function materialParamSchemaForMaterial(parameters, authoredShaderId, passes) {
|
|
3879
|
+
const firstPass = passes.find(
|
|
3880
|
+
(pass) => !/shadow|depth/i.test(
|
|
3881
|
+
String(
|
|
3882
|
+
pass.renderState?.tags?.LightMode ?? pass.name
|
|
3883
|
+
)
|
|
3884
|
+
)
|
|
3885
|
+
) ?? passes[0];
|
|
3886
|
+
const surfaceModule = firstPass?.program.moduleSlots?.surface;
|
|
3887
|
+
const schemaShaderId = surfaceModule === void 0 || surfaceModule === DEFAULT_STANDARD_SURFACE_MODULE ? authoredShaderId : void 0;
|
|
3888
|
+
return materialParametersToParamSchema(parameters, schemaShaderId);
|
|
3889
|
+
}
|
|
3877
3890
|
function materialColorParameterSchema(parameters, shaderId, assets) {
|
|
3878
3891
|
if (shaderId === void 0) return parameters;
|
|
3879
3892
|
const shader = assets.shaderRegistry.findMaterialArtifact(shaderId);
|
|
@@ -3994,9 +4007,10 @@ function resolveMaterialSnapshot(handleRaw, world, assetsRef, materialSnapshotCa
|
|
|
3994
4007
|
paramSnap[k] = v;
|
|
3995
4008
|
}
|
|
3996
4009
|
}
|
|
3997
|
-
const materialParamSchema =
|
|
4010
|
+
const materialParamSchema = materialParamSchemaForMaterial(
|
|
3998
4011
|
resolved.parameters ?? [],
|
|
3999
|
-
authoredFirstPassShader
|
|
4012
|
+
authoredFirstPassShader,
|
|
4013
|
+
allPasses
|
|
4000
4014
|
);
|
|
4001
4015
|
const resolveTexLike = (value, brand) => {
|
|
4002
4016
|
if (typeof value === "number") return toShared(value);
|
|
@@ -5165,5 +5179,5 @@ var ProbeBlendSceneProjection = class {
|
|
|
5165
5179
|
};
|
|
5166
5180
|
|
|
5167
5181
|
export { InstanceBoundsCache, OcclusionRenderRuntime, PROBE_MAX_CONTRIBUTORS, ProbeBlendSceneProjection, SKYLIGHT_RECOVERY_FALLBACK, admitProbeContributors, blendLightProbes, buildRectAreaWorldFrame, createCookieProjectionMatrixData, createExtendedLightingState, extractFrames, fingerprintNumericArray, glyphTextLayoutSystem, primitiveKey, primitiveKeyId, projectExtendedLightingInspection, promoteExtendedLightingCandidate, recordExtendedLightingFailure, rectAreaFacesPoint, scaledProbeWeight, setOcclusionRuntimeTestHooks, viewKey, viewKeyId };
|
|
5168
|
-
//# sourceMappingURL=chunk-
|
|
5169
|
-
//# sourceMappingURL=chunk-
|
|
5182
|
+
//# sourceMappingURL=chunk-XDP6XE5V.mjs.map
|
|
5183
|
+
//# sourceMappingURL=chunk-XDP6XE5V.mjs.map
|