@call-me-sensei/toonlab 0.3.0 → 0.4.19
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 +549 -184
- package/agents/README.md +59 -0
- package/agents/references/anime-art-direction.md +24 -0
- package/agents/references/asset-sourcing-policy.md +23 -0
- package/agents/references/custom-gap-report.md +16 -0
- package/agents/references/geology-playbook.md +118 -0
- package/agents/references/mcp-asset-discovery.md +104 -0
- package/agents/references/runtime-entry-points.md +174 -0
- package/agents/references/style-bundles.md +71 -0
- package/agents/skills/claude/asset-sourcing/SKILL.md +275 -0
- package/agents/skills/claude/environment/SKILL.md +59 -0
- package/agents/skills/claude/game-dev/SKILL.md +100 -0
- package/agents/skills/claude/karst-cliff-construction/SKILL.md +258 -0
- package/agents/skills/claude/outdoor-world/SKILL.md +492 -0
- package/agents/skills/claude/outdoor-world/references/coastal-landform-formation.md +100 -0
- package/agents/skills/claude/post-processing/SKILL.md +44 -0
- package/agents/skills/claude/rock-ground-shaders/SKILL.md +118 -0
- package/agents/skills/claude/rockgen/SKILL.md +30 -0
- package/agents/skills/claude/scene-style-application/SKILL.md +74 -0
- package/agents/skills/claude/style-presets/SKILL.md +101 -0
- package/agents/skills/claude/toon-shading/SKILL.md +44 -0
- package/agents/skills/claude/vegetation-sky/SKILL.md +167 -0
- package/agents/skills/claude/visual-verification/SKILL.md +136 -0
- package/agents/skills/claude/water/SKILL.md +105 -0
- package/agents/skills/codex/asset-sourcing/SKILL.md +275 -0
- package/agents/skills/codex/environment/SKILL.md +59 -0
- package/agents/skills/codex/game-dev/SKILL.md +100 -0
- package/agents/skills/codex/karst-cliff-construction/SKILL.md +258 -0
- package/agents/skills/codex/outdoor-world/SKILL.md +492 -0
- package/agents/skills/codex/outdoor-world/references/coastal-landform-formation.md +100 -0
- package/agents/skills/codex/post-processing/SKILL.md +44 -0
- package/agents/skills/codex/rock-ground-shaders/SKILL.md +118 -0
- package/agents/skills/codex/rockgen/SKILL.md +30 -0
- package/agents/skills/codex/scene-style-application/SKILL.md +74 -0
- package/agents/skills/codex/style-presets/SKILL.md +101 -0
- package/agents/skills/codex/toon-shading/SKILL.md +44 -0
- package/agents/skills/codex/vegetation-sky/SKILL.md +167 -0
- package/agents/skills/codex/visual-verification/SKILL.md +136 -0
- package/agents/skills/codex/water/SKILL.md +105 -0
- package/cli/toonlab.mjs +52 -0
- package/compose.yaml +20 -0
- package/database/apply-sql.mjs +141 -0
- package/database/client.mjs +39 -0
- package/database/creation-tags.mjs +23 -0
- package/database/env.mjs +16 -0
- package/database/generation-service.mjs +314 -0
- package/database/migrations/0001_local_workspace.sql +120 -0
- package/database/migrations/0002_file_ownership.sql +11 -0
- package/database/migrations/0003_remove_autosaves_from_library.sql +7 -0
- package/database/migrations/0004_catalog_asset_packs.sql +39 -0
- package/database/migrations/0005_creation_tag_discovery.sql +1 -0
- package/database/migrations/0006_normalize_creation_tags.sql +28 -0
- package/database/providers.mjs +465 -0
- package/database/repository.mjs +625 -0
- package/database/seeds/catalog/0001_empty_official_catalog.sql +4 -0
- package/database/seeds/catalog/0002_2026-08.sql +19454 -0
- package/mcp/lab-management.mjs +629 -0
- package/mcp/public-catalog.mjs +168 -0
- package/mcp/server.mjs +1026 -63
- package/mcp/vite-plugin.mjs +443 -26
- package/mcp/workspace.mjs +26 -1
- package/package.json +312 -45
- package/scripts/generate-catalog-seed.mjs +297 -0
- package/scripts/setup-local.mjs +128 -0
- package/src/agents/index.js +7 -0
- package/src/agents/sceneStyleOperations.js +169 -0
- package/src/asset-policy/catalogLicenses.js +44 -0
- package/src/asset-policy/index.js +315 -0
- package/src/assetlib/assetRef.js +1 -1
- package/src/assetlib/galleryMaterialFamily.js +165 -0
- package/src/assetlib/index.js +6 -2
- package/src/assetlib/plateau.js +188 -0
- package/src/assetlib/plateauLandmarks.js +144 -0
- package/src/assetlib/plateauViewer.js +348 -0
- package/src/assetlib/sources.js +16 -2
- package/src/catalog/manifest.js +11 -1
- package/src/catalog/officialCatalog.js +4 -0
- package/src/catalog/officialCatalogAssetRuntime.js +313 -0
- package/src/catalog/officialCatalogLod.js +150 -0
- package/src/catalog/officialCatalogPlacement.js +228 -0
- package/src/catalog/officialCatalogProvider.js +334 -0
- package/src/character/animationRetarget.js +1082 -0
- package/src/character/characterRuntime.js +376 -0
- package/src/character/groundStabilizer.js +137 -0
- package/src/character/index.js +8 -0
- package/src/character/locomotionActions.js +74 -0
- package/src/character/locomotionStateMachine.js +241 -0
- package/src/character/mannequinAsset.js +15 -0
- package/src/character/mannequinAssetUrl.browser.js +4 -0
- package/src/character/mannequinAssetUrl.node.js +3 -0
- package/src/character/modelLoader.js +92 -12
- package/src/character/walkableCharacterRuntime.js +284 -0
- package/src/character/waterInteractionController.js +217 -0
- package/src/cloud/ambientSkyBaker.js +248 -0
- package/src/cloud/cloudLighting.js +1114 -0
- package/src/cloud/cloudParams.js +819 -0
- package/src/cloud/cloudReprojection.js +563 -0
- package/src/cloud/cloudStyle.js +780 -0
- package/src/cloud/cloudStyleSnapshots.js +387 -0
- package/src/cloud/cloudVolume.js +1903 -0
- package/src/cloud/heroCloudRecipe.js +404 -0
- package/src/cloud/index.js +42 -0
- package/src/cloud/noise/baseShapeVolume.js +331 -0
- package/src/cloud/noise/cirrusMap.js +131 -0
- package/src/cloud/noise/curlNoise.js +289 -0
- package/src/cloud/noise/erosionVolume.js +188 -0
- package/src/cloud/noise/noiseVolume.js +202 -0
- package/src/cloud/noise/periodicNoise3.js +295 -0
- package/src/cloud/noise/weatherMap.js +470 -0
- package/src/cloud/paramSchema.js +458 -0
- package/src/collisionMetadata.js +320 -0
- package/src/core/systemStylePolicy.js +32 -0
- package/src/environment/dayCurves.js +146 -0
- package/src/environment/environmentGroundFieldPass.js +354 -0
- package/src/environment/environmentMaterialAdapter.js +114 -6
- package/src/environment/environmentPresets.js +396 -90
- package/src/environment/environmentRigs.js +17 -2
- package/src/environment/environmentSettings.js +37 -1
- package/src/environment/environmentShaderMaterials.js +37 -6
- package/src/environment/environmentState.js +133 -0
- package/src/environment/environmentSunShadowPass.js +357 -6
- package/src/environment/environmentTextureResolver.js +7 -0
- package/src/environment/index.js +51 -0
- package/src/environment/manufacturedMaterialContract.js +837 -0
- package/src/environment/manufacturedReflectionProvider.js +114 -0
- package/src/environment/scanAssetStylize.js +4 -4
- package/src/environment/surfaceMaterialModes.js +71 -0
- package/src/environment/toonLabEnvironmentMaterials.js +353 -0
- package/src/environment/toonLabMaterialPassCoupling.js +347 -0
- package/src/environment/toonLabNormalIntegration.js +171 -0
- package/src/environment/toonLabRockMaterialResolver.js +592 -0
- package/src/environment/toonLabSourceDefaultLit.js +444 -0
- package/src/environment/toonLabSourceLibrary.js +762 -0
- package/src/environment/toonLabSourceMaterials.js +3718 -0
- package/src/environment/toonLabSourceSubsurfaceLighting.js +415 -0
- package/src/environment/toonLabSourceTemporal.js +717 -0
- package/src/environment/toonLabSurfaceLighting.js +364 -0
- package/src/environment/toonLabTextureReadiness.js +105 -0
- package/src/environment/toonLabTreeMaterials.js +450 -0
- package/src/environment/transparentMaterialProfile.js +87 -0
- package/src/environment/urbanPropMaterial.js +2874 -0
- package/src/ground-shader/groundPrintLayer.js +375 -0
- package/src/ground-shader/groundShaderMaterial.js +851 -0
- package/src/ground-shader/groundShaderSettings.js +468 -0
- package/src/ground-shader/index.js +3 -0
- package/src/index.js +52 -22
- package/src/lighting/callMeSenseiLightingContract.js +163 -0
- package/src/lighting/index.js +14 -7
- package/src/lighting/lightingCapabilities.js +2 -2
- package/src/lighting/lightingPresets.js +6 -3
- package/src/lighting/lightingStyle.js +41 -6
- package/src/lighting/lightingSystem.js +140 -1
- package/src/lighting/{unrealExport.js → toonLabExport.js} +40 -41
- package/src/post/postProcessing.js +71 -12
- package/src/react/index.js +66 -0
- package/src/renderer/index.js +9 -0
- package/src/renderer/rendererConfiguration.js +250 -0
- package/src/rock-shader/index.js +3 -0
- package/src/rock-shader/rockMaterial.js +1843 -0
- package/src/rock-shader/rockShaderRuntime.js +494 -0
- package/src/rock-shader/rockShaderSettings.js +869 -0
- package/src/rockgen/export/glbExport.js +104 -14
- package/src/rockgen/index.js +4 -3
- package/src/rockgen/lod/index.js +6 -0
- package/src/rockgen/lod/rockLodMetrics.js +168 -0
- package/src/rockgen/lod/rockLodPlanner.js +372 -0
- package/src/rockgen/lod/rockLodPolicy.js +235 -0
- package/src/rockgen/lod/rockLodRuntime.js +124 -0
- package/src/rockgen/lod/rockLodSimplifier.js +173 -0
- package/src/rockgen/lod/rockLodValidation.js +113 -0
- package/src/rockgen/mesh/meshAttributes.js +17 -0
- package/src/rockgen/mesh/meshDocument.js +6 -0
- package/src/rockgen/rockDocument.js +352 -9
- package/src/rockgen/rockgenPresets.js +114 -13
- package/src/rockgen/rockgenSettings.js +62 -11
- package/src/runtime/index.js +14 -0
- package/src/runtime/sceneCollisionRuntime.js +317 -0
- package/src/runtime/sceneSurfaceRuntime.js +451 -0
- package/src/runtime/sceneUpdateScheduler.js +203 -0
- package/src/shaders-tsl/anime.js +9 -2
- package/src/shaders-tsl/chunks/environment-ground-field.js +174 -0
- package/src/shaders-tsl/chunks/environment-state.js +79 -0
- package/src/shaders-tsl/chunks/environment-sun-shadow.js +99 -32
- package/src/shaders-tsl/chunks/normalized-hue.js +41 -0
- package/src/shaders-tsl/chunks/pass-depth-color.js +4 -2
- package/src/shaders-tsl/chunks/scene-depth-color-pass.js +273 -0
- package/src/shaders-tsl/chunks/vegetation-style.js +116 -8
- package/src/shaders-tsl/chunks/water-color.js +19 -5
- package/src/shaders-tsl/chunks/water-shore-state.js +8 -1
- package/src/shaders-tsl/chunks/world-noise.js +30 -0
- package/src/shaders-tsl/environment.js +123 -17
- package/src/shaders-tsl/flower.js +51 -8
- package/src/shaders-tsl/grass.js +194 -29
- package/src/shaders-tsl/post-composite.js +83 -2
- package/src/shaders-tsl/tree-leaf.js +107 -16
- package/src/shaders-tsl/water-breaker.js +18 -4
- package/src/shaders-tsl/water.js +43 -3
- package/src/shaders-tsl/woody-surface.js +59 -7
- package/src/sky/atmosphereDome.js +193 -0
- package/src/sky/atmosphereParams.js +396 -0
- package/src/sky/atmosphereScattering.js +593 -0
- package/src/sky/atmosphereSky.js +371 -0
- package/src/sky/cloudShadow.js +355 -0
- package/src/sky/godRays.js +257 -0
- package/src/sky/index.js +55 -1
- package/src/sky/nightSky.js +1190 -0
- package/src/sky/renderLayers.js +120 -0
- package/src/sky/skyColor.js +582 -0
- package/src/sky/skyDayCycle.js +244 -0
- package/src/sky/skyParams.js +661 -0
- package/src/sky/skyPresets.js +772 -0
- package/src/sky/skyQualityTiers.js +383 -0
- package/src/sky/skyShaderSettings.js +699 -0
- package/src/sky/skyStyleSnapshots.js +211 -0
- package/src/sky/skySystem.js +1438 -0
- package/src/sky/skyTimeKeyframes.js +361 -0
- package/src/sky/stylizedSky.js +405 -116
- package/src/sky/sunDriver.js +499 -0
- package/src/sky/timeOfDay.js +335 -0
- package/src/styles/animeGameProfile.js +44 -0
- package/src/styles/index.js +134 -0
- package/src/styles/manufacturedStyleLabeling.js +204 -0
- package/src/styles/sceneLayerDocuments.js +185 -0
- package/src/styles/sceneLookComposition.js +156 -0
- package/src/styles/sceneQualityApplication.js +152 -0
- package/src/styles/sceneQualityProfiles.js +268 -0
- package/src/styles/sceneStyleAudit.js +512 -0
- package/src/styles/sceneStyleRuntime.js +876 -0
- package/src/styles/styleAdapters.js +166 -0
- package/src/styles/styleApplication.js +369 -0
- package/src/styles/styleBundle.js +444 -91
- package/src/styles/styleBundleProvider.js +83 -0
- package/src/styles/styleDomains.js +21 -0
- package/src/styles/styleInspector.js +262 -0
- package/src/styles/styleMaterialContract.js +375 -0
- package/src/styles/styleMetadata.js +73 -0
- package/src/styles/styleTargetDiscovery.js +162 -0
- package/src/styles/styleTargetLabels.js +206 -0
- package/src/styles/styleTargetMaterialCoverage.js +137 -0
- package/src/styles/styleTransaction.js +272 -0
- package/src/texgen/textureGenerators.js +21 -5
- package/src/toon/toonSettings.js +4 -0
- package/src/vegetation/branchTree.js +302 -0
- package/src/vegetation/callMeSenseiGrass.js +183 -0
- package/src/vegetation/compiledTree.js +506 -0
- package/src/vegetation/contactShadowField.js +107 -0
- package/src/vegetation/flowerSpecies.js +10 -2
- package/src/vegetation/grass.js +13 -0
- package/src/vegetation/grassClump.js +1179 -0
- package/src/vegetation/importedVegetationMaterial.js +183 -0
- package/src/vegetation/index.js +15 -1
- package/src/vegetation/legacyTreePresets.js +120 -0
- package/src/vegetation/scatter.js +322 -3
- package/src/vegetation/stylizedBush.js +14 -0
- package/src/vegetation/stylizedFlower.js +31 -0
- package/src/vegetation/stylizedFlowers.js +59 -7
- package/src/vegetation/stylizedForest.js +455 -147
- package/src/vegetation/stylizedGrass.js +188 -24
- package/src/vegetation/stylizedTree.js +378 -46
- package/src/vegetation/stylizedTreeFoliage.js +889 -38
- package/src/vegetation/stylizedUnderstory.js +230 -0
- package/src/vegetation/treeExport.js +262 -47
- package/src/vegetation/treeSurfaceTextures.js +337 -0
- package/src/vegetation/vegetationShaders.js +617 -28
- package/src/version.js +3 -0
- package/src/water/water.js +2 -0
- package/src/water/waterBreakerSystem.js +2 -0
- package/src/water/waterCurrentField.js +1 -0
- package/src/water/waterMaterial.js +3 -0
- package/src/water/waterRain.js +2 -0
- package/src/water/waterScenePasses.js +170 -7
- package/src/water/waterSettings.js +235 -43
- package/src/water/waterShoreMaterial.js +16 -2
- package/src/water/waterShoreStateField.js +1 -1
- package/src/water/waterSplashSystem.js +2 -0
- package/src/water/waterStageSettings.js +60 -0
- package/src/water/waterSurface.js +144 -4
- package/src/water/waterUnderwaterAtmosphere.js +288 -0
- package/src/water/waterVegetation.js +20 -4
- package/src/worldCollision.js +64 -9
- package/types/agents/index.d.ts +1 -0
- package/types/agents/sceneStyleOperations.d.ts +484 -0
- package/types/asset-policy/catalogLicenses.d.ts +5 -0
- package/types/asset-policy/index.d.ts +18 -0
- package/types/assetlib/ambientcg.d.ts +81 -0
- package/types/assetlib/assetRef.d.ts +26 -0
- package/types/assetlib/galleryMaterialFamily.d.ts +13 -0
- package/types/assetlib/importedEntry.d.ts +18 -0
- package/types/assetlib/index.d.ts +16 -0
- package/types/assetlib/kaykit.d.ts +112 -0
- package/types/assetlib/kaykitStaticIndex.d.ts +38 -0
- package/types/assetlib/loadImported.d.ts +54 -0
- package/types/assetlib/opensource3d.d.ts +55 -0
- package/types/assetlib/plateau.d.ts +67 -0
- package/types/assetlib/plateauLandmarks.d.ts +238 -0
- package/types/assetlib/plateauViewer.d.ts +3 -0
- package/types/assetlib/polyhaven.d.ts +90 -0
- package/types/assetlib/polypizza.d.ts +10 -0
- package/types/assetlib/smithsonian.d.ts +9 -0
- package/types/assetlib/sources.d.ts +22 -0
- package/types/assetlib/zip.d.ts +8 -0
- package/types/catalog/manifest.d.ts +26 -0
- package/types/catalog/officialCatalog.d.ts +4 -0
- package/types/catalog/officialCatalogAssetRuntime.d.ts +2 -0
- package/types/catalog/officialCatalogLod.d.ts +5 -0
- package/types/catalog/officialCatalogPlacement.d.ts +49 -0
- package/types/catalog/officialCatalogProvider.d.ts +7 -0
- package/types/character/animationRetarget.d.ts +20 -0
- package/types/character/characterRig.d.ts +28 -0
- package/types/character/characterRuntime.d.ts +4 -0
- package/types/character/freestyleSwimClip.d.ts +5 -0
- package/types/character/groundStabilizer.d.ts +55 -0
- package/types/character/index.d.ts +10 -0
- package/types/character/locomotionActions.d.ts +4 -0
- package/types/character/locomotionStateMachine.d.ts +62 -0
- package/types/character/mannequinAsset.d.ts +12 -0
- package/types/character/mannequinAssetUrl.node.d.ts +1 -0
- package/types/character/modelLoader.d.ts +7 -0
- package/types/character/walkableCharacterRuntime.d.ts +343 -0
- package/types/character/waterInteractionController.d.ts +114 -0
- package/types/cloud/ambientSkyBaker.d.ts +18 -0
- package/types/cloud/cloudLighting.d.ts +38 -0
- package/types/cloud/cloudParams.d.ts +18 -0
- package/types/cloud/cloudReprojection.d.ts +15 -0
- package/types/cloud/cloudStyle.d.ts +1380 -0
- package/types/cloud/cloudStyleSnapshots.d.ts +10 -0
- package/types/cloud/cloudVolume.d.ts +43 -0
- package/types/cloud/heroCloudRecipe.d.ts +167 -0
- package/types/cloud/index.d.ts +12 -0
- package/types/cloud/noise/baseShapeVolume.d.ts +86 -0
- package/types/cloud/noise/cirrusMap.d.ts +24 -0
- package/types/cloud/noise/curlNoise.d.ts +106 -0
- package/types/cloud/noise/erosionVolume.d.ts +58 -0
- package/types/cloud/noise/noiseVolume.d.ts +63 -0
- package/types/cloud/noise/periodicNoise3.d.ts +75 -0
- package/types/cloud/noise/weatherMap.d.ts +227 -0
- package/types/cloud/paramSchema.d.ts +142 -0
- package/types/collisionMetadata.d.ts +11 -0
- package/types/core/generation.d.ts +95 -0
- package/types/core/materialRoles.d.ts +102 -0
- package/types/core/presetDocuments.d.ts +25 -0
- package/types/core/systemStylePolicy.d.ts +4 -0
- package/types/environment/dayCurves.d.ts +47 -0
- package/types/environment/environmentAmbientProbe.d.ts +2 -0
- package/types/environment/environmentGroundFieldPass.d.ts +2 -0
- package/types/environment/environmentMaterialAdapter.d.ts +42 -0
- package/types/environment/environmentMaterialClassifier.d.ts +26 -0
- package/types/environment/environmentPlanarReflection.d.ts +3 -0
- package/types/environment/environmentPresets.d.ts +171 -0
- package/types/environment/environmentRigs.d.ts +13 -0
- package/types/environment/environmentSettings.d.ts +161 -0
- package/types/environment/environmentShaderMaterials.d.ts +14 -0
- package/types/environment/environmentState.d.ts +6 -0
- package/types/environment/environmentSunShadowPass.d.ts +2 -0
- package/types/environment/environmentTextureResolver.d.ts +30 -0
- package/types/environment/environmentTimeOfDay.d.ts +25 -0
- package/types/environment/environmentVertexAo.d.ts +18 -0
- package/types/environment/index.d.ts +27 -0
- package/types/environment/manufacturedMaterialContract.d.ts +129 -0
- package/types/environment/manufacturedReflectionProvider.d.ts +3 -0
- package/types/environment/scanAssetStylize.d.ts +43 -0
- package/types/environment/surfaceMaterialModes.d.ts +14 -0
- package/types/environment/toonLabEnvironmentMaterials.d.ts +139 -0
- package/types/environment/toonLabMaterialPassCoupling.d.ts +7 -0
- package/types/environment/toonLabNormalIntegration.d.ts +29 -0
- package/types/environment/toonLabRockMaterialResolver.d.ts +270 -0
- package/types/environment/toonLabSourceDefaultLit.d.ts +136 -0
- package/types/environment/toonLabSourceLibrary.d.ts +19 -0
- package/types/environment/toonLabSourceMaterials.d.ts +14 -0
- package/types/environment/toonLabSourceSubsurfaceLighting.d.ts +85 -0
- package/types/environment/toonLabSourceTemporal.d.ts +20 -0
- package/types/environment/toonLabSurfaceLighting.d.ts +136 -0
- package/types/environment/toonLabTextureReadiness.d.ts +8 -0
- package/types/environment/toonLabTreeMaterials.d.ts +7 -0
- package/types/environment/transparentMaterialProfile.d.ts +76 -0
- package/types/environment/urbanPropMaterial.d.ts +25 -0
- package/types/ground-shader/groundPrintLayer.d.ts +4 -0
- package/types/ground-shader/groundShaderMaterial.d.ts +11 -0
- package/types/ground-shader/groundShaderSettings.d.ts +90 -0
- package/types/ground-shader/index.d.ts +3 -0
- package/types/index.d.ts +1502 -0
- package/types/lighting/callMeSenseiLightingContract.d.ts +14 -0
- package/types/lighting/colorIntensity.d.ts +44 -0
- package/types/lighting/index.d.ts +12 -0
- package/types/lighting/lightDescriptors.d.ts +803 -0
- package/types/lighting/lightingCapabilities.d.ts +85 -0
- package/types/lighting/lightingDocuments.d.ts +140 -0
- package/types/lighting/lightingFixtures.d.ts +171 -0
- package/types/lighting/lightingGenerator.d.ts +403 -0
- package/types/lighting/lightingPresets.d.ts +264 -0
- package/types/lighting/lightingRuntime.d.ts +401 -0
- package/types/lighting/lightingStyle.d.ts +156 -0
- package/types/lighting/lightingSystem.d.ts +433 -0
- package/types/lighting/toonLabExport.d.ts +46 -0
- package/types/lighting/utils.d.ts +18 -0
- package/types/loaders/index.d.ts +1 -0
- package/types/post/index.d.ts +2 -0
- package/types/post/postGenerator.d.ts +282 -0
- package/types/post/postProcessing.d.ts +16 -0
- package/types/react/index.d.ts +1765 -0
- package/types/renderer/index.d.ts +1 -0
- package/types/renderer/rendererConfiguration.d.ts +8 -0
- package/types/rock-shader/index.d.ts +3 -0
- package/types/rock-shader/rockMaterial.d.ts +18 -0
- package/types/rock-shader/rockShaderRuntime.d.ts +8 -0
- package/types/rock-shader/rockShaderSettings.d.ts +170 -0
- package/types/rockgen/export/glbExport.d.ts +58 -0
- package/types/rockgen/heightfield/heightfieldErosion.d.ts +10 -0
- package/types/rockgen/heightfield/heightfieldPatch.d.ts +15 -0
- package/types/rockgen/heightfield/stylizedErosionSim.d.ts +41 -0
- package/types/rockgen/index.d.ts +11 -0
- package/types/rockgen/lod/index.d.ts +6 -0
- package/types/rockgen/lod/rockLodMetrics.d.ts +62 -0
- package/types/rockgen/lod/rockLodPlanner.d.ts +86 -0
- package/types/rockgen/lod/rockLodPolicy.d.ts +76 -0
- package/types/rockgen/lod/rockLodRuntime.d.ts +95 -0
- package/types/rockgen/lod/rockLodSimplifier.d.ts +15 -0
- package/types/rockgen/lod/rockLodValidation.d.ts +16 -0
- package/types/rockgen/mesh/meshAttributes.d.ts +32 -0
- package/types/rockgen/mesh/meshDocument.d.ts +40 -0
- package/types/rockgen/mesh/surfaceNets.d.ts +42 -0
- package/types/rockgen/noise/cellularNoise3.d.ts +24 -0
- package/types/rockgen/noise/prng.d.ts +16 -0
- package/types/rockgen/noise/simplexNoise3.d.ts +2 -0
- package/types/rockgen/noise/valueNoise3.d.ts +12 -0
- package/types/rockgen/rockDocument.d.ts +215 -0
- package/types/rockgen/rockHelpers.d.ts +2 -0
- package/types/rockgen/rockgenPresets.d.ts +10 -0
- package/types/rockgen/rockgenSettings.d.ts +531 -0
- package/types/rockgen/sdf/fieldCompiler.d.ts +20 -0
- package/types/rockgen/sdf/sculptEdits.d.ts +30 -0
- package/types/rockgen/sdf/sdfModifiers.d.ts +19 -0
- package/types/rockgen/sdf/sdfOps.d.ts +8 -0
- package/types/rockgen/sdf/sdfPrimitives.d.ts +22 -0
- package/types/runtime/index.d.ts +3 -0
- package/types/runtime/sceneCollisionRuntime.d.ts +94 -0
- package/types/runtime/sceneSurfaceRuntime.d.ts +90 -0
- package/types/runtime/sceneUpdateScheduler.d.ts +28 -0
- package/types/shaders-tsl/anime.d.ts +9 -0
- package/types/shaders-tsl/chunks/character-color.d.ts +6 -0
- package/types/shaders-tsl/chunks/character-highlights.d.ts +12 -0
- package/types/shaders-tsl/chunks/character-lighting.d.ts +20 -0
- package/types/shaders-tsl/chunks/character-material-maps.d.ts +18 -0
- package/types/shaders-tsl/chunks/character-roles.d.ts +21 -0
- package/types/shaders-tsl/chunks/character-scene-lights.d.ts +48 -0
- package/types/shaders-tsl/chunks/character-shadow-color.d.ts +5 -0
- package/types/shaders-tsl/chunks/character-skinning.d.ts +23 -0
- package/types/shaders-tsl/chunks/environment-color.d.ts +9 -0
- package/types/shaders-tsl/chunks/environment-debug.d.ts +24 -0
- package/types/shaders-tsl/chunks/environment-ground-field.d.ts +40 -0
- package/types/shaders-tsl/chunks/environment-lighting.d.ts +22 -0
- package/types/shaders-tsl/chunks/environment-state.d.ts +42 -0
- package/types/shaders-tsl/chunks/environment-sun-shadow.d.ts +19 -0
- package/types/shaders-tsl/chunks/foliage-fog.d.ts +21 -0
- package/types/shaders-tsl/chunks/normalized-hue.d.ts +1 -0
- package/types/shaders-tsl/chunks/pass-depth-color.d.ts +20 -0
- package/types/shaders-tsl/chunks/projected-water-caustics.d.ts +24 -0
- package/types/shaders-tsl/chunks/scene-depth-color-pass.d.ts +39 -0
- package/types/shaders-tsl/chunks/stylized-cloud-shadow.d.ts +9 -0
- package/types/shaders-tsl/chunks/vegetation-style.d.ts +60 -0
- package/types/shaders-tsl/chunks/water-color.d.ts +15 -0
- package/types/shaders-tsl/chunks/water-common.d.ts +9 -0
- package/types/shaders-tsl/chunks/water-foam.d.ts +8 -0
- package/types/shaders-tsl/chunks/water-lighting.d.ts +9 -0
- package/types/shaders-tsl/chunks/water-ripple.d.ts +8 -0
- package/types/shaders-tsl/chunks/water-shore-state.d.ts +7 -0
- package/types/shaders-tsl/chunks/water-waves.d.ts +18 -0
- package/types/shaders-tsl/chunks/world-noise.d.ts +4 -0
- package/types/shaders-tsl/environment-ao-overlay.d.ts +5 -0
- package/types/shaders-tsl/environment.d.ts +34 -0
- package/types/shaders-tsl/flower.d.ts +6 -0
- package/types/shaders-tsl/grass.d.ts +4 -0
- package/types/shaders-tsl/post-composite.d.ts +25 -0
- package/types/shaders-tsl/sky.d.ts +4 -0
- package/types/shaders-tsl/tree-leaf.d.ts +2 -0
- package/types/shaders-tsl/water-breaker.d.ts +15 -0
- package/types/shaders-tsl/water-kelp.d.ts +5 -0
- package/types/shaders-tsl/water-rain.d.ts +10 -0
- package/types/shaders-tsl/water-shore-state-simulation.d.ts +12 -0
- package/types/shaders-tsl/water-simulation.d.ts +5 -0
- package/types/shaders-tsl/water-splash.d.ts +12 -0
- package/types/shaders-tsl/water.d.ts +22 -0
- package/types/shaders-tsl/woody-surface.d.ts +3 -0
- package/types/sky/atmosphereDome.d.ts +2 -0
- package/types/sky/atmosphereParams.d.ts +185 -0
- package/types/sky/atmosphereScattering.d.ts +11 -0
- package/types/sky/atmosphereSky.d.ts +2 -0
- package/types/sky/cloudShadow.d.ts +68 -0
- package/types/sky/godRays.d.ts +5 -0
- package/types/sky/index.d.ts +18 -0
- package/types/sky/nightSky.d.ts +22 -0
- package/types/sky/renderLayers.d.ts +59 -0
- package/types/sky/sceneOverrideLayers.d.ts +10 -0
- package/types/sky/skyColor.d.ts +704 -0
- package/types/sky/skyDayCycle.d.ts +86 -0
- package/types/sky/skyParams.d.ts +3407 -0
- package/types/sky/skyPresets.d.ts +160 -0
- package/types/sky/skyQuality.d.ts +21 -0
- package/types/sky/skyQualityTiers.d.ts +223 -0
- package/types/sky/skyShaderSettings.d.ts +152 -0
- package/types/sky/skyStyleSnapshots.d.ts +11 -0
- package/types/sky/skySystem.d.ts +3 -0
- package/types/sky/skyTimeKeyframes.d.ts +230 -0
- package/types/sky/stylizedSky.d.ts +341 -0
- package/types/sky/sunDriver.d.ts +15 -0
- package/types/sky/timeOfDay.d.ts +145 -0
- package/types/styles/animeGameProfile.d.ts +27 -0
- package/types/styles/index.d.ts +17 -0
- package/types/styles/manufacturedStyleLabeling.d.ts +119 -0
- package/types/styles/sceneLayerDocuments.d.ts +145 -0
- package/types/styles/sceneLookComposition.d.ts +53 -0
- package/types/styles/sceneQualityApplication.d.ts +34 -0
- package/types/styles/sceneQualityProfiles.d.ts +13 -0
- package/types/styles/sceneStyleAudit.d.ts +80 -0
- package/types/styles/sceneStyleRuntime.d.ts +1782 -0
- package/types/styles/styleAdapters.d.ts +14 -0
- package/types/styles/styleApplication.d.ts +47 -0
- package/types/styles/styleBundle.d.ts +19 -0
- package/types/styles/styleBundleProvider.d.ts +44 -0
- package/types/styles/styleDomains.d.ts +18 -0
- package/types/styles/styleInspector.d.ts +59 -0
- package/types/styles/styleMaterialContract.d.ts +46 -0
- package/types/styles/styleMetadata.d.ts +11 -0
- package/types/styles/styleTargetDiscovery.d.ts +48 -0
- package/types/styles/styleTargetLabels.d.ts +32 -0
- package/types/styles/styleTargetMaterialCoverage.d.ts +20 -0
- package/types/styles/styleTransaction.d.ts +10 -0
- package/types/styles/styleTypes.d.ts +66 -0
- package/types/texgen/evaluateTexture.d.ts +40 -0
- package/types/texgen/index.d.ts +7 -0
- package/types/texgen/noise2.d.ts +46 -0
- package/types/texgen/textureAi.d.ts +6 -0
- package/types/texgen/textureGenerators.d.ts +261 -0
- package/types/texgen/texturePresets.d.ts +45 -0
- package/types/texgen/textureSettings.d.ts +121 -0
- package/types/texgen/textureThree.d.ts +13 -0
- package/types/toon/characterRenderPasses.d.ts +3 -0
- package/types/toon/index.d.ts +3 -0
- package/types/toon/settings/alphaSettings.d.ts +125 -0
- package/types/toon/settings/averageShadowSettings.d.ts +39 -0
- package/types/toon/settings/baseTextureSettings.d.ts +39 -0
- package/types/toon/settings/celShadeSettings.d.ts +37 -0
- package/types/toon/settings/contactShadowSettings.d.ts +30 -0
- package/types/toon/settings/eyeHighlightSettings.d.ts +55 -0
- package/types/toon/settings/faceLightingSettings.d.ts +32 -0
- package/types/toon/settings/furSettings.d.ts +23 -0
- package/types/toon/settings/glitterSettings.d.ts +43 -0
- package/types/toon/settings/hairHighlightSettings.d.ts +89 -0
- package/types/toon/settings/indirectLightSettings.d.ts +43 -0
- package/types/toon/settings/localLightSettings.d.ts +46 -0
- package/types/toon/settings/materialMapSettings.d.ts +86 -0
- package/types/toon/settings/outlineSettings.d.ts +125 -0
- package/types/toon/settings/perspectiveRemovalSettings.d.ts +14 -0
- package/types/toon/settings/rimLightSettings.d.ts +79 -0
- package/types/toon/settings/sceneShadowSettings.d.ts +32 -0
- package/types/toon/settings/selfShadowSettings.d.ts +44 -0
- package/types/toon/settings/shadowColorSettings.d.ts +77 -0
- package/types/toon/settings/skinToneSettings.d.ts +30 -0
- package/types/toon/settings/specularSettings.d.ts +96 -0
- package/types/toon/settings/stickerSettings.d.ts +40 -0
- package/types/toon/toonMaterialAdapter.d.ts +883 -0
- package/types/toon/toonSettings.d.ts +1182 -0
- package/types/vegetation/branchTree.d.ts +10 -0
- package/types/vegetation/callMeSenseiGrass.d.ts +8 -0
- package/types/vegetation/compiledTree.d.ts +75 -0
- package/types/vegetation/contactShadowField.d.ts +26 -0
- package/types/vegetation/flowerSpecies.d.ts +107 -0
- package/types/vegetation/grass.d.ts +4 -0
- package/types/vegetation/grassClump.d.ts +7 -0
- package/types/vegetation/grassPalettes.d.ts +29 -0
- package/types/vegetation/importedVegetationMaterial.d.ts +13 -0
- package/types/vegetation/index.d.ts +216 -0
- package/types/vegetation/legacyTreePresets.d.ts +22 -0
- package/types/vegetation/scatter.d.ts +12 -0
- package/types/vegetation/stylizedBush.d.ts +2 -0
- package/types/vegetation/stylizedFlower.d.ts +2 -0
- package/types/vegetation/stylizedFlowers.d.ts +8 -0
- package/types/vegetation/stylizedForest.d.ts +3 -0
- package/types/vegetation/stylizedGrass.d.ts +21 -0
- package/types/vegetation/stylizedTree.d.ts +19 -0
- package/types/vegetation/stylizedTreeFoliage.d.ts +18 -0
- package/types/vegetation/stylizedUnderstory.d.ts +50 -0
- package/types/vegetation/treeExport.d.ts +6 -0
- package/types/vegetation/treeSurfaceTextures.d.ts +72 -0
- package/types/vegetation/vegetationShaders.d.ts +74 -0
- package/types/version.d.ts +1 -0
- package/types/water/index.d.ts +1 -0
- package/types/water/sceneOverrideLayers.d.ts +16 -0
- package/types/water/water.d.ts +17 -0
- package/types/water/waterBreakerSystem.d.ts +46 -0
- package/types/water/waterCurrentField.d.ts +115 -0
- package/types/water/waterInteraction.d.ts +21 -0
- package/types/water/waterMaterial.d.ts +60 -0
- package/types/water/waterNearshorePhase.d.ts +5 -0
- package/types/water/waterRain.d.ts +17 -0
- package/types/water/waterRippleSimulation.d.ts +52 -0
- package/types/water/waterScenePasses.d.ts +70 -0
- package/types/water/waterSettings.d.ts +648 -0
- package/types/water/waterShoreMaterial.d.ts +3 -0
- package/types/water/waterShoreStateField.d.ts +2 -0
- package/types/water/waterSplashSystem.d.ts +2 -0
- package/types/water/waterStageSettings.d.ts +9 -0
- package/types/water/waterSurface.d.ts +2 -0
- package/types/water/waterUnderwaterAtmosphere.d.ts +103 -0
- package/types/water/waterVegetation.d.ts +16 -0
- package/types/worldCollision.d.ts +22 -0
- package/AGENTS.md +0 -254
- package/ATTRIBUTION.md +0 -78
- package/docs/characters.md +0 -144
- package/docs/debug-panel.md +0 -126
- package/docs/docs.css +0 -589
- package/docs/environment.md +0 -186
- package/docs/getting-started.md +0 -180
- package/docs/index.html +0 -14
- package/docs/lab-architecture.md +0 -100
- package/docs/lighting.md +0 -825
- package/docs/main.jsx +0 -739
- package/docs/mcp.md +0 -97
- package/docs/post-processing.md +0 -98
- package/docs/settings-reference.md +0 -1878
- package/docs/shader-constants.md +0 -77
- package/docs/sky.md +0 -182
- package/docs/style-labs.md +0 -309
- package/docs/texture-lab.md +0 -135
- package/docs/toon-shading.md +0 -183
- package/docs/tsl-conventions.md +0 -167
- package/docs/vegetation-sky.md +0 -275
- package/docs/water.md +0 -430
- package/docs/weather.md +0 -200
- package/docs/world-scale.md +0 -111
- package/mcp/style-lab-tools.mjs +0 -371
- package/src/ambientfx/INTEGRATION.md +0 -164
- package/src/ambientfx/ambientFxPresets.js +0 -83
- package/src/ambientfx/ambientFxSettings.js +0 -368
- package/src/ambientfx/emitters.js +0 -169
- package/src/ambientfx/index.js +0 -5
- package/src/ambientfx/particleBackbone.js +0 -493
- package/src/ambientfx/stylizedAmbientFx.js +0 -450
- package/src/biome/biomeGenerator.js +0 -385
- package/src/biome/biomeRuntime.js +0 -299
- package/src/biome/index.js +0 -2
- package/src/buildinggen/buildingAsset.js +0 -44
- package/src/buildinggen/buildingGrammar.js +0 -311
- package/src/buildinggen/buildingMesh.js +0 -451
- package/src/buildinggen/buildingPresets.js +0 -46
- package/src/buildinggen/buildingRecipe.js +0 -100
- package/src/buildinggen/buildingSettings.js +0 -238
- package/src/buildinggen/index.js +0 -6
- package/src/camera/cameraDirector.js +0 -157
- package/src/camera/cameraGenerator.js +0 -367
- package/src/camera/cameraRig.js +0 -570
- package/src/camera/cameraSettings.js +0 -236
- package/src/camera/index.js +0 -7
- package/src/catalog/builtinEntries.js +0 -245
- package/src/catalog/catalog.js +0 -210
- package/src/catalog/index.js +0 -3
- package/src/core/shaderBackend.js +0 -24
- package/src/debrisgen/debrisFields.js +0 -544
- package/src/debrisgen/debrisGenerator.js +0 -1929
- package/src/debrisgen/debrisPalettes.js +0 -71
- package/src/debrisgen/debrisPhysics.js +0 -198
- package/src/debrisgen/debrisPresets.js +0 -162
- package/src/debrisgen/debrisSettings.js +0 -333
- package/src/debrisgen/debrisTextures.js +0 -380
- package/src/debrisgen/index.js +0 -5
- package/src/debug/fieldValues.js +0 -95
- package/src/debug/index.js +0 -7
- package/src/debug/settingsPanel.js +0 -170
- package/src/fauna/INTEGRATION.md +0 -174
- package/src/fauna/boids.js +0 -861
- package/src/fauna/faunaBodies.js +0 -492
- package/src/fauna/faunaPresets.js +0 -52
- package/src/fauna/faunaSettings.js +0 -525
- package/src/fauna/index.js +0 -5
- package/src/fauna/stylizedFauna.js +0 -395
- package/src/game-feel/gameFeelGenerator.js +0 -402
- package/src/game-feel/gameFeelRuntime.js +0 -549
- package/src/game-feel/index.js +0 -2
- package/src/motion/index.js +0 -5
- package/src/motion/motionClip.js +0 -441
- package/src/motion/motionController.js +0 -628
- package/src/motion/motionDocuments.js +0 -225
- package/src/motion/motionGraph.js +0 -307
- package/src/motion/motionSettings.js +0 -222
- package/src/pathgen/index.js +0 -7
- package/src/pathgen/pathBridge.js +0 -232
- package/src/pathgen/pathPresets.js +0 -35
- package/src/pathgen/pathRibbon.js +0 -410
- package/src/pathgen/pathRouter.js +0 -380
- package/src/pathgen/pathSettings.js +0 -335
- package/src/pathgen/pathTextures.js +0 -123
- package/src/pathgen/stylizedPaths.js +0 -453
- package/src/propgen/generatorsWave1.js +0 -379
- package/src/propgen/generatorsWave2.js +0 -462
- package/src/propgen/index.js +0 -5
- package/src/propgen/propAsset.js +0 -323
- package/src/propgen/propParts.js +0 -170
- package/src/propgen/propPlacement.js +0 -459
- package/src/propgen/propPresets.js +0 -82
- package/src/propgen/propSettings.js +0 -395
- package/src/soundscape/index.js +0 -4
- package/src/soundscape/soundscapeGenerator.js +0 -179
- package/src/soundscape/soundscapeRuntime.js +0 -806
- package/src/soundscape/soundscapeSettings.js +0 -292
- package/src/stylizedTerrain.js +0 -631
- package/src/stylizedWorld.js +0 -903
- package/src/vegetation/treeRecipe.js +0 -647
- package/src/vfxgen/INTEGRATION.md +0 -145
- package/src/vfxgen/core/burstBackbone.js +0 -380
- package/src/vfxgen/core/projectileCore.js +0 -92
- package/src/vfxgen/core/spriteShapes.js +0 -98
- package/src/vfxgen/core/trailRibbon.js +0 -272
- package/src/vfxgen/core/vfxRandom.js +0 -29
- package/src/vfxgen/effects/emitHelpers.js +0 -37
- package/src/vfxgen/effects/magicEffects.js +0 -162
- package/src/vfxgen/effects/movementEffects.js +0 -87
- package/src/vfxgen/effects/weaponEffects.js +0 -118
- package/src/vfxgen/index.js +0 -18
- package/src/vfxgen/moves/moveController.js +0 -146
- package/src/vfxgen/moves/moveLibrary.js +0 -335
- package/src/vfxgen/vfxPresets.js +0 -98
- package/src/vfxgen/vfxSettings.js +0 -384
- package/src/vfxgen/vfxSystem.js +0 -449
- package/src/vfxgen/weapons/stylizedWeapons.js +0 -137
- package/src/villagegen/index.js +0 -4
- package/src/villagegen/stylizedVillage.js +0 -490
- package/src/villagegen/villageArchetypes.js +0 -160
- package/src/villagegen/villageNames.js +0 -40
- package/src/villagegen/villageSites.js +0 -105
- package/src/weather/index.js +0 -6
- package/src/weather/weatherPrecipitation.js +0 -221
- package/src/weather/weatherPresets.js +0 -258
- package/src/weather/weatherSettings.js +0 -269
- package/src/weather/weatherSystem.js +0 -871
- package/src/worldMinimap.js +0 -214
- package/src/worldPresets.js +0 -125
|
@@ -0,0 +1,869 @@
|
|
|
1
|
+
// Public, portable configuration contract for the reusable rock shader.
|
|
2
|
+
// Rock geometry, geological asset identity, seed, LODs, collision, and current
|
|
3
|
+
// scene conditions remain outside this document.
|
|
4
|
+
|
|
5
|
+
import { isProtectedSystemStyleId } from '../core/systemStylePolicy.js';
|
|
6
|
+
|
|
7
|
+
export const ROCK_SHADER_DOCUMENT_TYPE = 'toonlab/rock-shader-preset';
|
|
8
|
+
export const ROCK_SHADER_SCHEMA_VERSION = 1;
|
|
9
|
+
export const DEFAULT_ROCK_SHADER_PRESET = 'call_me_sensei';
|
|
10
|
+
|
|
11
|
+
const ALL_FIELDS_SERIALIZABLE = true;
|
|
12
|
+
|
|
13
|
+
function field({
|
|
14
|
+
defaultValue,
|
|
15
|
+
description,
|
|
16
|
+
label,
|
|
17
|
+
options = null,
|
|
18
|
+
range = null,
|
|
19
|
+
type = 'number',
|
|
20
|
+
}) {
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
defaultValue: Array.isArray(defaultValue) ? Object.freeze([...defaultValue]) : defaultValue,
|
|
23
|
+
description,
|
|
24
|
+
label,
|
|
25
|
+
options: options ? Object.freeze([...options]) : null,
|
|
26
|
+
range: range ? Object.freeze({ ...range }) : null,
|
|
27
|
+
serializable: ALL_FIELDS_SERIALIZABLE,
|
|
28
|
+
type,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const GROUP_DEFINITIONS = Object.freeze({
|
|
33
|
+
projection: Object.freeze({
|
|
34
|
+
description: 'World-space base projection and graphic texture treatment.',
|
|
35
|
+
label: 'Base Projection',
|
|
36
|
+
fields: Object.freeze({
|
|
37
|
+
scale: field({
|
|
38
|
+
defaultValue: 1.6,
|
|
39
|
+
description: 'World-space size of the projected rock texture in meters.',
|
|
40
|
+
label: 'Texture Scale',
|
|
41
|
+
range: { max: 256, min: 0.05, step: 0.05 },
|
|
42
|
+
}),
|
|
43
|
+
saturation: field({
|
|
44
|
+
defaultValue: 0.78,
|
|
45
|
+
description: 'Saturation retained from the projected base texture.',
|
|
46
|
+
label: 'Saturation',
|
|
47
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
48
|
+
}),
|
|
49
|
+
contrast: field({
|
|
50
|
+
defaultValue: 1.12,
|
|
51
|
+
description: 'Contrast around the rock projection midpoint.',
|
|
52
|
+
label: 'Contrast',
|
|
53
|
+
range: { max: 3, min: 0, step: 0.01 },
|
|
54
|
+
}),
|
|
55
|
+
brightness: field({
|
|
56
|
+
defaultValue: 0.015,
|
|
57
|
+
description: 'Linear brightness offset applied after saturation and contrast.',
|
|
58
|
+
label: 'Brightness',
|
|
59
|
+
range: { max: 1, min: -1, step: 0.005 },
|
|
60
|
+
}),
|
|
61
|
+
projectionContrast: field({
|
|
62
|
+
defaultValue: 0.62,
|
|
63
|
+
description: 'Sharpness of the triplanar blend between projection axes.',
|
|
64
|
+
label: 'Projection Contrast',
|
|
65
|
+
range: { max: 4, min: 0.05, step: 0.01 },
|
|
66
|
+
}),
|
|
67
|
+
sideOnly: field({
|
|
68
|
+
defaultValue: false,
|
|
69
|
+
description: 'Restricts the base projection to side-oriented axes.',
|
|
70
|
+
label: 'Side Projection Only',
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
}),
|
|
73
|
+
nearDetailScale: field({
|
|
74
|
+
defaultValue: 1.4,
|
|
75
|
+
description: 'World-space size of the close-range detail octave in meters.',
|
|
76
|
+
label: 'Near Detail Scale',
|
|
77
|
+
range: { max: 32, min: 0.05, step: 0.05 },
|
|
78
|
+
}),
|
|
79
|
+
nearDetailStrength: field({
|
|
80
|
+
defaultValue: 0.24,
|
|
81
|
+
description: 'Strength of close-range geological value breakup.',
|
|
82
|
+
label: 'Near Detail Strength',
|
|
83
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
84
|
+
}),
|
|
85
|
+
nearDetailDistance: field({
|
|
86
|
+
defaultValue: 55,
|
|
87
|
+
description: 'Camera distance in meters over which the close-range detail octave fades out.',
|
|
88
|
+
label: 'Near Detail Distance',
|
|
89
|
+
range: { max: 2000, min: 0.1, step: 1 },
|
|
90
|
+
}),
|
|
91
|
+
}),
|
|
92
|
+
}),
|
|
93
|
+
material: Object.freeze({
|
|
94
|
+
description: 'Shared stone tint and physically based response.',
|
|
95
|
+
label: 'Material Response',
|
|
96
|
+
fields: Object.freeze({
|
|
97
|
+
tint: field({
|
|
98
|
+
defaultValue: [0.92, 0.88, 0.8],
|
|
99
|
+
description: 'IP-wide stone tint multiplied over asset color and projected detail.',
|
|
100
|
+
label: 'Stone Tint',
|
|
101
|
+
type: 'color',
|
|
102
|
+
}),
|
|
103
|
+
metallic: field({
|
|
104
|
+
defaultValue: 0,
|
|
105
|
+
description: 'Metallic response of ordinary rock surfaces.',
|
|
106
|
+
label: 'Metallic',
|
|
107
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
108
|
+
}),
|
|
109
|
+
smoothness: field({
|
|
110
|
+
defaultValue: 0.08,
|
|
111
|
+
description: 'Base smoothness before top-layer masking and wetness.',
|
|
112
|
+
label: 'Smoothness',
|
|
113
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
114
|
+
}),
|
|
115
|
+
useSmoothnessTexture: field({
|
|
116
|
+
defaultValue: false,
|
|
117
|
+
description: 'Reads the optional smoothness texture instead of a constant source.',
|
|
118
|
+
label: 'Use Smoothness Texture',
|
|
119
|
+
type: 'boolean',
|
|
120
|
+
}),
|
|
121
|
+
smoothnessContrast: field({
|
|
122
|
+
defaultValue: 1,
|
|
123
|
+
description: 'Contrast applied to the optional smoothness texture.',
|
|
124
|
+
label: 'Smoothness Contrast',
|
|
125
|
+
range: { max: 4, min: 0, step: 0.01 },
|
|
126
|
+
}),
|
|
127
|
+
emissiveStrength: field({
|
|
128
|
+
defaultValue: 0,
|
|
129
|
+
description: 'Base emission multiplier for deliberately luminous stone styles.',
|
|
130
|
+
label: 'Emission',
|
|
131
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
132
|
+
}),
|
|
133
|
+
}),
|
|
134
|
+
}),
|
|
135
|
+
lighting: Object.freeze({
|
|
136
|
+
description: 'Rock-specific exposure and shaded-face readability under the current scene lighting.',
|
|
137
|
+
label: 'Shared Lighting',
|
|
138
|
+
fields: Object.freeze({
|
|
139
|
+
exposure: field({
|
|
140
|
+
defaultValue: 1,
|
|
141
|
+
description: 'HDR albedo exposure before scene lighting and tone mapping.',
|
|
142
|
+
label: 'Exposure',
|
|
143
|
+
range: { max: 4, min: 0, step: 0.01 },
|
|
144
|
+
}),
|
|
145
|
+
ambientFloor: field({
|
|
146
|
+
defaultValue: 0.04,
|
|
147
|
+
description: 'Albedo-relative indirect floor that keeps downward-facing overhangs readable.',
|
|
148
|
+
label: 'Ambient Floor',
|
|
149
|
+
range: { max: 0.4, min: 0, step: 0.005 },
|
|
150
|
+
}),
|
|
151
|
+
skyFillStrength: field({
|
|
152
|
+
defaultValue: 1,
|
|
153
|
+
description: 'Rock-specific strength of the scene sky probe; direct sunlight is unchanged.',
|
|
154
|
+
label: 'Sky Fill Strength',
|
|
155
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
156
|
+
}),
|
|
157
|
+
skyFillTint: field({
|
|
158
|
+
defaultValue: [1, 1, 1],
|
|
159
|
+
description: 'Rock-specific RGB weighting for indirect sky light and blue back-shadow separation.',
|
|
160
|
+
label: 'Sky Fill Tint',
|
|
161
|
+
type: 'color',
|
|
162
|
+
}),
|
|
163
|
+
}),
|
|
164
|
+
}),
|
|
165
|
+
shoreline: Object.freeze({
|
|
166
|
+
description: 'Portable wet-rock response around the current scene water level.',
|
|
167
|
+
label: 'Shoreline Response',
|
|
168
|
+
fields: Object.freeze({
|
|
169
|
+
wetBandWidth: field({
|
|
170
|
+
defaultValue: 0.8,
|
|
171
|
+
description: 'Meters around the current water level that receive the wet-rock treatment.',
|
|
172
|
+
label: 'Wet Band Width',
|
|
173
|
+
range: { max: 20, min: 0, step: 0.05 },
|
|
174
|
+
}),
|
|
175
|
+
wetBandDarkening: field({
|
|
176
|
+
defaultValue: 0.22,
|
|
177
|
+
description: 'Maximum albedo darkening inside the wet band.',
|
|
178
|
+
label: 'Wet Band Darkening',
|
|
179
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
180
|
+
}),
|
|
181
|
+
wetRoughness: field({
|
|
182
|
+
defaultValue: 0.26,
|
|
183
|
+
description: 'Roughness approached inside the wet band.',
|
|
184
|
+
label: 'Wet Roughness',
|
|
185
|
+
range: { max: 1, min: 0.02, step: 0.01 },
|
|
186
|
+
}),
|
|
187
|
+
}),
|
|
188
|
+
}),
|
|
189
|
+
distanceTint: Object.freeze({
|
|
190
|
+
description: 'Distance color recession shared by rocks, cliffs, and mountains.',
|
|
191
|
+
label: 'Distance Tint',
|
|
192
|
+
fields: Object.freeze({
|
|
193
|
+
closeDistance: field({
|
|
194
|
+
defaultValue: 18,
|
|
195
|
+
description: 'World distance where the far tint begins.',
|
|
196
|
+
label: 'Start Distance',
|
|
197
|
+
range: { max: 2000, min: 0, step: 1 },
|
|
198
|
+
}),
|
|
199
|
+
farDistance: field({
|
|
200
|
+
defaultValue: 140,
|
|
201
|
+
description: 'World distance where the far tint reaches full strength.',
|
|
202
|
+
label: 'End Distance',
|
|
203
|
+
range: { max: 50000, min: 0.1, step: 1 },
|
|
204
|
+
}),
|
|
205
|
+
color: field({
|
|
206
|
+
defaultValue: [0.55, 0.62, 0.66],
|
|
207
|
+
description: 'Atmospheric stone tint used at long distance.',
|
|
208
|
+
label: 'Far Color',
|
|
209
|
+
type: 'color',
|
|
210
|
+
}),
|
|
211
|
+
strength: field({
|
|
212
|
+
defaultValue: 0.28,
|
|
213
|
+
description: 'Maximum blend toward the far-distance tint.',
|
|
214
|
+
label: 'Strength',
|
|
215
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
216
|
+
}),
|
|
217
|
+
}),
|
|
218
|
+
}),
|
|
219
|
+
normals: Object.freeze({
|
|
220
|
+
description: 'Near and far normal-detail behavior.',
|
|
221
|
+
label: 'Normal Detail',
|
|
222
|
+
fields: Object.freeze({
|
|
223
|
+
distance: field({
|
|
224
|
+
defaultValue: 75,
|
|
225
|
+
description: 'Distance over which projected normal detail fades.',
|
|
226
|
+
label: 'Fade Distance',
|
|
227
|
+
range: { max: 50000, min: 0.1, step: 1 },
|
|
228
|
+
}),
|
|
229
|
+
nearFlatten: field({
|
|
230
|
+
defaultValue: 0.08,
|
|
231
|
+
description: 'Amount of projected normal flattening near the camera.',
|
|
232
|
+
label: 'Near Flatten',
|
|
233
|
+
range: { max: 1.5, min: -0.5, step: 0.01 },
|
|
234
|
+
}),
|
|
235
|
+
farFlatten: field({
|
|
236
|
+
defaultValue: 0.75,
|
|
237
|
+
description: 'Amount of projected normal flattening at the fade distance.',
|
|
238
|
+
label: 'Far Flatten',
|
|
239
|
+
range: { max: 1.5, min: -0.5, step: 0.01 },
|
|
240
|
+
}),
|
|
241
|
+
useSmoothed: field({
|
|
242
|
+
defaultValue: false,
|
|
243
|
+
description: 'Uses an optional authored smoothed-normal texture as the base normal.',
|
|
244
|
+
label: 'Use Smoothed Normal',
|
|
245
|
+
type: 'boolean',
|
|
246
|
+
}),
|
|
247
|
+
normalGreenSign: field({
|
|
248
|
+
defaultValue: 1,
|
|
249
|
+
description: 'Normal-map green-channel convention: 1 retains Y, -1 flips it.',
|
|
250
|
+
label: 'Normal Y Convention',
|
|
251
|
+
options: [-1, 1],
|
|
252
|
+
type: 'select',
|
|
253
|
+
}),
|
|
254
|
+
}),
|
|
255
|
+
}),
|
|
256
|
+
striping: Object.freeze({
|
|
257
|
+
description: 'Optional graphic sediment or mineral striping over side faces.',
|
|
258
|
+
label: 'Striping',
|
|
259
|
+
fields: Object.freeze({
|
|
260
|
+
enabled: field({
|
|
261
|
+
defaultValue: false,
|
|
262
|
+
description: 'Enables the optional side-projected stripe layer.',
|
|
263
|
+
label: 'Enabled',
|
|
264
|
+
type: 'boolean',
|
|
265
|
+
}),
|
|
266
|
+
scale: field({
|
|
267
|
+
defaultValue: 3.5,
|
|
268
|
+
description: 'World-space size of the stripe texture.',
|
|
269
|
+
label: 'Scale',
|
|
270
|
+
range: { max: 5000, min: 0.05, step: 0.05 },
|
|
271
|
+
}),
|
|
272
|
+
contrast: field({
|
|
273
|
+
defaultValue: 0.8,
|
|
274
|
+
description: 'Contrast of the stripe opacity mask.',
|
|
275
|
+
label: 'Contrast',
|
|
276
|
+
range: { max: 4, min: 0, step: 0.01 },
|
|
277
|
+
}),
|
|
278
|
+
color: field({
|
|
279
|
+
defaultValue: [0.65, 0.48, 0.3],
|
|
280
|
+
description: 'Graphic color overlaid through the stripe mask.',
|
|
281
|
+
label: 'Color',
|
|
282
|
+
type: 'color',
|
|
283
|
+
}),
|
|
284
|
+
}),
|
|
285
|
+
}),
|
|
286
|
+
moss: Object.freeze({
|
|
287
|
+
description: 'Slope-aware moss treatment; current climate coverage remains scene-owned.',
|
|
288
|
+
label: 'Moss Response',
|
|
289
|
+
fields: Object.freeze({
|
|
290
|
+
enabled: field({
|
|
291
|
+
defaultValue: true,
|
|
292
|
+
description: 'Enables the style capability for slope-aware moss.',
|
|
293
|
+
label: 'Enabled',
|
|
294
|
+
type: 'boolean',
|
|
295
|
+
}),
|
|
296
|
+
size: field({
|
|
297
|
+
defaultValue: 2.4,
|
|
298
|
+
description: 'World-space size of the projected moss pattern.',
|
|
299
|
+
label: 'Pattern Size',
|
|
300
|
+
range: { max: 50, min: 0.05, step: 0.05 },
|
|
301
|
+
}),
|
|
302
|
+
sharpness: field({
|
|
303
|
+
defaultValue: 2.4,
|
|
304
|
+
description: 'Sharpness of the upward-facing moss slope mask.',
|
|
305
|
+
label: 'Slope Sharpness',
|
|
306
|
+
range: { max: 8, min: 0, step: 0.01 },
|
|
307
|
+
}),
|
|
308
|
+
offset: field({
|
|
309
|
+
defaultValue: 0.35,
|
|
310
|
+
description: 'Upward-normal threshold where moss begins.',
|
|
311
|
+
label: 'Slope Offset',
|
|
312
|
+
range: { max: 1, min: -1, step: 0.01 },
|
|
313
|
+
}),
|
|
314
|
+
multiply: field({
|
|
315
|
+
defaultValue: 1.6,
|
|
316
|
+
description: 'Strength of the projected moss coverage pattern.',
|
|
317
|
+
label: 'Coverage Gain',
|
|
318
|
+
range: { max: 6, min: 0, step: 0.01 },
|
|
319
|
+
}),
|
|
320
|
+
colorPower: field({
|
|
321
|
+
defaultValue: 1.25,
|
|
322
|
+
description: 'Contrast curve applied to the moss texture color.',
|
|
323
|
+
label: 'Color Power',
|
|
324
|
+
range: { max: 6, min: 0.1, step: 0.01 },
|
|
325
|
+
}),
|
|
326
|
+
lowColor: field({
|
|
327
|
+
defaultValue: [0.18, 0.28, 0.09],
|
|
328
|
+
description: 'Dark end of the shared moss color range.',
|
|
329
|
+
label: 'Low Color',
|
|
330
|
+
type: 'color',
|
|
331
|
+
}),
|
|
332
|
+
highColor: field({
|
|
333
|
+
defaultValue: [0.42, 0.55, 0.2],
|
|
334
|
+
description: 'Light end of the shared moss color range.',
|
|
335
|
+
label: 'High Color',
|
|
336
|
+
type: 'color',
|
|
337
|
+
}),
|
|
338
|
+
}),
|
|
339
|
+
}),
|
|
340
|
+
layerMask: Object.freeze({
|
|
341
|
+
description: 'Shared upward-facing mask for geological top layers.',
|
|
342
|
+
label: 'Top-Layer Mask',
|
|
343
|
+
fields: Object.freeze({
|
|
344
|
+
useAssetMask: field({
|
|
345
|
+
defaultValue: true,
|
|
346
|
+
description: 'Multiplies the slope mask by an optional asset-authored top mask.',
|
|
347
|
+
label: 'Use Asset Mask',
|
|
348
|
+
type: 'boolean',
|
|
349
|
+
}),
|
|
350
|
+
sharpness: field({
|
|
351
|
+
defaultValue: 2.3,
|
|
352
|
+
description: 'Sharpness of the shared upward-facing layer transition.',
|
|
353
|
+
label: 'Sharpness',
|
|
354
|
+
range: { max: 8, min: 0, step: 0.01 },
|
|
355
|
+
}),
|
|
356
|
+
offset: field({
|
|
357
|
+
defaultValue: 0.42,
|
|
358
|
+
description: 'Upward-normal threshold where top layers begin.',
|
|
359
|
+
label: 'Slope Offset',
|
|
360
|
+
range: { max: 1, min: -1, step: 0.01 },
|
|
361
|
+
}),
|
|
362
|
+
}),
|
|
363
|
+
}),
|
|
364
|
+
grassLayer: Object.freeze({
|
|
365
|
+
description: 'Optional authored grass-over-rock layer, separate from current weather.',
|
|
366
|
+
label: 'Grass Layer',
|
|
367
|
+
fields: Object.freeze({
|
|
368
|
+
enabled: field({
|
|
369
|
+
defaultValue: false,
|
|
370
|
+
description: 'Enables grass texture projection on the shared top-layer mask.',
|
|
371
|
+
label: 'Enabled',
|
|
372
|
+
type: 'boolean',
|
|
373
|
+
}),
|
|
374
|
+
useGroundShader: field({
|
|
375
|
+
defaultValue: false,
|
|
376
|
+
description: 'Uses the environment ground field for the grass cap color and surface response.',
|
|
377
|
+
label: 'Match Ground Shader',
|
|
378
|
+
type: 'boolean',
|
|
379
|
+
}),
|
|
380
|
+
scale: field({
|
|
381
|
+
defaultValue: 1.8,
|
|
382
|
+
description: 'World-space size of the projected grass texture.',
|
|
383
|
+
label: 'Scale',
|
|
384
|
+
range: { max: 50, min: 0.05, step: 0.05 },
|
|
385
|
+
}),
|
|
386
|
+
tint: field({
|
|
387
|
+
defaultValue: [0.65, 0.78, 0.42],
|
|
388
|
+
description: 'Style tint multiplied over the grass layer.',
|
|
389
|
+
label: 'Tint',
|
|
390
|
+
type: 'color',
|
|
391
|
+
}),
|
|
392
|
+
saturation: field({
|
|
393
|
+
defaultValue: 0.8,
|
|
394
|
+
description: 'Saturation retained from the grass texture.',
|
|
395
|
+
label: 'Saturation',
|
|
396
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
397
|
+
}),
|
|
398
|
+
emission: field({
|
|
399
|
+
defaultValue: 0,
|
|
400
|
+
description: 'Emission multiplier for the grass layer.',
|
|
401
|
+
label: 'Emission',
|
|
402
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
403
|
+
}),
|
|
404
|
+
}),
|
|
405
|
+
}),
|
|
406
|
+
snowLayer: Object.freeze({
|
|
407
|
+
description: 'Authored snow response; the current snow amount remains runtime state.',
|
|
408
|
+
label: 'Snow Layer',
|
|
409
|
+
fields: Object.freeze({
|
|
410
|
+
enabled: field({
|
|
411
|
+
defaultValue: false,
|
|
412
|
+
description: 'Enables the material capability for a snow top layer.',
|
|
413
|
+
label: 'Enabled',
|
|
414
|
+
type: 'boolean',
|
|
415
|
+
}),
|
|
416
|
+
scale: field({
|
|
417
|
+
defaultValue: 2,
|
|
418
|
+
description: 'World-space size of the projected snow texture.',
|
|
419
|
+
label: 'Scale',
|
|
420
|
+
range: { max: 50, min: 0.05, step: 0.05 },
|
|
421
|
+
}),
|
|
422
|
+
tint: field({
|
|
423
|
+
defaultValue: [0.9, 0.95, 1],
|
|
424
|
+
description: 'Shared snow tint.',
|
|
425
|
+
label: 'Tint',
|
|
426
|
+
type: 'color',
|
|
427
|
+
}),
|
|
428
|
+
saturation: field({
|
|
429
|
+
defaultValue: 0.3,
|
|
430
|
+
description: 'Saturation retained from the snow texture.',
|
|
431
|
+
label: 'Saturation',
|
|
432
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
433
|
+
}),
|
|
434
|
+
emission: field({
|
|
435
|
+
defaultValue: 0,
|
|
436
|
+
description: 'Emission multiplier for the snow layer.',
|
|
437
|
+
label: 'Emission',
|
|
438
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
439
|
+
}),
|
|
440
|
+
}),
|
|
441
|
+
}),
|
|
442
|
+
sandLayer: Object.freeze({
|
|
443
|
+
description: 'Optional authored sand-over-rock layer and its normal response.',
|
|
444
|
+
label: 'Sand Layer',
|
|
445
|
+
fields: Object.freeze({
|
|
446
|
+
enabled: field({
|
|
447
|
+
defaultValue: false,
|
|
448
|
+
description: 'Enables sand projection on the shared top-layer mask.',
|
|
449
|
+
label: 'Enabled',
|
|
450
|
+
type: 'boolean',
|
|
451
|
+
}),
|
|
452
|
+
useGroundShader: field({
|
|
453
|
+
defaultValue: false,
|
|
454
|
+
description: 'Uses the environment ground field for the sand cap color and surface response.',
|
|
455
|
+
label: 'Match Ground Shader',
|
|
456
|
+
type: 'boolean',
|
|
457
|
+
}),
|
|
458
|
+
scale: field({
|
|
459
|
+
defaultValue: 1.5,
|
|
460
|
+
description: 'World-space size of the projected sand texture.',
|
|
461
|
+
label: 'Scale',
|
|
462
|
+
range: { max: 50, min: 0.05, step: 0.05 },
|
|
463
|
+
}),
|
|
464
|
+
tint: field({
|
|
465
|
+
defaultValue: [0.82, 0.65, 0.4],
|
|
466
|
+
description: 'Style tint multiplied over the sand layer.',
|
|
467
|
+
label: 'Tint',
|
|
468
|
+
type: 'color',
|
|
469
|
+
}),
|
|
470
|
+
saturation: field({
|
|
471
|
+
defaultValue: 0.65,
|
|
472
|
+
description: 'Saturation retained from the sand texture.',
|
|
473
|
+
label: 'Saturation',
|
|
474
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
475
|
+
}),
|
|
476
|
+
emission: field({
|
|
477
|
+
defaultValue: 0,
|
|
478
|
+
description: 'Emission multiplier for the sand layer.',
|
|
479
|
+
label: 'Emission',
|
|
480
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
481
|
+
}),
|
|
482
|
+
normalScale: field({
|
|
483
|
+
defaultValue: 1.5,
|
|
484
|
+
description: 'World-space size of the projected sand normal.',
|
|
485
|
+
label: 'Normal Scale',
|
|
486
|
+
range: { max: 50, min: 0.05, step: 0.05 },
|
|
487
|
+
}),
|
|
488
|
+
normalStrength: field({
|
|
489
|
+
defaultValue: 0.35,
|
|
490
|
+
description: 'Strength of the sand-layer normal.',
|
|
491
|
+
label: 'Normal Strength',
|
|
492
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
493
|
+
}),
|
|
494
|
+
normalRotationDegrees: field({
|
|
495
|
+
defaultValue: 30,
|
|
496
|
+
description: 'Rotation of the sand normal projection in degrees.',
|
|
497
|
+
label: 'Normal Rotation',
|
|
498
|
+
range: { max: 180, min: -180, step: 1 },
|
|
499
|
+
}),
|
|
500
|
+
}),
|
|
501
|
+
}),
|
|
502
|
+
assetIntegration: Object.freeze({
|
|
503
|
+
description: 'How stable asset-authored channels participate in the shared shader.',
|
|
504
|
+
label: 'Asset Integration',
|
|
505
|
+
fields: Object.freeze({
|
|
506
|
+
sourceAlbedoMode: field({
|
|
507
|
+
defaultValue: 'replace',
|
|
508
|
+
description: 'Replace gives the strongest cross-library consistency; Blend admits a controlled amount of the imported texture; Retain uses it as the projected base.',
|
|
509
|
+
label: 'Source Albedo',
|
|
510
|
+
options: ['replace', 'blend', 'retain'],
|
|
511
|
+
type: 'select',
|
|
512
|
+
}),
|
|
513
|
+
sourceAlbedoStrength: field({
|
|
514
|
+
defaultValue: 0.2,
|
|
515
|
+
description: 'Imported-albedo influence when Source Albedo is Blend. Ignored by Replace and Retain.',
|
|
516
|
+
label: 'Albedo Blend',
|
|
517
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
518
|
+
}),
|
|
519
|
+
sourceNormalStrength: field({
|
|
520
|
+
defaultValue: 1,
|
|
521
|
+
description: 'Influence of the imported tangent-space normal map. Independent from albedo replacement so authored cracks and erosion survive strict styling.',
|
|
522
|
+
label: 'Source Normal Strength',
|
|
523
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
524
|
+
}),
|
|
525
|
+
sourceAoStrength: field({
|
|
526
|
+
defaultValue: 1,
|
|
527
|
+
description: 'Influence of the imported AO or ORM red channel in creases and cavities. Independent from source color.',
|
|
528
|
+
label: 'Source AO Strength',
|
|
529
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
530
|
+
}),
|
|
531
|
+
vertexColorStrength: field({
|
|
532
|
+
defaultValue: 0.8,
|
|
533
|
+
description: 'Influence of asset-authored vertex color over projected rock detail.',
|
|
534
|
+
label: 'Vertex Color Strength',
|
|
535
|
+
range: { max: 1, min: 0, step: 0.01 },
|
|
536
|
+
}),
|
|
537
|
+
vertexAoStrength: field({
|
|
538
|
+
defaultValue: 1,
|
|
539
|
+
description: 'Influence of the asset-authored envVertexAo channel.',
|
|
540
|
+
label: 'Vertex AO Strength',
|
|
541
|
+
range: { max: 2, min: 0, step: 0.01 },
|
|
542
|
+
}),
|
|
543
|
+
}),
|
|
544
|
+
}),
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
export const ROCK_SHADER_SETTING_GROUPS = Object.freeze(
|
|
548
|
+
Object.entries(GROUP_DEFINITIONS).map(([id, group]) => Object.freeze({
|
|
549
|
+
description: group.description,
|
|
550
|
+
id,
|
|
551
|
+
label: group.label,
|
|
552
|
+
})),
|
|
553
|
+
);
|
|
554
|
+
|
|
555
|
+
export const ROCK_SHADER_FIELD_SCHEMA = Object.freeze(Object.fromEntries(
|
|
556
|
+
Object.entries(GROUP_DEFINITIONS).map(([groupId, group]) => [
|
|
557
|
+
groupId,
|
|
558
|
+
Object.freeze(Object.fromEntries(
|
|
559
|
+
Object.entries(group.fields).map(([key, metadata]) => [
|
|
560
|
+
key,
|
|
561
|
+
Object.freeze({
|
|
562
|
+
...metadata,
|
|
563
|
+
group: groupId,
|
|
564
|
+
id: `${groupId}.${key}`,
|
|
565
|
+
key,
|
|
566
|
+
}),
|
|
567
|
+
]),
|
|
568
|
+
)),
|
|
569
|
+
]),
|
|
570
|
+
));
|
|
571
|
+
|
|
572
|
+
export const DEFAULT_ROCK_SHADER_SETTINGS = Object.freeze(Object.fromEntries(
|
|
573
|
+
Object.entries(GROUP_DEFINITIONS).map(([groupId, group]) => [
|
|
574
|
+
groupId,
|
|
575
|
+
Object.freeze(Object.fromEntries(
|
|
576
|
+
Object.entries(group.fields).map(([key, metadata]) => [
|
|
577
|
+
key,
|
|
578
|
+
Array.isArray(metadata.defaultValue)
|
|
579
|
+
? Object.freeze([...metadata.defaultValue])
|
|
580
|
+
: metadata.defaultValue,
|
|
581
|
+
]),
|
|
582
|
+
)),
|
|
583
|
+
]),
|
|
584
|
+
));
|
|
585
|
+
|
|
586
|
+
// Independently authored Call Me Sensei rock inputs. Asset textures and baked
|
|
587
|
+
// masks remain external; this object keeps the anime material treatment
|
|
588
|
+
// visible, serializable, and independent from any preview fixture.
|
|
589
|
+
export const CALL_ME_SENSEI_ROCK_SHADER_SETTINGS = Object.freeze({
|
|
590
|
+
projection: Object.freeze({
|
|
591
|
+
scale: 48,
|
|
592
|
+
saturation: 0.72,
|
|
593
|
+
contrast: 0.72,
|
|
594
|
+
brightness: 0.04,
|
|
595
|
+
projectionContrast: 2,
|
|
596
|
+
sideOnly: false,
|
|
597
|
+
nearDetailScale: 1.2,
|
|
598
|
+
nearDetailStrength: 0.42,
|
|
599
|
+
nearDetailDistance: 70,
|
|
600
|
+
}),
|
|
601
|
+
material: Object.freeze({
|
|
602
|
+
// Daylight stone is blue-white rather than neutral grey. Keep this bias
|
|
603
|
+
// subtle: the shared sky probe still owns the stronger blue response in
|
|
604
|
+
// recesses and on back faces.
|
|
605
|
+
tint: Object.freeze([0.97, 0.99, 1]),
|
|
606
|
+
metallic: 0,
|
|
607
|
+
smoothness: 0.07,
|
|
608
|
+
useSmoothnessTexture: false,
|
|
609
|
+
smoothnessContrast: 1,
|
|
610
|
+
emissiveStrength: 0,
|
|
611
|
+
}),
|
|
612
|
+
lighting: Object.freeze({
|
|
613
|
+
// Match the accepted high-key response under the package's white
|
|
614
|
+
// intensity-8 daylight sun. This is material exposure, not a scene-local
|
|
615
|
+
// light override: sun faces retain chalk-white headroom while the probe
|
|
616
|
+
// owns the blue shaded face.
|
|
617
|
+
exposure: 0.9,
|
|
618
|
+
ambientFloor: 0.01,
|
|
619
|
+
skyFillStrength: 0.72,
|
|
620
|
+
skyFillTint: Object.freeze([0.72, 0.86, 1]),
|
|
621
|
+
}),
|
|
622
|
+
shoreline: Object.freeze({
|
|
623
|
+
wetBandWidth: 1,
|
|
624
|
+
wetBandDarkening: 0.28,
|
|
625
|
+
wetRoughness: 0.22,
|
|
626
|
+
}),
|
|
627
|
+
distanceTint: Object.freeze({
|
|
628
|
+
closeDistance: 500,
|
|
629
|
+
farDistance: 15000,
|
|
630
|
+
color: Object.freeze([0.74, 0.78, 0.82]),
|
|
631
|
+
strength: 0.42,
|
|
632
|
+
}),
|
|
633
|
+
normals: Object.freeze({
|
|
634
|
+
distance: 30000,
|
|
635
|
+
nearFlatten: 0,
|
|
636
|
+
farFlatten: 1,
|
|
637
|
+
useSmoothed: true,
|
|
638
|
+
normalGreenSign: 1,
|
|
639
|
+
}),
|
|
640
|
+
striping: Object.freeze({
|
|
641
|
+
enabled: false,
|
|
642
|
+
scale: 2500,
|
|
643
|
+
contrast: 0.25,
|
|
644
|
+
color: Object.freeze([1, 0, 1]),
|
|
645
|
+
}),
|
|
646
|
+
moss: Object.freeze({
|
|
647
|
+
enabled: false,
|
|
648
|
+
size: 25,
|
|
649
|
+
sharpness: 1.92,
|
|
650
|
+
offset: -0.15,
|
|
651
|
+
multiply: 1.94,
|
|
652
|
+
colorPower: 1.3,
|
|
653
|
+
lowColor: Object.freeze([0.24, 0.42, 0.12]),
|
|
654
|
+
highColor: Object.freeze([0.46, 0.68, 0.24]),
|
|
655
|
+
}),
|
|
656
|
+
layerMask: Object.freeze({
|
|
657
|
+
useAssetMask: true,
|
|
658
|
+
sharpness: 1.77,
|
|
659
|
+
offset: 0.48,
|
|
660
|
+
}),
|
|
661
|
+
grassLayer: Object.freeze({
|
|
662
|
+
enabled: false,
|
|
663
|
+
useGroundShader: false,
|
|
664
|
+
scale: 10,
|
|
665
|
+
tint: Object.freeze([0.89100975, 1, 0.8066038]),
|
|
666
|
+
saturation: 1,
|
|
667
|
+
emission: 0,
|
|
668
|
+
}),
|
|
669
|
+
snowLayer: Object.freeze({
|
|
670
|
+
enabled: false,
|
|
671
|
+
scale: 11.51,
|
|
672
|
+
tint: Object.freeze([1, 1, 1]),
|
|
673
|
+
saturation: 1,
|
|
674
|
+
emission: 0.03,
|
|
675
|
+
}),
|
|
676
|
+
sandLayer: Object.freeze({
|
|
677
|
+
enabled: false,
|
|
678
|
+
useGroundShader: false,
|
|
679
|
+
scale: 5,
|
|
680
|
+
tint: Object.freeze([0.9150943, 0.9150943, 0.9150943]),
|
|
681
|
+
saturation: 1,
|
|
682
|
+
emission: 0.1,
|
|
683
|
+
normalScale: 20,
|
|
684
|
+
normalStrength: 0.5,
|
|
685
|
+
normalRotationDegrees: 30,
|
|
686
|
+
}),
|
|
687
|
+
assetIntegration: Object.freeze({
|
|
688
|
+
// Preserve useful imported surface detail without surrendering the shared
|
|
689
|
+
// Call Me Sensei palette. Saturation/contrast/tint still run after this
|
|
690
|
+
// controlled blend, so arbitrary source color cannot bypass the bundle.
|
|
691
|
+
sourceAlbedoMode: 'blend',
|
|
692
|
+
sourceAlbedoStrength: 0.5,
|
|
693
|
+
sourceNormalStrength: 1,
|
|
694
|
+
sourceAoStrength: 1,
|
|
695
|
+
vertexColorStrength: 0,
|
|
696
|
+
vertexAoStrength: 0,
|
|
697
|
+
}),
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
const PRESETS = new Map();
|
|
701
|
+
|
|
702
|
+
function isPlainObject(value) {
|
|
703
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function cloneValue(value) {
|
|
707
|
+
if (Array.isArray(value)) return [...value];
|
|
708
|
+
if (isPlainObject(value)) return Object.fromEntries(
|
|
709
|
+
Object.entries(value).map(([key, child]) => [key, cloneValue(child)]),
|
|
710
|
+
);
|
|
711
|
+
return value;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
function clampNumber(value, fallback, range = null) {
|
|
715
|
+
const parsed = Number(value);
|
|
716
|
+
if (!Number.isFinite(parsed)) return fallback;
|
|
717
|
+
if (!range) return parsed;
|
|
718
|
+
return Math.min(Math.max(parsed, range.min), range.max);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function colorValue(value, fallback) {
|
|
722
|
+
if (!Array.isArray(value) || value.length < 3) return [...fallback];
|
|
723
|
+
const channels = value.slice(0, 3).map(Number);
|
|
724
|
+
if (!channels.every(Number.isFinite)) return [...fallback];
|
|
725
|
+
return channels.map((channel) => Math.min(Math.max(channel, 0), 1));
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
function fieldValue(value, metadata) {
|
|
729
|
+
if (metadata.type === 'boolean') {
|
|
730
|
+
return typeof value === 'boolean' ? value : metadata.defaultValue;
|
|
731
|
+
}
|
|
732
|
+
if (metadata.type === 'color') return colorValue(value, metadata.defaultValue);
|
|
733
|
+
if (metadata.type === 'select') {
|
|
734
|
+
return metadata.options.includes(value) ? value : metadata.defaultValue;
|
|
735
|
+
}
|
|
736
|
+
return clampNumber(value, metadata.defaultValue, metadata.range);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
function mergeSettings(base, overrides) {
|
|
740
|
+
const result = cloneValue(base);
|
|
741
|
+
for (const [groupId, fields] of Object.entries(GROUP_DEFINITIONS)) {
|
|
742
|
+
const source = isPlainObject(overrides?.[groupId]) ? overrides[groupId] : {};
|
|
743
|
+
for (const [key, metadata] of Object.entries(fields.fields)) {
|
|
744
|
+
if (Object.hasOwn(source, key)) result[groupId][key] = fieldValue(source[key], metadata);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return result;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export function registerRockShaderPreset(id, preset, { overwrite = false } = {}) {
|
|
751
|
+
const key = String(id ?? '').trim();
|
|
752
|
+
if (!key) throw new Error('Rock shader preset id is required.');
|
|
753
|
+
if (overwrite && isProtectedSystemStyleId(key) && PRESETS.has(key)) {
|
|
754
|
+
throw new Error(`System style "${key}" is read-only.`);
|
|
755
|
+
}
|
|
756
|
+
if (!overwrite && PRESETS.has(key)) throw new Error(`Rock shader preset "${key}" is already registered.`);
|
|
757
|
+
const source = isPlainObject(preset) ? preset : {};
|
|
758
|
+
PRESETS.set(key, Object.freeze({
|
|
759
|
+
description: String(source.description ?? ''),
|
|
760
|
+
id: key,
|
|
761
|
+
label: String(source.label ?? key),
|
|
762
|
+
settings: mergeSettings(DEFAULT_ROCK_SHADER_SETTINGS, source.settings),
|
|
763
|
+
}));
|
|
764
|
+
return key;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export function getRockShaderPresetOptions() {
|
|
768
|
+
return [...PRESETS.values()].map((preset) => ({
|
|
769
|
+
description: preset.description,
|
|
770
|
+
label: preset.label,
|
|
771
|
+
value: preset.id,
|
|
772
|
+
}));
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export function normalizeRockShaderPresetName(value) {
|
|
776
|
+
const key = String(value ?? DEFAULT_ROCK_SHADER_PRESET).trim();
|
|
777
|
+
return PRESETS.has(key) ? key : DEFAULT_ROCK_SHADER_PRESET;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export function createRockShaderSettings(options = null) {
|
|
781
|
+
const source = isPlainObject(options) ? options : {};
|
|
782
|
+
const presetId = normalizeRockShaderPresetName(source.preset);
|
|
783
|
+
const preset = PRESETS.get(presetId);
|
|
784
|
+
return {
|
|
785
|
+
preset: presetId,
|
|
786
|
+
...mergeSettings(preset.settings, source),
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
function slug(value) {
|
|
791
|
+
return String(value ?? '')
|
|
792
|
+
.toLowerCase()
|
|
793
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
794
|
+
.replace(/^-+|-+$/g, '') || 'rock-shader';
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export function createRockShaderPresetDocument(id, {
|
|
798
|
+
description = '',
|
|
799
|
+
label = id,
|
|
800
|
+
settings = null,
|
|
801
|
+
} = {}) {
|
|
802
|
+
return {
|
|
803
|
+
description: String(description),
|
|
804
|
+
id: String(id ?? '').trim() || slug(label),
|
|
805
|
+
label: String(label ?? '').trim() || 'Rock shader',
|
|
806
|
+
schema: ROCK_SHADER_DOCUMENT_TYPE,
|
|
807
|
+
settings: createRockShaderSettings(settings),
|
|
808
|
+
version: ROCK_SHADER_SCHEMA_VERSION,
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export function parseRockShaderPresetDocument(input) {
|
|
813
|
+
let document = input;
|
|
814
|
+
if (typeof input === 'string') {
|
|
815
|
+
try {
|
|
816
|
+
document = JSON.parse(input);
|
|
817
|
+
} catch {
|
|
818
|
+
return { errors: ['Rock shader preset is not valid JSON.'], ok: false };
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
const errors = [];
|
|
822
|
+
if (!isPlainObject(document)) return { errors: ['Rock shader preset must be an object.'], ok: false };
|
|
823
|
+
if (document.schema !== ROCK_SHADER_DOCUMENT_TYPE) {
|
|
824
|
+
errors.push(`Expected schema "${ROCK_SHADER_DOCUMENT_TYPE}".`);
|
|
825
|
+
}
|
|
826
|
+
if (document.version !== ROCK_SHADER_SCHEMA_VERSION) {
|
|
827
|
+
errors.push(`Unsupported rock shader version ${document.version}.`);
|
|
828
|
+
}
|
|
829
|
+
if (!String(document.label ?? '').trim()) errors.push('Rock shader preset needs a label.');
|
|
830
|
+
if (!isPlainObject(document.settings)) errors.push('Rock shader preset needs settings.');
|
|
831
|
+
if (errors.length) return { errors, ok: false };
|
|
832
|
+
return {
|
|
833
|
+
ok: true,
|
|
834
|
+
value: createRockShaderPresetDocument(document.id, {
|
|
835
|
+
description: document.description,
|
|
836
|
+
label: document.label,
|
|
837
|
+
settings: document.settings,
|
|
838
|
+
}),
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export function serializeRockShaderPreset(document, { pretty = true } = {}) {
|
|
843
|
+
const result = parseRockShaderPresetDocument(document);
|
|
844
|
+
if (!result.ok) throw new Error(result.errors.join(' '));
|
|
845
|
+
return JSON.stringify(result.value, null, pretty ? 2 : 0);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
registerRockShaderPreset('call_me_sensei', {
|
|
849
|
+
description: 'First-party anime rock treatment with graphic projection, distance color, and optional geological layers.',
|
|
850
|
+
label: 'Call Me Sensei',
|
|
851
|
+
settings: CALL_ME_SENSEI_ROCK_SHADER_SETTINGS,
|
|
852
|
+
});
|
|
853
|
+
|
|
854
|
+
registerRockShaderPreset('neutral', {
|
|
855
|
+
description: 'Neutral validation profile that retains asset color with minimal stylistic treatment.',
|
|
856
|
+
label: 'Neutral',
|
|
857
|
+
settings: {
|
|
858
|
+
assetIntegration: {
|
|
859
|
+
sourceAlbedoMode: 'retain',
|
|
860
|
+
sourceAlbedoStrength: 1,
|
|
861
|
+
vertexColorStrength: 1,
|
|
862
|
+
vertexAoStrength: 1,
|
|
863
|
+
},
|
|
864
|
+
distanceTint: { strength: 0 },
|
|
865
|
+
material: { tint: [1, 1, 1], smoothness: 0.05 },
|
|
866
|
+
moss: { enabled: false },
|
|
867
|
+
projection: { brightness: 0, contrast: 1, saturation: 1 },
|
|
868
|
+
},
|
|
869
|
+
});
|