rhodonite 0.26.0 → 0.27.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/VERSION-FILE +1 -1
- package/dist/esm/foundation/components/Light/LightComponent.d.ts +14 -0
- package/dist/esm/foundation/components/Light/LightComponent.js +1 -1
- package/dist/esm/foundation/components/Mesh/MeshComponent.js +1 -1
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +28 -0
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.js +1 -1
- package/dist/esm/foundation/components/Physics/PhysicsComponent.js +1 -1
- package/dist/esm/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +1 -1
- package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.js +1 -1
- package/dist/esm/foundation/components/Shape/ShapeComponent.js +1 -1
- package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +1 -1
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.js +1 -1
- package/dist/esm/foundation/components/Transform/TransformComponent.js +1 -1
- package/dist/esm/foundation/constraints/VrmRollConstraint.js +1 -1
- package/dist/esm/foundation/core/Component.js +1 -1
- package/dist/esm/foundation/core/Config.d.ts +15 -0
- package/dist/esm/foundation/core/Config.js +1 -1
- package/dist/esm/foundation/core/GlobalDataRepository.js +1 -1
- package/dist/esm/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esm/foundation/core/MemoryManager.js +2 -2
- package/dist/esm/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esm/foundation/definitions/ShaderSemantics.js +2 -2
- package/dist/esm/foundation/definitions/ShaderSemanticsInfo.d.ts +1 -0
- package/dist/esm/foundation/definitions/ShaderSemanticsInfo.js +1 -1
- package/dist/esm/foundation/definitions/VertexAttribute.js +1 -1
- package/dist/esm/foundation/exporter/Gltf2Exporter.d.ts +6 -0
- package/dist/esm/foundation/exporter/Gltf2Exporter.js +1 -1
- package/dist/esm/foundation/geometry/Frustum.js +1 -1
- package/dist/esm/foundation/geometry/Mesh.d.ts +15 -0
- package/dist/esm/foundation/geometry/Mesh.js +1 -1
- package/dist/esm/foundation/geometry/Primitive.js +1 -1
- package/dist/esm/foundation/geometry/shapes/Cylinder.js +1 -1
- package/dist/esm/foundation/geometry/shapes/Joint.js +1 -1
- package/dist/esm/foundation/gizmos/AABBGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/CapsuleColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/Gizmo.js +1 -1
- package/dist/esm/foundation/gizmos/JointGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LightGizmo.d.ts +108 -10
- package/dist/esm/foundation/gizmos/LightGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LocatorGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/RotationGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ScaleGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ShapeGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/SphereColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/TranslationGizmo.js +1 -1
- package/dist/esm/foundation/helpers/BloomHelper.js +1 -1
- package/dist/esm/foundation/helpers/GaussianBlurHelper.js +1 -1
- package/dist/esm/foundation/helpers/MaterialHelper.d.ts +2 -0
- package/dist/esm/foundation/helpers/MaterialHelper.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/PointShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
- package/dist/esm/foundation/helpers/materials/createClassicUberMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.d.ts +21 -0
- package/dist/esm/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.js +1 -0
- package/dist/esm/foundation/helpers/materials/createGaussianBlurForEncodedDepthMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createGaussianBlurMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +1 -1
- package/dist/esm/foundation/helpers/materials/createPbrUberMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/index.d.ts +1 -0
- package/dist/esm/foundation/helpers/materials/index.js +1 -1
- package/dist/esm/foundation/helpers/materials/nodeBasedMaterialCommon.js +1 -1
- package/dist/esm/foundation/importer/DrcPointCloudImporter.js +1 -1
- package/dist/esm/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esm/foundation/importer/Gltf2Importer.js +1 -1
- package/dist/esm/foundation/importer/GltfImporter.js +1 -1
- package/dist/esm/foundation/importer/ModelConverter.d.ts +19 -0
- package/dist/esm/foundation/importer/ModelConverter.js +1 -1
- package/dist/esm/foundation/importer/RhodoniteImportExtension.js +1 -1
- package/dist/esm/foundation/importer/Vrm0xImporter.js +1 -1
- package/dist/esm/foundation/importer/VrmImporter.js +1 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/DepthEncodeMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/EntityUIDOutputMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/FurnaceTestMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +18 -18
- package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +6 -6
- package/dist/esm/foundation/materials/contents/MatCapMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/SynthesizeHdrMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/AbstractShaderNode.js +2 -2
- package/dist/esm/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esm/foundation/materials/core/Material.js +1 -1
- package/dist/esm/foundation/materials/core/MaterialRepository.js +1 -1
- package/dist/esm/foundation/materials/core/ShaderGraphResolver.js +4 -4
- package/dist/esm/foundation/materials/core/ShaderHandler.js +3 -3
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGL.js +2 -2
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGPU.js +2 -2
- package/dist/esm/foundation/materials/nodes/AbsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AcosShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AddShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AlphaTestShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AndShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Atan2ShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributePositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeTexcoordShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BlockBeginShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BlockEndShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BranchShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CalcBitangentShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ClampShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ClassicShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ConstantVariableShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CosShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/DotProductShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/EqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/FlatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterOrEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterThanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LengthShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LessOrEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LessThanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MergeVectorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MinShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MultiplyShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NormalizeShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NotEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/OrShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrNormalPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrShaderShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrSheenPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrVolumePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ProcessGeometryShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_HashPRNGShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_SinHashShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/RemapShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SinShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SmoothStepShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SplitVectorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/StepShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Texture2DShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TransformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/UniformDataShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/WireframeMaterialNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendXYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendXZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendYXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendYZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendZXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendZYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistZShaderNode.js +1 -1
- package/dist/esm/foundation/math/IdentityMatrix33.js +2 -2
- package/dist/esm/foundation/math/IdentityMatrix44.js +2 -2
- package/dist/esm/foundation/math/MathClassUtil.js +1 -1
- package/dist/esm/foundation/math/Quaternion.js +1 -1
- package/dist/esm/foundation/math/Transform3D.js +1 -1
- package/dist/esm/foundation/memory/Accessor.js +6 -6
- package/dist/esm/foundation/memory/Buffer.js +3 -3
- package/dist/esm/foundation/memory/BufferView.js +1 -1
- package/dist/esm/foundation/misc/Logger.js +1 -1
- package/dist/esm/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esm/foundation/misc/PngDecoder.js +1 -0
- package/dist/esm/foundation/misc/Time.js +1 -1
- package/dist/esm/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +1 -1
- package/dist/esm/foundation/physics/Rapier/RapierPhysicsStrategy.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/CapsuleCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/SphereCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/VRMSpringBone.js +1 -1
- package/dist/esm/foundation/renderer/Frame.js +1 -1
- package/dist/esm/foundation/renderer/FrameBuffer.js +1 -1
- package/dist/esm/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esm/foundation/renderer/RenderPass.js +1 -1
- package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +1 -1
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.js +1 -1
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystem.d.ts +12 -0
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystem.js +1 -1
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystemStub.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/DeferredRenderPipeline.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +84 -10
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
- package/dist/esm/foundation/system/Engine.d.ts +2 -16
- package/dist/esm/foundation/system/Engine.js +1 -1
- package/dist/esm/foundation/system/EngineState.d.ts +6 -0
- package/dist/esm/foundation/system/GpuDriverWorkarounds.d.ts +50 -0
- package/dist/esm/foundation/system/GpuDriverWorkarounds.js +1 -0
- package/dist/esm/foundation/system/ModuleManager.js +1 -1
- package/dist/esm/foundation/system/index.d.ts +1 -0
- package/dist/esm/foundation/system/index.js +1 -1
- package/dist/esm/foundation/textures/AbstractTexture.js +1 -1
- package/dist/esm/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esm/foundation/textures/CubeTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
- package/dist/esm/foundation/textures/Texture.js +1 -1
- package/dist/esm/foundation/textures/TextureDataFloat.js +1 -1
- package/dist/esm/foundation/textures/VideoTexture.js +1 -1
- package/dist/esm/types/glTF2.d.ts +9 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/webgl/InstanceSidTable.js +1 -1
- package/dist/esm/webgl/MultiDraw.js +1 -1
- package/dist/esm/webgl/MultiDrawRepository.js +1 -1
- package/dist/esm/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esm/webgl/WebGLResourceRepository.js +4 -4
- package/dist/esm/webgl/WebGLStereoUtil.js +1 -1
- package/dist/esm/webgl/WebGLStrategyWebGL2.d.ts +19 -14
- package/dist/esm/webgl/WebGLStrategyWebGL2.js +67 -67
- package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +17 -8
- package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/ColorGradingUsingLUTsShader/ColorGradingUsingLUTsShader.vert.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/DepthEncodeSingleShader/DepthEncodeSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/DepthMomentEncodeShader/DepthMomentEncodeShader.vert.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/DetectHighLuminanceAndCorrectShader/DetectHighLuminanceAndCorrectShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/EntityUIDOutputSingleShader/EntityUIDOutputSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.js +84 -0
- package/dist/esm/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.js +34 -0
- package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +7 -7
- package/dist/esm/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.vert.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +8 -4
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.vert.glsl.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +43 -39
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.glsl.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/MatCapShader/MatCapShader.vert.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.glsl.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.glsl.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +125 -111
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.vert.js +6 -6
- package/dist/esm/webgl/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/ShadowMapDecodeClassicSingleShader/ShadowMapDecodeClassicSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/SummedAreaTableShader/SummedAreaTableShader.frag.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/VarianceShadowMapDecodeClassicShader/VarianceShadowMapDecodeClassicShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/common/iblDefinition.glsl.js +64 -5
- package/dist/esm/webgl/shaderity_shaders/common/morphVariables.glsl.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/common/opticalDefinition.glsl.js +4 -1
- package/dist/esm/webgl/shaderity_shaders/common/prerequisites.glsl.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/nodes/ClassicShader.glsl.js +10 -1
- package/dist/esm/webgl/shaderity_shaders/nodes/PbrShader.glsl.js +12 -0
- package/dist/esm/webgl/shaders/RaymarchingShaderPart.js +23 -11
- package/dist/esm/webgl/shaders/nodes/BlockBeginShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/BlockEndShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.js +5 -5
- package/dist/esm/webgl/shaders/nodes/DiscardShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/EndShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/RaymarchObjectIdUniform.js +3 -3
- package/dist/esm/webgl/shaders/nodes/SdApplyTransform.js +5 -5
- package/dist/esm/webgl/shaders/nodes/SdApplyWorldMatrix.js +3 -3
- package/dist/esm/webgl/shaders/nodes/Texture2DShader.js +14 -14
- package/dist/esm/webgl/shaders/nodes/UniformDataShader.js +13 -13
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.js +1 -1
- package/dist/esm/webgpu/GpuCullingRegistry.js +1 -1
- package/dist/esm/webgpu/GpuDeformRegistry.js +1 -1
- package/dist/esm/webgpu/RangeAllocator.js +1 -1
- package/dist/esm/webgpu/WebGpuBufferArena.js +1 -1
- package/dist/esm/webgpu/WebGpuGpuTimer.js +1 -1
- package/dist/esm/webgpu/WebGpuLightClusterBuilder.js +1 -1
- package/dist/esm/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esm/webgpu/WebGpuResourceRepository.js +5 -5
- package/dist/esm/webgpu/WebGpuStrategyBasic.d.ts +1 -0
- package/dist/esm/webgpu/WebGpuStrategyBasic.js +54 -54
- package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +15 -8
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.wgsl.js +84 -0
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.wgsl.js +19 -0
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +6 -6
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +5 -5
- package/dist/esm/webgpu/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +9 -5
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +44 -40
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.wgsl.js +2 -2
- package/dist/esm/webgpu/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.wgsl.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.wgsl.js +2 -2
- package/dist/esm/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.wgsl.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +125 -113
- package/dist/esm/webgpu/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.wgsl.js +5 -5
- package/dist/esm/webgpu/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.wgsl.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +65 -5
- package/dist/esm/webgpu/shaderity_shaders/common/opticalDefinition.wgsl.js +4 -1
- package/dist/esm/webgpu/shaderity_shaders/nodes/ClassicShader.wgsl.js +7 -0
- package/dist/esm/webgpu/shaderity_shaders/nodes/PbrShader.wgsl.js +13 -2
- package/dist/esmdev/foundation/components/Light/LightComponent.d.ts +14 -0
- package/dist/esmdev/foundation/components/Light/LightComponent.js +38 -11
- package/dist/esmdev/foundation/components/Mesh/MeshComponent.js +47 -44
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +28 -0
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.js +142 -92
- package/dist/esmdev/foundation/components/Physics/PhysicsComponent.js +65 -65
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingComponent.js +54 -54
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +250 -250
- package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.js +335 -335
- package/dist/esmdev/foundation/components/Shape/ShapeComponent.js +31 -31
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +9 -9
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.js +222 -222
- package/dist/esmdev/foundation/components/Transform/TransformComponent.js +66 -66
- package/dist/esmdev/foundation/components/Trigger/TriggerComponent.js +61 -61
- package/dist/esmdev/foundation/components/Vrm/VrmComponent.js +44 -44
- package/dist/esmdev/foundation/constraints/VrmAimConstraint.js +11 -11
- package/dist/esmdev/foundation/constraints/VrmRollConstraint.js +16 -16
- package/dist/esmdev/foundation/constraints/VrmRotationConstraint.js +10 -10
- package/dist/esmdev/foundation/core/Component.js +32 -32
- package/dist/esmdev/foundation/core/ComponentMemoryRegistry.js +41 -41
- package/dist/esmdev/foundation/core/ComponentRepository.js +37 -37
- package/dist/esmdev/foundation/core/Config.d.ts +15 -0
- package/dist/esmdev/foundation/core/Config.js +27 -10
- package/dist/esmdev/foundation/core/Entity.js +9 -9
- package/dist/esmdev/foundation/core/EntityRepository.js +19 -19
- package/dist/esmdev/foundation/core/GlobalDataRepository.js +31 -18
- package/dist/esmdev/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esmdev/foundation/core/MemoryManager.js +52 -27
- package/dist/esmdev/foundation/core/RnObject.js +37 -37
- package/dist/esmdev/foundation/definitions/Blend.js +3 -3
- package/dist/esmdev/foundation/definitions/ComponentType.js +7 -7
- package/dist/esmdev/foundation/definitions/CompositionType.js +50 -50
- package/dist/esmdev/foundation/definitions/CompressionTextureType.js +6 -6
- package/dist/esmdev/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ShaderSemantics.js +12 -7
- package/dist/esmdev/foundation/definitions/ShaderSemanticsInfo.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ShaderSemanticsInfo.js +1 -1
- package/dist/esmdev/foundation/definitions/TextureFormat.js +3 -3
- package/dist/esmdev/foundation/definitions/TextureParameter.js +3 -3
- package/dist/esmdev/foundation/definitions/VertexAttribute.js +30 -30
- package/dist/esmdev/foundation/enhanced_js_objects/Array.js +2 -2
- package/dist/esmdev/foundation/exporter/Gltf2Exporter.d.ts +6 -0
- package/dist/esmdev/foundation/exporter/Gltf2Exporter.js +140 -110
- package/dist/esmdev/foundation/geometry/ComplexVertexAttribute.js +24 -24
- package/dist/esmdev/foundation/geometry/Frustum.js +41 -41
- package/dist/esmdev/foundation/geometry/Mesh.d.ts +15 -0
- package/dist/esmdev/foundation/geometry/Mesh.js +245 -215
- package/dist/esmdev/foundation/geometry/Primitive.js +141 -135
- package/dist/esmdev/foundation/geometry/SimpleVertexAttribute.js +7 -7
- package/dist/esmdev/foundation/geometry/shapes/Cylinder.js +3 -3
- package/dist/esmdev/foundation/geometry/shapes/Joint.js +33 -33
- package/dist/esmdev/foundation/gizmos/AABBGizmo.js +16 -16
- package/dist/esmdev/foundation/gizmos/CapsuleColliderGizmo.js +23 -23
- package/dist/esmdev/foundation/gizmos/Gizmo.js +23 -23
- package/dist/esmdev/foundation/gizmos/JointGizmo.js +37 -37
- package/dist/esmdev/foundation/gizmos/LightGizmo.d.ts +108 -10
- package/dist/esmdev/foundation/gizmos/LightGizmo.js +248 -49
- package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +25 -25
- package/dist/esmdev/foundation/gizmos/RotationGizmo.js +211 -211
- package/dist/esmdev/foundation/gizmos/ScaleGizmo.js +130 -130
- package/dist/esmdev/foundation/gizmos/ShapeGizmo.js +43 -43
- package/dist/esmdev/foundation/gizmos/SphereColliderGizmo.js +24 -24
- package/dist/esmdev/foundation/gizmos/TranslationGizmo.js +129 -129
- package/dist/esmdev/foundation/helpers/BloomHelper.js +42 -38
- package/dist/esmdev/foundation/helpers/GaussianBlurHelper.js +18 -18
- package/dist/esmdev/foundation/helpers/MaterialHelper.d.ts +2 -0
- package/dist/esmdev/foundation/helpers/MaterialHelper.js +3 -1
- package/dist/esmdev/foundation/helpers/Shadow/PointShadowMap.js +12 -12
- package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +5 -5
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +119 -119
- package/dist/esmdev/foundation/helpers/materials/createClassicUberMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.d.ts +21 -0
- package/dist/esmdev/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.js +32 -0
- package/dist/esmdev/foundation/helpers/materials/createGaussianBlurForEncodedDepthMaterial.js +12 -4
- package/dist/esmdev/foundation/helpers/materials/createGaussianBlurMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.js +7 -3
- package/dist/esmdev/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +49 -17
- package/dist/esmdev/foundation/helpers/materials/createPbrUberMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.js +22 -8
- package/dist/esmdev/foundation/helpers/materials/index.d.ts +1 -0
- package/dist/esmdev/foundation/helpers/materials/index.js +3 -1
- package/dist/esmdev/foundation/helpers/materials/nodeBasedMaterialCommon.js +32 -10
- package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
- package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +33 -33
- package/dist/esmdev/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esmdev/foundation/importer/Gltf2Importer.js +21 -17
- package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
- package/dist/esmdev/foundation/importer/ModelConverter.d.ts +19 -0
- package/dist/esmdev/foundation/importer/ModelConverter.js +183 -132
- package/dist/esmdev/foundation/importer/RhodoniteImportExtension.js +6 -6
- package/dist/esmdev/foundation/importer/Vrm0xImporter.js +48 -48
- package/dist/esmdev/foundation/importer/VrmImporter.js +10 -10
- package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.js +37 -28
- package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +15 -9
- package/dist/esmdev/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +3 -2
- package/dist/esmdev/foundation/materials/contents/EntityUIDOutputMaterialContent.js +5 -3
- package/dist/esmdev/foundation/materials/contents/FurnaceTestMaterialContent.js +16 -8
- package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +205 -170
- package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +28 -20
- package/dist/esmdev/foundation/materials/contents/MatCapMaterialContent.js +7 -4
- package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +33 -19
- package/dist/esmdev/foundation/materials/contents/SynthesizeHdrMaterialContent.js +3 -1
- package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +41 -24
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +51 -51
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +26 -26
- package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
- package/dist/esmdev/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esmdev/foundation/materials/core/Material.js +132 -118
- package/dist/esmdev/foundation/materials/core/MaterialRepository.js +65 -65
- package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +38 -38
- package/dist/esmdev/foundation/materials/core/ShaderHandler.js +4 -4
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +26 -20
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +29 -23
- package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/AlphaTestShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/AndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/Atan2ShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributePositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeTexcoordShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/BlockBeginShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/BlockEndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/BranchShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/ClassicShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/ConstantScalarVariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVariableShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ConstantVector2VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector3VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector4VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +19 -19
- package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/OrShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/OutColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/OutPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +8 -8
- package/dist/esmdev/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrNormalPropsShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrShaderShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/PbrSheenPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrVolumePropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/ProcessGeometryShaderNode.js +22 -22
- package/dist/esmdev/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/Random_HashPRNGShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/Texture2DShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/UniformDataShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/WireframeMaterialNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutShadingColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistZShaderNode.js +4 -4
- package/dist/esmdev/foundation/math/AABB.js +132 -132
- package/dist/esmdev/foundation/math/AnimatedQuaternion.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedScalar.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedValueEvaluationState.js +20 -20
- package/dist/esmdev/foundation/math/AnimatedVector2.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector3.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector4.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVectorN.js +55 -55
- package/dist/esmdev/foundation/math/IdentityMatrix33.js +2 -2
- package/dist/esmdev/foundation/math/IdentityMatrix44.js +2 -2
- package/dist/esmdev/foundation/math/MathClassUtil.js +4 -4
- package/dist/esmdev/foundation/math/Quaternion.js +20 -20
- package/dist/esmdev/foundation/math/Transform3D.js +74 -74
- package/dist/esmdev/foundation/math/shapes/MathSphere.js +7 -7
- package/dist/esmdev/foundation/memory/Accessor.js +369 -369
- package/dist/esmdev/foundation/memory/Buffer.js +40 -40
- package/dist/esmdev/foundation/memory/BufferView.js +33 -33
- package/dist/esmdev/foundation/misc/DataUtil.js +2 -2
- package/dist/esmdev/foundation/misc/EnumIO.js +10 -10
- package/dist/esmdev/foundation/misc/Logger.js +14 -14
- package/dist/esmdev/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esmdev/foundation/misc/PngDecoder.js +113 -0
- package/dist/esmdev/foundation/misc/RnPromise.js +14 -14
- package/dist/esmdev/foundation/misc/Time.js +27 -27
- package/dist/esmdev/foundation/misc/WeakOption.js +14 -14
- package/dist/esmdev/foundation/misc/cache/Cache.js +2 -2
- package/dist/esmdev/foundation/misc/cache/SymbolWeakMap.js +8 -8
- package/dist/esmdev/foundation/physics/PhysicsWorldQuery.js +10 -10
- package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +193 -193
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +241 -241
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.js +3 -3
- package/dist/esmdev/foundation/physics/VRMSpring/CapsuleCollider.js +42 -42
- package/dist/esmdev/foundation/physics/VRMSpring/SphereCollider.js +27 -27
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBone.js +10 -10
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBonePhysicsStrategy.js +56 -56
- package/dist/esmdev/foundation/renderer/Expression.js +6 -6
- package/dist/esmdev/foundation/renderer/Frame.js +12 -12
- package/dist/esmdev/foundation/renderer/FrameBuffer.js +25 -25
- package/dist/esmdev/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esmdev/foundation/renderer/RenderPass.js +109 -101
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +10 -10
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +78 -78
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.d.ts +12 -0
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +193 -155
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystemStub.js +3 -3
- package/dist/esmdev/foundation/renderer/pipelines/DeferredRenderPipeline.js +6 -6
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +84 -10
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +585 -461
- package/dist/esmdev/foundation/system/Engine.d.ts +2 -16
- package/dist/esmdev/foundation/system/Engine.js +239 -238
- package/dist/esmdev/foundation/system/EngineState.d.ts +6 -0
- package/dist/esmdev/foundation/system/EngineState.js +1 -1
- package/dist/esmdev/foundation/system/EventPubSub.js +8 -8
- package/dist/esmdev/foundation/system/GpuDriverWorkarounds.d.ts +50 -0
- package/dist/esmdev/foundation/system/GpuDriverWorkarounds.js +93 -0
- package/dist/esmdev/foundation/system/InputManager.js +56 -56
- package/dist/esmdev/foundation/system/ModuleManager.js +6 -6
- package/dist/esmdev/foundation/system/index.d.ts +1 -0
- package/dist/esmdev/foundation/system/index.js +2 -1
- package/dist/esmdev/foundation/textures/AbstractTexture.js +49 -49
- package/dist/esmdev/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esmdev/foundation/textures/CubeTexture.js +47 -36
- package/dist/esmdev/foundation/textures/RenderBuffer.js +11 -11
- package/dist/esmdev/foundation/textures/RenderTargetTexture.js +24 -24
- package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.js +35 -35
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.js +25 -19
- package/dist/esmdev/foundation/textures/Sampler.js +24 -24
- package/dist/esmdev/foundation/textures/Texture.js +83 -83
- package/dist/esmdev/foundation/textures/TextureArray.js +8 -8
- package/dist/esmdev/foundation/textures/TextureDataFloat.js +26 -26
- package/dist/esmdev/foundation/textures/VideoTexture.js +24 -24
- package/dist/esmdev/types/glTF2.d.ts +9 -0
- package/dist/esmdev/types/glTF2.js +1 -1
- package/dist/esmdev/version.js +2 -2
- package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
- package/dist/esmdev/webgl/MultiDraw.js +2 -2
- package/dist/esmdev/webgl/MultiDrawRepository.js +30 -30
- package/dist/esmdev/webgl/WebGLContextWrapper.js +164 -164
- package/dist/esmdev/webgl/WebGLGpuTimer.js +32 -32
- package/dist/esmdev/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esmdev/webgl/WebGLResourceRepository.js +379 -314
- package/dist/esmdev/webgl/WebGLStereoUtil.js +42 -42
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.d.ts +19 -14
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +320 -299
- package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +4 -4
- package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ColorGradingUsingLUTsShader/ColorGradingUsingLUTsShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DepthEncodeSingleShader/DepthEncodeSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DepthMomentEncodeShader/DepthMomentEncodeShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DetectHighLuminanceAndCorrectShader/DetectHighLuminanceAndCorrectShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EntityUIDOutputSingleShader/EntityUIDOutputSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MatCapShader/MatCapShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ShadowMapDecodeClassicSingleShader/ShadowMapDecodeClassicSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/SummedAreaTableShader/SummedAreaTableShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/VarianceShadowMapDecodeClassicShader/VarianceShadowMapDecodeClassicShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/iblDefinition.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/morphVariables.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/opticalDefinition.glsl.js +5 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/prerequisites.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/nodes/ClassicShader.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/nodes/PbrShader.glsl.js +2 -2
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +25 -13
- package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +14 -14
- package/dist/esmdev/webgl/shaders/StandardShaderPart.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/BlockBeginShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/BlockEndShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +21 -21
- package/dist/esmdev/webgl/shaders/nodes/DiscardShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/EndShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +23 -23
- package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +23 -23
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +27 -27
- package/dist/esmdev/webgpu/GpuCullingRegistry.js +94 -94
- package/dist/esmdev/webgpu/GpuDeformRegistry.js +53 -53
- package/dist/esmdev/webgpu/RangeAllocator.js +16 -16
- package/dist/esmdev/webgpu/WebGpuBufferArena.js +21 -21
- package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
- package/dist/esmdev/webgpu/WebGpuGpuCulling.js +198 -198
- package/dist/esmdev/webgpu/WebGpuGpuTimer.js +52 -52
- package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +37 -37
- package/dist/esmdev/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esmdev/webgpu/WebGpuResourceRepository.js +661 -599
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.d.ts +1 -0
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +129 -125
- package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +128 -128
- package/dist/esmdev/webgpu/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/common/opticalDefinition.wgsl.js +5 -2
- package/dist/esmdev/webgpu/shaderity_shaders/nodes/ClassicShader.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/nodes/PbrShader.wgsl.js +2 -2
- package/dist/esmdev/xr/WebARSystem.js +69 -69
- package/dist/esmdev/xr/WebXRSystem.js +153 -153
- package/package.json +2 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import{AnimationComponent as re}from"../foundation/components/Animation/AnimationComponent.js";import{BlendShapeComponent as
|
|
1
|
+
import{AnimationComponent as re}from"../foundation/components/Animation/AnimationComponent.js";import{BlendShapeComponent as D}from"../foundation/components/BlendShape/BlendShapeComponent.js";import{CameraComponent as k}from"../foundation/components/Camera/CameraComponent.js";import{_getCameraControllerUpdateCount as K}from"../foundation/components/CameraController/CameraControllerUpdateCount.js";import{LightComponent as z}from"../foundation/components/Light/LightComponent.js";import{MeshComponent as ne}from"../foundation/components/Mesh/MeshComponent.js";import{MeshRendererComponent as H}from"../foundation/components/MeshRenderer/MeshRendererComponent.js";import{SceneGraphComponent as q}from"../foundation/components/SceneGraph/SceneGraphComponent.js";import{TransformComponent as J}from"../foundation/components/Transform/TransformComponent.js";import{WellKnownComponentTIDs as N}from"../foundation/components/WellKnownComponentTIDs.js";import{Component as V}from"../foundation/core/Component.js";import{BufferUse as L}from"../foundation/definitions/BufferUse.js";import{ComponentType as C}from"../foundation/definitions/ComponentType.js";import{CompositionType as m}from"../foundation/definitions/CompositionType.js";import{PixelFormat as Q}from"../foundation/definitions/PixelFormat.js";import{ShaderType as j}from"../foundation/definitions/ShaderType.js";import{TextureFormat as ae}from"../foundation/definitions/TextureFormat.js";import{VertexAttribute as $}from"../foundation/definitions/VertexAttribute.js";import{Primitive as A}from"../foundation/geometry/Primitive.js";import{Logger as ee}from"../foundation/misc/Logger.js";import{CGAPIResourceRepository as I}from"../foundation/renderer/CGAPIResourceRepository.js";import{subtractByteRanges as oe}from"../foundation/renderer/lightCluster/LightClusterLayout.js";import{isSkipDrawing as te}from"../foundation/renderer/RenderingCommonMethods.js";import{getMultiDrawStateKeyId as se,getPrimitiveMeshRendererFingerPrintId as ce,planMultiDrawRunsInto as le}from"./MultiDraw.js";import G,{setupShaderProgram as X}from"./WebGLStrategyCommonMethod.js";var ie=class P{constructor(t){this.__dataTextureUid=I.InvalidCGAPIResourceUid;this.bI=I.InvalidCGAPIResourceUid;this.gI=I.InvalidCGAPIResourceUid;this.yI=I.InvalidCGAPIResourceUid;this.SI=I.InvalidCGAPIResourceUid;this.kI=-1;this.B_=-1;this.vI=1;this.U_={starts:new Int32Array(0),counts:new Int32Array(0),keys:new Int32Array(0),count:0};this.RI=0;this.DI=0;this.GI=0;this._I=0;this.MI=0;this.PI=0;this._totalSizeOfGPUShaderDataStorageExceptMorphData=0;this.OI=0;this.VI=!0;this.HI=-1;this.jI=-1;this.XI=-1;this.YI=-1;this.or=-1;this.ZI=-1;this.KI=-1;this.nr=-1;this.qI=-1;this.hC=-1;this.sr=-1;this.JI=-1;this.LI=-1;this.QI=-1;this.HS=-1;this.i=t,this.xI=this.i.globalDataRepository.getValue("currentComponentSIDs",0)}static XS(t,e){let i="";return V.getMemberInfo(t).forEach((r,c)=>{r.forEach((s,h)=>{var d;if(s.shaderType!==e&&s.shaderType!==j.VertexAndPixelShader)return;let l=(d=V.getComponentCountPerBufferView(t).get(c))!=null?d:1;m.isArray(s.compositionType)?a(s,c,h,l):o(s,c,h,l)})}),i;function a(r,c,s,h){var b,y;let l="",d="";switch(r.compositionType){case m.Vec4Array:l="vec4",d="fetchVec4";break;case m.Mat4Array:l="mat4",d="fetchMat4";break;case m.Mat4x3Array:l="mat4x3",d="fetchMat4x3";break;default:throw new Error(`Unsupported composition type: ${r.compositionType.str}`)}let p=r.compositionType.getVec4SizeOfProperty();if(r.isVariableLength===!0){let B=V._variableLengthLocationRadix;i+=`
|
|
2
2
|
${l} get_${s}(uint instanceId, uint idxOfArray) {
|
|
3
|
-
vec4 location = get_${
|
|
4
|
-
int index = int(location.x) * ${
|
|
3
|
+
vec4 location = get_${V._getVariableLengthLocationMemberName(s)}(instanceId);
|
|
4
|
+
int index = int(location.x) * ${B} + int(location.y) + ${p} * int(idxOfArray);
|
|
5
5
|
${l} value = ${d}(index);
|
|
6
6
|
return value;
|
|
7
7
|
}
|
|
8
|
-
`;return}let f=
|
|
8
|
+
`;return}let f=V.getLocationOffsetOfMemberOfComponent(t,c,s),v=`int arrayLength = ${(y=((b=V.getArrayLengthOfMember(t).get(c))!=null?b:new Map).get(s))!=null?y:0};`,u=`rnIndices_${s}`,R=`int index = ${u}[instanceIdOfBufferViews] + int(instanceIdInBufferView) * ${p} * arrayLength + ${p} * int(idxOfArray);`,S="";r.convertToBool&&(S="return (value > 0.5) ? true : false;"),i+=`
|
|
9
9
|
const int ${u}[${f.length}] = int[${f.length}](${f.join(", ")});
|
|
10
|
-
${
|
|
11
|
-
uint instanceIdOfBufferViews = instanceId / ${
|
|
12
|
-
uint instanceIdInBufferView = instanceId % ${
|
|
13
|
-
${
|
|
10
|
+
${r.convertToBool?"bool":l} get_${s}(uint instanceId, uint idxOfArray) {
|
|
11
|
+
uint instanceIdOfBufferViews = instanceId / ${h}u;
|
|
12
|
+
uint instanceIdInBufferView = instanceId % ${h}u;
|
|
13
|
+
${v}
|
|
14
14
|
${R}
|
|
15
15
|
${l} value = ${d}(index);
|
|
16
|
-
${
|
|
16
|
+
${r.convertToBool?S:"return value;"}
|
|
17
17
|
}
|
|
18
|
-
`}function o(
|
|
19
|
-
const int ${f}[${
|
|
20
|
-
${
|
|
21
|
-
uint instanceIdOfBufferViews = instanceId / ${
|
|
22
|
-
uint instanceIdInBufferView = instanceId % ${
|
|
23
|
-
${
|
|
18
|
+
`}function o(r,c,s,h){let l="",d="";switch(r.compositionType){case m.Mat4:l="mat4",d="fetchMat4";break;case m.Mat3:l="mat3",d="fetchMat3No16BytesAligned";break;case m.Vec4:l="vec4",d="fetchVec4";break;case m.Vec3:l="vec3",d="fetchVec3No16BytesAligned";break;case m.Scalar:l="float",d="fetchScalarNo16BytesAligned";break;default:throw new Error(`Unsupported composition type: ${r.compositionType.str}`)}let p=V.getLocationOffsetOfMemberOfComponent(t,c,s),f=`rnIndices_${s}`,g="";switch(r.compositionType){case m.Mat4:g=`int index = ${f}[instanceIdOfBufferViews] + 4 * int(instanceIdInBufferView);`;break;case m.Mat3:g=`int index = ${f}[instanceIdOfBufferViews] * 4 + 9 * int(instanceIdInBufferView);`;break;case m.Vec4:g=`int index = ${f}[instanceIdOfBufferViews] + 1 * int(instanceIdInBufferView);`;break;case m.Vec3:g=`int index = ${f}[instanceIdOfBufferViews] * 4 + 3 * int(instanceIdInBufferView);`;break;case m.Scalar:g=`int index = ${f}[instanceIdOfBufferViews] * 4 + 1 * int(instanceIdInBufferView);`;break;default:throw new Error(`Unsupported composition type: ${r.compositionType.str}`)}let x="";r.convertToBool&&(x="return (value > 0.5) ? true : false;"),i+=`
|
|
19
|
+
const int ${f}[${p.length}] = int[${p.length}](${p.join(", ")});
|
|
20
|
+
${r.convertToBool?"bool":l} get_${s}(uint instanceId) {
|
|
21
|
+
uint instanceIdOfBufferViews = instanceId / ${h}u;
|
|
22
|
+
uint instanceIdInBufferView = instanceId % ${h}u;
|
|
23
|
+
${g}
|
|
24
24
|
${l} value = ${d}(index);
|
|
25
|
-
${
|
|
25
|
+
${r.convertToBool?x:"return value;"}
|
|
26
26
|
}
|
|
27
|
-
`}}static
|
|
27
|
+
`}}static D_(t){let e=A.getMorphUniformDataTargetNumbers(),i=`
|
|
28
28
|
const int rnMorphUniformDataTargetNumbers[${e.length}] = int[${e.length}](${e.join(", ")});
|
|
29
|
-
`,
|
|
30
|
-
const int rnMorphUniformDataOffsets[${
|
|
31
|
-
`,o=
|
|
29
|
+
`,n=A.getMorphUniformDataOffsets(),a=`
|
|
30
|
+
const int rnMorphUniformDataOffsets[${n.length}] = int[${n.length}](${n.join(", ")});
|
|
31
|
+
`,o=D.getOffsetsInUniform(t),r=`
|
|
32
32
|
const int rnBlendShapeUniformDataOffsets[${o.length}] = int[${o.length}](${o.join(", ")});
|
|
33
33
|
`,c=t._isPreviousMorphWeightsEnabled?`
|
|
34
34
|
vec3 get_previousMorphedPosition(uint vertexId, vec3 basePosition, uint blendShapeComponentSID) {
|
|
35
35
|
int currentPrimitiveIdx = u_currentPrimitiveIdx;
|
|
36
36
|
int offsetInUniform = rnMorphUniformDataOffsets[currentPrimitiveIdx];
|
|
37
|
-
int offsetInUniform2 = rnBlendShapeUniformDataOffsets[blendShapeComponentSID] + ${
|
|
37
|
+
int offsetInUniform2 = rnBlendShapeUniformDataOffsets[blendShapeComponentSID] + ${D._getPreviousMorphWeightsOffset(t)};
|
|
38
38
|
vec3 position = basePosition;
|
|
39
39
|
int scalar_idx = 3 * int(vertexId);
|
|
40
40
|
for (int i=0; i<rnMorphUniformDataTargetNumbers[currentPrimitiveIdx]; i++) {
|
|
@@ -53,7 +53,7 @@ import{AnimationComponent as re}from"../foundation/components/Animation/Animatio
|
|
|
53
53
|
#ifdef RN_IS_MORPHING
|
|
54
54
|
${i}
|
|
55
55
|
${a}
|
|
56
|
-
${
|
|
56
|
+
${r}
|
|
57
57
|
vec3 get_position(uint vertexId, vec3 basePosition, uint blendShapeComponentSID) {
|
|
58
58
|
int currentPrimitiveIdx = u_currentPrimitiveIdx;
|
|
59
59
|
int offsetInUniform = rnMorphUniformDataOffsets[currentPrimitiveIdx];
|
|
@@ -80,67 +80,67 @@ import{AnimationComponent as re}from"../foundation/components/Animation/Animatio
|
|
|
80
80
|
${c}
|
|
81
81
|
#endif
|
|
82
82
|
#endif
|
|
83
|
-
`}setupShaderForMaterial(t,e){let i=this.i.webglResourceRepository,
|
|
84
|
-
`);let
|
|
85
|
-
`,
|
|
86
|
-
`,
|
|
87
|
-
`}let f="";e.componentType===
|
|
83
|
+
`}setupShaderForMaterial(t,e){let i=this.i.webglResourceRepository,n=i.currentWebGLContextWrapper,[a,o]=t._createProgramWebGL(this.i,P.XS(this.i,j.VertexShader),P.XS(this.i,j.PixelShader),P.G_,P.P_,P.D_(this.i),e);return o&&(t._setupBasicUniformsLocations(e),t._setUniformLocationsOfMaterialNodes(e),t._setupAdditionalUniformLocations(G.getPointSpriteShaderSemanticsInfoArray(),e),this.i.globalDataRepository._setUniformLocationsForWebGL2ModeOnly(t.getShaderProgramUid(e)),i.setUniformBlockBindingForMorphOffsetsAndWeights(a,this.gI,this.yI)),a}_reSetupShaderForMaterialBySpector(t,e,i,n){let[a,o]=t._createProgramByUpdatedSources(i,e,n);return a===I.InvalidCGAPIResourceUid||(o&&(t._setupBasicUniformsLocations(e),t._setUniformLocationsOfMaterialNodes(e),t._setupAdditionalUniformLocations(G.getPointSpriteShaderSemanticsInfoArray(),e)),this.i.globalDataRepository._setUniformLocationsForWebGL2ModeOnly(t.getShaderProgramUid(e))),a}static G_(t,e){var x,v;let i=e.compositionType.getGlslStr(e.componentType),n,a=m.isTexture(e.compositionType),o=e.semantic.replace(".","_"),r="",c=e.compositionType.getGlslStr(e.componentType),s="";e.arrayLength&&(s=`[${e.arrayLength}]`),(e.needUniformInDataTextureMode||a)&&(r=` uniform ${c} u_${o}${s};
|
|
84
|
+
`);let h=e.compositionType.getVec4SizeOfProperty(),l=e.compositionType.getNumberOfComponents(),d=P.getOffsetOfPropertyOfGlobalDataRepository(t,e.semantic);d===-1&&ee.default.error("Could not get the location offset of the property.");let p=h;if(n=`int vec4_idx = ${d} + ${p} * instanceId;
|
|
85
|
+
`,m.isArray(e.compositionType)){p=h*((x=e.arrayLength)!=null?x:1);let R=Math.ceil(l/4)*4*((v=e.arrayLength)!=null?v:1);n=`int vec4_idx = ${d} + ${p} * instanceId + ${h} * int(idxOfArray);
|
|
86
|
+
`,n+=`int scalar_idx = ${d*4} + ${R} * instanceId + ${l} * int(idxOfArray);
|
|
87
|
+
`}let f="";e.componentType===C.Int&&e.compositionType!==m.Scalar&&(f="i");let g="";if(!a&&!e.needUniformInDataTextureMode){g+=`
|
|
88
88
|
${i} get_${o}(highp uint _instanceId, const uint idxOfArray) {
|
|
89
89
|
int instanceId = int(_instanceId);
|
|
90
|
-
${
|
|
91
|
-
`;let u=`${
|
|
92
|
-
${
|
|
93
|
-
`;break;case
|
|
94
|
-
`,u+=` highp ${f}vec3 val = ${f}vec3(col0.xyz);`;break;case
|
|
95
|
-
`;break;case
|
|
96
|
-
`,u+=` highp ${f}vec2 val = ${f}vec2(col0.xy);`;break;case
|
|
97
|
-
`;break;case
|
|
98
|
-
`,e.componentType===
|
|
99
|
-
`,e.componentType===
|
|
100
|
-
`;break;case
|
|
101
|
-
`;break;case
|
|
102
|
-
`;break;case
|
|
103
|
-
`;break;case
|
|
104
|
-
`;break;case
|
|
105
|
-
`;break;case
|
|
90
|
+
${n}
|
|
91
|
+
`;let u=`${r}
|
|
92
|
+
${g}`;switch(e.compositionType){case m.Vec4:case m.Vec4Array:u+=` highp vec4 val = fetchElement(vec4_idx);
|
|
93
|
+
`;break;case m.Vec3:u+=` vec4 col0 = fetchElement(vec4_idx);
|
|
94
|
+
`,u+=` highp ${f}vec3 val = ${f}vec3(col0.xyz);`;break;case m.Vec3Array:u+=` vec3 val = fetchVec3No16BytesAligned(scalar_idx);
|
|
95
|
+
`;break;case m.Vec2:u+=` highp vec4 col0 = fetchElement(vec4_idx);
|
|
96
|
+
`,u+=` highp ${f}vec2 val = ${f}vec2(col0.xy);`;break;case m.Vec2Array:u+=` highp vec2 val = fetchVec2No16BytesAligned(scalar_idx);
|
|
97
|
+
`;break;case m.Scalar:u+=` vec4 col0 = fetchElement(vec4_idx);
|
|
98
|
+
`,e.componentType===C.Int?u+=" int val = int(col0.x);":e.componentType===C.Bool?u+=" bool val = bool(col0.x);":u+=" float val = col0.x;";break;case m.ScalarArray:u+=` float col0 = fetchScalarNo16BytesAligned(scalar_idx);
|
|
99
|
+
`,e.componentType===C.Int?u+=" int val = int(col0);":e.componentType===C.Bool?u+=" bool val = bool(col0);":u+=" float val = col0;";break;case m.Mat4:u+=` mat4 val = fetchMat4(vec4_idx);
|
|
100
|
+
`;break;case m.Mat4Array:u+=` mat4 val = fetchMat4(vec4_idx);
|
|
101
|
+
`;break;case m.Mat3:u+=` mat3 val = fetchMat3(vec4_idx);
|
|
102
|
+
`;break;case m.Mat3Array:u+=` mat3 val = fetchMat3No16BytesAligned(scalar_idx);
|
|
103
|
+
`;break;case m.Mat2:u+=` mat2 val = fetchMat2(vec4_idx);
|
|
104
|
+
`;break;case m.Mat2Array:u+=` mat2 val = fetchMat2No16BytesAligned(scalar_idx);
|
|
105
|
+
`;break;case m.Mat4x3Array:u+=` mat4x3 val = fetchMat4x3(vec4_idx);
|
|
106
106
|
`;break;default:u+=""}return u+=`
|
|
107
107
|
return val;
|
|
108
108
|
}
|
|
109
|
-
`,u}if(!a&&e.needUniformInDataTextureMode){let u="";return e.arrayLength&&(u="[idxOfArray]"),`${
|
|
109
|
+
`,u}if(!a&&e.needUniformInDataTextureMode){let u="";return e.arrayLength&&(u="[idxOfArray]"),`${r}
|
|
110
110
|
${i} get_${o}(highp uint _instanceId, const uint idxOfArray) {
|
|
111
111
|
return u_${o}${u};
|
|
112
112
|
}
|
|
113
|
-
`}return
|
|
114
|
-
`);let l=i.compositionType.getVec4SizeOfProperty(),d=i.compositionType.getNumberOfComponents(),
|
|
115
|
-
`,
|
|
116
|
-
`,a+=`int scalar_idx = ${
|
|
117
|
-
`}let u="";i.componentType===
|
|
113
|
+
`}return r}static P_(t,e,i){var S,b;let n=i.compositionType.getGlslStr(i.componentType),a,o=m.isTexture(i.compositionType),r=i.semantic.replace(".","_"),c="",s=i.compositionType.getGlslStr(i.componentType),h="";i.arrayLength&&(h=`[${i.arrayLength}]`),(i.needUniformInDataTextureMode||o)&&(c=` uniform ${s} u_${r}${h};
|
|
114
|
+
`);let l=i.compositionType.getVec4SizeOfProperty(),d=i.compositionType.getNumberOfComponents(),p=P.getOffsetOfPropertyOfMaterial(t,i.semantic,e),f=t.materialRepository._getMaterialCountPerBufferView(e),g=`rnOffsets_${r}`,x=`const int ${g}[${p.length}] = int[${p.length}](${p.join(", ")});`,v=l;if(a=`int vec4_idx = ${g}[instanceIdOfBufferViews] + ${v} * int(instanceIdInBufferView);
|
|
115
|
+
`,m.isArray(i.compositionType)){v=l*((S=i.arrayLength)!=null?S:1);let B=Math.ceil(d/4)*4*((b=i.arrayLength)!=null?b:1);a=`int vec4_idx = ${g}[instanceIdOfBufferViews] + ${v} * int(instanceIdInBufferView) + ${l} * int(idxOfArray);
|
|
116
|
+
`,a+=`int scalar_idx = ${g}[instanceIdOfBufferViews] * 4 + ${B} * int(instanceIdInBufferView) + ${d} * int(idxOfArray);
|
|
117
|
+
`}let u="";i.componentType===C.Int&&i.compositionType!==m.Scalar&&(u="i");let R="";if(!o&&!i.needUniformInDataTextureMode){R+=`
|
|
118
118
|
${x}
|
|
119
|
-
${
|
|
119
|
+
${n} get_${r}(highp uint _instanceId, const uint idxOfArray) {
|
|
120
120
|
uint instanceId = _instanceId;
|
|
121
121
|
uint instanceIdOfBufferViews = instanceId / ${f}u;
|
|
122
122
|
uint instanceIdInBufferView = instanceId % ${f}u;
|
|
123
123
|
${a}
|
|
124
124
|
`;let y=`${c}
|
|
125
|
-
${R}`;switch(i.compositionType){case
|
|
126
|
-
`;break;case
|
|
127
|
-
`,y+=` highp ${u}vec3 val = ${u}vec3(col0.xyz);`;break;case
|
|
128
|
-
`;break;case
|
|
129
|
-
`,y+=` highp ${u}vec2 val = ${u}vec2(col0.xy);`;break;case
|
|
130
|
-
`;break;case
|
|
131
|
-
`,i.componentType===
|
|
132
|
-
`,i.componentType===
|
|
133
|
-
`;break;case
|
|
134
|
-
`;break;case
|
|
135
|
-
`;break;case
|
|
136
|
-
`;break;case
|
|
137
|
-
`;break;case
|
|
138
|
-
`;break;case
|
|
125
|
+
${R}`;switch(i.compositionType){case m.Vec4:case m.Vec4Array:y+=` highp vec4 val = fetchElement(vec4_idx);
|
|
126
|
+
`;break;case m.Vec3:y+=` vec4 col0 = fetchElement(vec4_idx);
|
|
127
|
+
`,y+=` highp ${u}vec3 val = ${u}vec3(col0.xyz);`;break;case m.Vec3Array:y+=` vec3 val = fetchVec3No16BytesAligned(scalar_idx);
|
|
128
|
+
`;break;case m.Vec2:y+=` highp vec4 col0 = fetchElement(vec4_idx);
|
|
129
|
+
`,y+=` highp ${u}vec2 val = ${u}vec2(col0.xy);`;break;case m.Vec2Array:y+=` highp vec2 val = fetchVec2No16BytesAligned(scalar_idx);
|
|
130
|
+
`;break;case m.Scalar:y+=` vec4 col0 = fetchElement(vec4_idx);
|
|
131
|
+
`,i.componentType===C.Int?y+=" int val = int(col0.x);":i.componentType===C.Bool?y+=" bool val = bool(col0.x);":y+=" float val = col0.x;";break;case m.ScalarArray:y+=` float col0 = fetchScalarNo16BytesAligned(scalar_idx);
|
|
132
|
+
`,i.componentType===C.Int?y+=" int val = int(col0);":i.componentType===C.Bool?y+=" bool val = bool(col0);":y+=" float val = col0;";break;case m.Mat4:y+=` mat4 val = fetchMat4(vec4_idx);
|
|
133
|
+
`;break;case m.Mat4Array:y+=` mat4 val = fetchMat4(vec4_idx);
|
|
134
|
+
`;break;case m.Mat3:y+=` mat3 val = fetchMat3(vec4_idx);
|
|
135
|
+
`;break;case m.Mat3Array:y+=` mat3 val = fetchMat3No16BytesAligned(scalar_idx);
|
|
136
|
+
`;break;case m.Mat2:y+=` mat2 val = fetchMat2(vec4_idx);
|
|
137
|
+
`;break;case m.Mat2Array:y+=` mat2 val = fetchMat2No16BytesAligned(scalar_idx);
|
|
138
|
+
`;break;case m.Mat4x3Array:y+=` mat4x3 val = fetchMat4x3(vec4_idx);
|
|
139
139
|
`;break;default:y+=""}return y+=`
|
|
140
140
|
return val;
|
|
141
141
|
}
|
|
142
142
|
`,y}if(!o&&i.needUniformInDataTextureMode){let y="";return i.arrayLength&&(y="[idxOfArray]"),`${c}
|
|
143
|
-
${
|
|
144
|
-
return u_${
|
|
143
|
+
${n} get_${r}(highp uint _instanceId, const uint idxOfArray) {
|
|
144
|
+
return u_${r}${y};
|
|
145
145
|
}
|
|
146
|
-
`}return c}static getOffsetOfPropertyOfMaterial(t,e,i){return t.materialRepository.getLocationOffsetOfMemberOfMaterial(t,i,e)}static getOffsetOfPropertyOfGlobalDataRepository(t,e){return t.globalDataRepository.getLocationOffsetOfProperty(e)}$load(t){let e=t.mesh;return e==null?(ne.alertNoMeshSet(t),!1):(this.xI=this.i.globalDataRepository.getValue("currentComponentSIDs",0),e.isSetUpDone()||(this.deleteDataTexture(),e._updateVBOAndVAO()),!0)}zS(){let t=U.getMorphUniformDataOffsets();for(let i=0;i<U.getPrimitiveCountHasMorph();i++){let r=U.getPrimitiveHasMorph(i);if(r!=null)for(let a=0;a<r.targets.length;a++){let n=r.targets[a].get(E.Position.XYZ),c=this.i.memoryManager.getByteOffsetOfExistingBuffers($.GPUVertexData,n.bufferView.buffer.indexOfTheBufferUsage);this.wI[t[i]+a]=(this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData+c+n.byteOffsetInBuffer)/4/4}else break}let e=t[t.length-1];this.i.webglResourceRepository.updateUniformBuffer(this.gI,this.wI,0,e)}common_$load(){this.U_()}U_(){let t=!1,e=U.getMorphUniformDataOffsets(),i=Math.max(Math.ceil(e[e.length-1]/4)*4*4,4);if(i!==this.VI){if(this.gI!==v.InvalidCGAPIResourceUid&&(this.i.webglResourceRepository.deleteUniformBuffer(this.gI),this.gI=v.InvalidCGAPIResourceUid),this.VI=i,this.gI===v.InvalidCGAPIResourceUid){let a=new Uint32Array(i);this.wI=a,this.gI=this.i.webglResourceRepository.createUniformBufferWithBufferView(a),this.zS()}this.VI=i,t=!0}let r=G._getMorphWeightsUniformBufferFloatCount(this.i);if(r!==this.JI){if(this.yI!==v.InvalidCGAPIResourceUid&&(this.i.webglResourceRepository.deleteUniformBuffer(this.yI),this.yI=v.InvalidCGAPIResourceUid),this.yI===v.InvalidCGAPIResourceUid){let a=new Float32Array(r);this.II=a,this.yI=this.i.webglResourceRepository.createUniformBufferWithBufferView(a),this.HS(!0)}this.JI=r,t=!0}t&&this.D_()}D_(){this.gI!==v.InvalidCGAPIResourceUid&&this.yI!==v.InvalidCGAPIResourceUid&&this.i.webglResourceRepository.setUniformBlockBindingForMorphOffsetsAndWeightsWithoutShaderProgram(this.gI,this.yI)}P_(){let t=U.getPrimitiveCountHasMorph();(t!==this.HI||this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData!==this.ZI)&&(this.zS(),this.ZI=this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData,this.HI=t)}G_(){this.__createAndUpdateDataTextureInner()}__createAndUpdateDataTextureInner(){let t=this.i.memoryManager,i=t.getSizesOfTheBuffers($.GPUInstanceData).reduce((c,s)=>c+s,0),r=t.getBuffers($.GPUInstanceData),a=r.length;a!==this.qI&&(this.qI=a,this.deleteDataTexture());let o=this.i.webglResourceRepository.currentWebGLContextWrapper;if(o==null)return;let n=o.getMaxTextureSize();if(this.__dataTextureUid!==v.InvalidCGAPIResourceUid){let c=i/4/4,s=Math.ceil(c/n),p=n*s*4*4,l=this.i.lightClusterSystem,d=l._getExcludedByteRanges(),m=0;for(let f=0;f<r.length;f++){let h=r[f],x=f===r.length-1?h.takenSizeInByte:h.byteLength;x>p&&ee.default.warn("The buffer size exceeds the size of the data texture.");let b=new Float32Array(h.getArrayBuffer());for(let[u,R]of se(m,m+Math.min(x,p),d))this.XS(b,m,u,R,n);B.GI||(oe.downloadTypedArray("Rhodonite_dataTextureBuffer.bin",b),B.GI=!0),m+=h.byteLength}for(let[f,h]of l._takeDirtyByteRanges()){let x=0;for(let b of r){let u=x+b.byteLength;if(f>=x&&h<=u){let R=new Float32Array(b.getArrayBuffer());this.XS(R,x,f,h,n);break}x=u}}}else{let c=t.getBuffers($.GPUVertexData),s=c.map(S=>S.getArrayBuffer()),p=n*4*4,l=r.map(S=>Math.ceil(S.byteLength/p)*p),d=l.reduce((S,M)=>S+M,0),m=c.reduce((S,M)=>S+M.byteLength,0),f=Math.max(Math.ceil((d+m)/p),1),h=this.i.config.isMultiDrawEnabled&&this.i.webglResourceRepository.isInstanceSidTextureCapable,x=this.i.webglResourceRepository.instanceSidTable,b=h?Math.max(x.usedEnd,1):0,u=h?Math.max(Math.ceil(b/n),1):0,R=h?Math.max(Math.ceil(Math.ceil(b/4)/n),1):0,_=f+u+R;this.RI=n,this.UI=f,this.DI=f+u,this._I=this.UI*n,this.MI=this.DI*n,this.PI=b,h&&x.markAllDirty();let I=p*_,y=new Uint8Array(I),A=0;r.forEach((S,M)=>{y.set(new Uint8Array(S.getArrayBuffer(),0,S.takenSizeInByte),A),A+=l[M]}),c.forEach((S,M)=>{y.set(new Uint8Array(s[M],0,S.byteLength),A),A+=S.byteLength});let W=new Float32Array(y.buffer);this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData=d,this.__dataTextureUid=this.i.webglResourceRepository.createTextureFromTypedArray(W,{internalFormat:ae.RGBA32F,width:n,height:_,format:j.RGBA,type:T.Float,generateMipmap:!1}),this.i.lightClusterSystem._takeDirtyByteRanges()}}XS(t,e,i,r,a){let o=this.i.webglResourceRepository,n=Math.floor(i/16),c=Math.ceil(r/16),s=e/16,p=(l,d,m,f,h)=>{let x=(h-s)*4;o.updateTexture(this.__dataTextureUid,t.subarray(x,x+m*f*4),{level:0,offsetX:l,offsetY:d,width:m,height:f,format:j.RGBA,type:T.Float})};for(;n<c;){let l=n%a,d=Math.floor(n/a);if(l!==0||c-n<a){let m=Math.min(a-l,c-n);p(l,d,m,1,n),n+=m}else{let m=Math.floor((c-n)/a);p(0,d,a,m,n),n+=m*a}}}deleteDataTexture(){this.__dataTextureUid!=null&&(this.i.webglResourceRepository.deleteTexture(this.__dataTextureUid),this.__dataTextureUid=v.InvalidCGAPIResourceUid),this.PI=0,this.RI=0,this.SI=v.InvalidCGAPIResourceUid}prerender(){if(this.i.config.isMultiDrawEnabled&&this.i.webglResourceRepository.isInstanceSidTextureCapable){let e=this.i.webglResourceRepository.instanceSidTable;this.__dataTextureUid!==v.InvalidCGAPIResourceUid&&e.usedEnd>this.PI&&this.deleteDataTexture()}(re.getIsAnimating(this.i)||Q.getUpdateCount(this.i)!==this.nr||J.getUpdateCount(this.i)!==this.KI||k.getCurrentCameraUpdateCount(this.i)!==this.dC||q(this.i)!==this.sr||this.i.materialRepository.stateVersion!==this.jI||this.i.lightClusterSystem.dataVersion!==this.XI||z.getUpdateCount(this.i)!==this.or||this.i._gpuInstanceDataVersion!==this.YI||this.__dataTextureUid===v.InvalidCGAPIResourceUid)&&(this.G_(),this.w_(),this.nr=Q.getUpdateCount(this.i),this.KI=J.getUpdateCount(this.i),this.dC=k.getCurrentCameraUpdateCount(this.i),this.sr=q(this.i),this.jI=this.i.materialRepository.stateVersion,this.XI=this.i.lightClusterSystem.dataVersion,this.or=z.getUpdateCount(this.i),this.YI=this.i._gpuInstanceDataVersion),G.updateCount!==this.zI||G.getCountOfBlendShapeComponents(this.i)!==this.QI?(this.HS(),this.zI=G.updateCount,this.QI=G.getCountOfBlendShapeComponents(this.i),this.i.materialRepository._makeShaderInvalidateToMorphMaterials()):this.O_(),this.P_(),this.kI=this.i.componentRepository.getComponentsWithType(z)}HS(t=!1){let i=this.i.memoryManager.getBuffer($.GPUVertexData);if(i==null||i.takenSizeInByte===0)return;let r=G._writeMorphWeightsUniformArray(this.i,this.II,t);this.OI=!1,r>0&&this.YS(r)}YS(t){this.i.webglResourceRepository.updateUniformBuffer(this.yI,this.II,0,t)}O_(){if(this.OI||this.II==null)return;this.OI=!0;let t=G._settlePreviousMorphWeights(this.i,this.II);t>0&&this.YS(t)}V_(){return this.i.webglResourceRepository.currentWebGLContextWrapper.isWebGL2&&this.i.config.isUboEnabled}w_(){if(this.V_()){let t=this.i.webglResourceRepository.currentWebGLContextWrapper,e=t.getAlignedMaxUniformBlockSize(),i=t.getMaxConventionUniformBlocks(),a=this.i.memoryManager.getBuffer($.GPUInstanceData);if(this.bI===v.InvalidCGAPIResourceUid)this.bI=this.i.webglResourceRepository.setupUniformBufferDataArea(new Float32Array(a.getArrayBuffer()));else{let o=new Float32Array(a.getArrayBuffer());this.i.webglResourceRepository.updateUniformBuffer(this.bI,o,0,e*i/4)}}}attachGPUData(t){}attachGPUDataInner(t,e){}attachVertexData(t,e,i,r){}attachVertexDataInner(t,e,i,r,a){let o=this.i.webglResourceRepository.getWebGLResource(t.getVaoUids(i));if(o!=null)r.bindVertexArray(o);else{r.bindVertexArray(null);let n=e.vertexHandles;this.i.webglResourceRepository.setVertexDataToPipeline(n,e,t._variationVBOUid);let c=this.i.webglResourceRepository.getWebGLResource(n.iboHandle),s=r.getRawContext();s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,c)}}dettachVertexData(t){let e=t.getRawContext();t.bindVertexArray(null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindBuffer(e.ARRAY_BUFFER,null)}static init(t){return new B(t)}ZS(t,e,i){if(i){let r=-1,a=this.i._webXRSystemIfEnabled;a!=null&&a.isWebXRMode&&(a.isMultiView()?r=a._getCameraComponentSIDAt(0):r=a._getCameraComponentSIDAt(e)),this.xI._v[N.CameraComponentTID]=r}else{let r=t.cameraComponent;r==null&&(r=this.i.componentRepository.getComponent(k,k.getCurrent(this.i))),r?this.xI._v[N.CameraComponentTID]=r.componentSID:this.xI._v[N.CameraComponentTID]=-1}}KS(t,e,i){this.xI==null&&(this.xI=this.i.globalDataRepository.getValue("currentComponentSIDs",0)),this.xI._v[0]=e.materialSID}W_(t,e,i){if(!this.i.config.isMultiDrawEnabled)return;let r=this.i.webglResourceRepository,a=r.currentWebGLContextWrapper;if(a==null||a.webgl2ExtMD==null)return;let o=r.instanceSidTable;if(!o.isSupported)return;let n=H._getInstanceCullingState(e),c=n!=null&&n.culledEntityCount>0;if(this.vI=c?0:1,!c){this.qS(o);return}let s=n.culledEntityStamp,p=n.cullTick,l=n.cullingId;for(let d=0;d<t.length;d++){let m=t[d];if(m===-1)continue;let f=i!=null?i[d]:U.getPrimitive(m);if(f==null)continue;let h=f.mesh;h==null||h._remapPrepassId===l||(h._remapPrepassId=l,h._packVisibleInstancesToVariationVBO(s,p))}this.qS(o)}qS(t){if(this.__dataTextureUid===v.InvalidCGAPIResourceUid||this.RI<=0)return;let e=t.usedEnd;if(e<=0){t.clearSidDirty(),t.clearRemapDirty();return}t.sidDirty&&(this.JS(this.UI,e,(i,r,a)=>t.writeSidTexels(i,r,a)),t.clearSidDirty()),t.remapDirty&&this.vI===0&&(this.JS(this.DI,Math.ceil(e/4),(i,r,a)=>t.writeRemapTexels(i,r,a)),t.clearRemapDirty())}JS(t,e,i){let r=this.RI,a=e,o=0,n=t;for(;a>0;){let c=Math.min(a,r),s=new Float32Array(c*4);i(s,o,c),this.i.webglResourceRepository.updateTexture(this.__dataTextureUid,s,{level:0,offsetX:0,offsetY:n,width:c,height:1,format:j.RGBA,type:T.Float}),a-=c,o+=c,n++}}common_$render(t,e,i,r){typeof spector!="undefined"&&spector.setMarker("| | WebGL2:common_$render#");let a=this.i.webglResourceRepository.currentWebGLContextWrapper,o=a.getRawContextAsWebGL2(),n=V.isVrMainPass(this.i,e),c=V.getDisplayCount(n,this.i._webXRSystemIfEnabled),s=e._lastPrimitiveUids===t?e._lastPrimitives:null;if(e.isBufferLessRenderingMode())return this.L_(o,e,n),o.depthMask(!0),!0;this.W_(t,e,s);let p=!1;return e._toRenderOpaquePrimitives&&(e.depthWriteMask||o.depthMask(!1),p=this.CI(t,s,e._lastOpaqueIndex,0,-1,a,e,n,c)||p),e._toRenderTranslucentPrimitives&&(p=this.CI(t,s,e._lastOpaqueIndex+1,e._lastTranslucentIndex,1,a,e,n,c)||p),e._toRenderBlendWithZWritePrimitives&&(p=this.CI(t,s,e._lastTranslucentIndex+1,e._lastBlendWithZWriteIndex,1,a,e,n,c)||p),e._toRenderBlendWithoutZWritePrimitives&&(o.depthMask(!1),p=this.CI(t,s,e._lastBlendWithZWriteIndex+1,e._lastBlendWithoutZWriteIndex,1,a,e,n,c)||p),o.depthMask(!0),this.dettachVertexData(a),this.S_=i,p}L_(t,e,i){let r=e.material,a=e._dummyPrimitiveForBufferLessRendering;Y(r,a,this);let o=r.getShaderProgramUid(a),n=this.i.webglResourceRepository.getWebGLResource(o);if(t.useProgram(n),this.SI=o,this.bindDataTexture(t,n),this.KS(t,r,n),this.ZS(e,0,i),this.QS(t,n),this.l_(t,n),n.vrState!=null&&i){let s=this.i.globalDataRepository.getValue("vrState",0);s._v[0]=i?1:0,s._v[1]=0,n._gl.uniform2iv(n.vrState,s._v)}V.setWebGLParameters(this.i,r,t),r._setParametersToGpuWebGLWithOutInternalSetting({shaderProgram:n,firstTime:!0}),e.depthWriteMask?t.depthMask(!0):t.depthMask(!1),this.i.webglResourceRepository.setViewport(this.i,e.getViewport());let c=this.i.webglResourceRepository.currentWebGLContextWrapper;c!=null&&this.WI(c)&&(t.bindVertexArray(null),t.vertexAttribI4ui(E.MaterialSid.getAttributeSlot(),r.materialSID,0,0,0),t.vertexAttribI4ui(E.Instance.getAttributeSlot(),0,0,0,0),this.d_(t,n),this.g_(t,n)),t.drawArrays(e._primitiveModeForBufferLessRendering.index,0,e._drawVertexNumberForBufferLessRendering)}WI(t){return this.i.config.isMultiDrawEnabled&&t.webgl2ExtMD!=null&&this.i.webglResourceRepository.instanceSidTable.isSupported}$_(t,e,i){let r=E.MaterialSid.getAttributeSlot(),a=t._multiDrawGroup,o=i.getRawContextAsWebGL2();if(a==null||a.vertexHandles==null){o.vertexAttribI4ui(r,e.materialSID,0,0,0);return}let n=e===t.material,c=n?a.vertexHandles.vaoHandle:a.genericMaterialSidVaoHandle;if(c!=null){let s=this.i.webglResourceRepository.getWebGLResource(c);s!=null&&i.bindVertexArray(s)}n||o.vertexAttribI4ui(r,e.materialSID,0,0,0)}CI(t,e,i,r,a,o,n,c,s){let p=!c&&s===1&&this.i.config.isMultiDrawEnabled&&o.webgl2ExtMD!=null&&this.i.webglResourceRepository.isInstanceSidTextureCapable,l=!1;if(!p){for(let f=i;a>0?f<=r:f>=r;f+=a)l=this.AI(t[f],o,n,c,s,void 0,e==null?void 0:e[f])||l;return l}let m=fe(i,r,a,f=>{let h=t[f];if(h===-1)return null;let x=e!=null?e[f]:U.getPrimitive(h);if(x==null||x._multiDrawGroup==null)return null;let b=n.getAppropriateMaterial(x);return b._materialContent.isMultiDrawCompatible?ce(x,b,le(x)):null},this.M_);for(let f=0;f<m.count;f++){let h=m.starts[f],x=m.counts[f];if(m.keys[f]===-1||x<2)for(let b=0;b<x;b++){let u=h+b*a;l=this.AI(t[u],o,n,c,s,void 0,e==null?void 0:e[u])||l}else l=this.k_(t,e,h,x,a,o,n,s)||l}return l}k_(t,e,i,r,a,o,n,c){var S;let s=e!=null?e[i]:U.getPrimitive(t[i]);if(s==null||s._multiDrawGroup==null)return!1;let p=s.mesh,l={primitive:s,mesh:p,indexed:s.hasIndices(),mode:s.primitiveMode.index,indexBitSize:s.getRenderIndexBitSize(),count:0,offset:0,instanceCount:0};if(!this.AI(t[i],o,n,!1,c,l,s)){let M=!1;for(let D=1;D<r;D++){let C=i+D*a;M=this.AI(t[C],o,n,!1,c,void 0,e==null?void 0:e[C])||M}return M}let m=s._multiDrawGroup,f=m.counts,h=m.offsets,x=m.instanceCounts,b=m.firsts,u=m.vertexCounts,R=l.indexed,_=o.getRawContextAsWebGL2(),I=0;f[I]=l.count,h[I]=l.offset,b[I]=l.offset,u[I]=l.count,x[I]=l.instanceCount,I++;let y=H._getInstanceCullingState(n),A=y==null?void 0:y.culledEntityStamp,W=(S=y==null?void 0:y.cullTick)!=null?S:0;for(let M=1;M<r;M++){let D=i+M*a,C=e!=null?e[D]:U.getPrimitive(t[D]);if(C==null||C._multiDrawGroup!==m)continue;let L=n.getAppropriateMaterial(C);if(L.getShaderProgramUid(C)===-1&&Y(L,C,this),te(L,C))continue;let P=C.mesh._packVisibleInstancesToVariationVBO(A,W);if(P===0)continue;let w=C._multiDrawEntry;w!=null&&(f[I]=w.indexCount,h[I]=w.indexByteOffset,b[I]=w.vertexOffset,u[I]=w.vertexCount,x[I]=P,I++)}return I>=2?R?o.multiDrawElementsInstanced(l.mode,f,0,_.UNSIGNED_INT,h,0,x,0,I):o.multiDrawArraysInstanced(l.mode,b,0,u,0,x,0,I):I===1&&(R?_.drawElementsInstanced(l.mode,f[0],_.UNSIGNED_INT,h[0],x[0]):_.drawArraysInstanced(l.mode,b[0],u[0],x[0])),!0}AI(t,e,i,r,a,o,n){var I,y,A,W;let c=e.getRawContextAsWebGL2(),s=n!=null?n:U.getPrimitive(t);if(s==null)return!1;let p=s.mesh,l=p.meshEntitiesInner[0],d=i.getAppropriateMaterial(s);Y(d,s,this);let m=l.getMeshRenderer(),f=H._getInstanceCullingState(i),h=p._packVisibleInstancesToVariationVBO(f==null?void 0:f.culledEntityStamp,(I=f==null?void 0:f.cullTick)!=null?I:0);if(h===0)return!1;let x=p.getPrimitiveIndexInMesh(s);this.attachVertexDataInner(p,s,x,e,p._variationVBOUid),this.WI(e)&&this.$_(s,d,e);let b=!1,u=!1,R=d.getShaderProgramUid(s);if(R!==this.SI||c.JA){if(te(d,s))return this.dettachVertexData(e),!1;let S=this.i.webglResourceRepository.getWebGLResource(R);c.useProgram(S),c.JA=!1,this.bindDataTexture(c,S),this.fI=S,b=!0,u=!0}((y=this.$I)==null?void 0:y.deref())!==d&&(u=!0,this.$I=new WeakRef(d)),this.EI!==d.stateVersion&&(u=!0,this.EI=d.stateVersion),this.WI(e)&&this.fI!=null&&(this.d_(c,this.fI),this.g_(c,this.fI));let _={glw:e,entity:l,worldMatrix:l.getSceneGraph().matrixInner,normalMatrix:l.getSceneGraph().normalMatrixInner,isBillboard:l.getSceneGraph().isBillboard,isVisible:l.getSceneGraph().isVisible,lightComponents:this.kI,renderPass:i,primitive:s,diffuseCube:m.diffuseCubeMap,specularCube:m.specularCubeMap,sheenCube:m.sheenCubeMap,isVr:r,displayIdx:-1};b&&d._setParametersToGpuWebGLPerShaderProgram({engine:this.i,material:d,shaderProgram:this.fI,firstTime:b,args:_}),u&&(this.KS(c,d,this.fI),V.setWebGLParameters(this.i,d,c),d._setParametersToGpuWebGL({engine:this.i,material:d,shaderProgram:this.fI,firstTime:u,args:_})),d._setParametersToGpuWebGLPerPrimitive({material:d,shaderProgram:this.fI,firstTime:u,args:_});for(let S=0;S<a;S++){if(r&&V.setVRViewport(this.i,i,S),this.ZS(i,S,r),this.QS(c,this.fI),this.l_(c,this.fI),this.fI.vrState!=null&&r&&a>1){let F=this.i.globalDataRepository.getValue("vrState",0);F._v[0]=r?1:0,F._v[1]=S,this.fI._gl.uniform2iv(this.fI.vrState,F._v)}this.i.config.isMultiDrawEnabled&&e.webgl2ExtMD!=null&&this.i.webglResourceRepository.instanceSidTable.isSupported&&s._multiDrawGroup==null&&c.vertexAttribI4ui(E.Instance.getAttributeSlot(),Math.max(0,p._instanceSidBase),0,0,0);let D=s.indicesAccessor,C=D!=null,L=s.getRenderIndexBitSize(),Z=L==="uint32"?c.UNSIGNED_INT:c.UNSIGNED_SHORT,P=s._multiDrawEntry,w=(A=P==null?void 0:P.indexByteOffset)!=null?A:0,K=(W=P==null?void 0:P.vertexOffset)!=null?W:0;o!=null?(o.primitive=s,o.mesh=p,o.indexed=C,o.mode=s.primitiveMode.index,o.indexBitSize=L,o.count=C?D.elementCount:s.getVertexCountAsVerticesBased(),o.offset=C?w:K,o.instanceCount=h):C?c.drawElementsInstanced(s.primitiveMode.index,D.elementCount,Z,w,h):c.drawArraysInstanced(s.primitiveMode.index,K,s.getVertexCountAsVerticesBased(),h)}return this.SI=R,!0}l_(t,e){let i=e,r=i.lightClusterView;if(r==null)return;let a=this.xI._v[N.CameraComponentTID],o=this.i.lightClusterSystem,n=o.dataVersion;i._lightClusterViewCameraSid===a&&i._lightClusterViewVersion===n||(t.uniform4fv(r,o._getViewUniformData(a)),i._lightClusterViewCameraSid=a,i._lightClusterViewVersion=n)}QS(t,e){let i=this.xI._v,r=this.FI;if(this.NI===e&&r!=null&&r.length===i.length){let a=!0;for(let o=0;o<i.length;o++)if(r[o]!==i[o]){a=!1;break}if(a)return}t.uniform1fv(e.currentComponentSIDs,i),(r==null||r.length!==i.length)&&(r=new Float32Array(i.length),this.FI=r),r.set(i),this.NI=e}bindDataTexture(t,e){t.uniform1i(e.dataTexture,0),this.i.webglResourceRepository.bindTexture2D(0,this.__dataTextureUid);let i=this.i.webglResourceRepository.createOrGetTextureSamplerRepeatNearest();this.i.webglResourceRepository.bindTextureSampler(0,i),this.bindInstanceSidTextures(t,e)}bindInstanceSidTextures(t,e){let i=this.i.webglResourceRepository,r=i.currentWebGLContextWrapper;if(r==null||r.webgl2ExtMD==null||!this.i.config.isMultiDrawEnabled||!i.instanceSidTable.isSupported)return;let o=e;o.N_===void 0&&(o.TI=t.getUniformLocation(e,"u_instanceSidDataTextureIndex"),o.LI=t.getUniformLocation(e,"u_instanceRemapDataTextureIndex"),o.BI=t.getUniformLocation(e,"u_instanceRemapIdentity"),o.N_=null),o.TI!=null&&(t.uniform1i(o.TI,this._I),o.y_=this._I),o.LI!=null&&(t.uniform1i(o.LI,this.MI),o.x_=this.MI),o.BI!=null&&(t.uniform1i(o.BI,this.vI),o.I_=this.vI)}g_(t,e){let i=e;if(i.TI==null)return;let r=this._I;i.y_!==r&&(t.uniform1i(i.TI,r),i.y_=r);let a=this.MI;i.x_!==a&&(t.uniform1i(i.LI,a),i.x_=a)}d_(t,e){let i=e;if(i.BI==null)return;let r=this.vI;i.I_!==r&&(t.uniform1i(i.BI,r),i.I_=r)}destroy(){let t=this.i.webglResourceRepository;this.__dataTextureUid!==v.InvalidCGAPIResourceUid&&(t.deleteTexture(this.__dataTextureUid),this.__dataTextureUid=v.InvalidCGAPIResourceUid),this.bI!==v.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.bI),this.bI=v.InvalidCGAPIResourceUid),this.gI!==v.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.gI),this.gI=v.InvalidCGAPIResourceUid),this.yI!==v.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.yI),this.yI=v.InvalidCGAPIResourceUid)}};B.GI=!0;var ie=B;export{ie as WebGLStrategyWebGL2};
|
|
146
|
+
`}return c}static getOffsetOfPropertyOfMaterial(t,e,i){return t.materialRepository.getLocationOffsetOfMemberOfMaterial(t,i,e)}static getOffsetOfPropertyOfGlobalDataRepository(t,e){return t.globalDataRepository.getLocationOffsetOfProperty(e)}$load(t){let e=t.mesh;return e==null?(ne.alertNoMeshSet(t),!1):(this.xI=this.i.globalDataRepository.getValue("currentComponentSIDs",0),e.isSetUpDone()||(e._updateVBOAndVAO(),this.O_()),!0)}O_(){if(this.__dataTextureUid===I.InvalidCGAPIResourceUid)return;let t=this.i.memoryManager.getBuffers(L.GPUVertexData),e=0;for(let i of t)e+=i.byteLength;e!==this.OI&&this.deleteDataTexture()}ZS(){let t=A.getMorphUniformDataOffsets();for(let i=0;i<A.getPrimitiveCountHasMorph();i++){let n=A.getPrimitiveHasMorph(i);if(n!=null)for(let a=0;a<n.targets.length;a++){let r=n.targets[a].get($.Position.XYZ),c=this.i.memoryManager.getByteOffsetOfExistingBuffers(L.GPUVertexData,r.bufferView.buffer.indexOfTheBufferUsage);this.wI[t[i]+a]=(this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData+c+r.byteOffsetInBuffer)/4/4}else break}let e=t[t.length-1];this.i.webglResourceRepository.updateUniformBuffer(this.gI,this.wI,0,e)}common_$load(){this.w_()}w_(){let t=!1,e=A.getMorphUniformDataOffsets(),i=Math.max(Math.ceil(e[e.length-1]/4)*4*4,4);if(i!==this.LI){if(this.gI!==I.InvalidCGAPIResourceUid&&(this.i.webglResourceRepository.deleteUniformBuffer(this.gI),this.gI=I.InvalidCGAPIResourceUid),this.LI=i,this.gI===I.InvalidCGAPIResourceUid){let a=new Uint32Array(i);this.wI=a,this.gI=this.i.webglResourceRepository.createUniformBufferWithBufferView(a),this.ZS()}this.LI=i,t=!0}let n=D._getMorphWeightsUniformBufferFloatCount(this.i);if(n!==this.QI){if(this.yI!==I.InvalidCGAPIResourceUid&&(this.i.webglResourceRepository.deleteUniformBuffer(this.yI),this.yI=I.InvalidCGAPIResourceUid),this.yI===I.InvalidCGAPIResourceUid){let a=new Float32Array(n);this.II=a,this.yI=this.i.webglResourceRepository.createUniformBufferWithBufferView(a),this.KS(!0)}this.QI=n,t=!0}t&&this.V_()}V_(){this.gI!==I.InvalidCGAPIResourceUid&&this.yI!==I.InvalidCGAPIResourceUid&&this.i.webglResourceRepository.setUniformBlockBindingForMorphOffsetsAndWeightsWithoutShaderProgram(this.gI,this.yI)}L_(){let t=A.getPrimitiveCountHasMorph();(t!==this.jI||this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData!==this.KI)&&(this.ZS(),this.KI=this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData,this.jI=t)}W_(){this.__createAndUpdateDataTextureInner()}__createAndUpdateDataTextureInner(){let t=this.i.memoryManager,i=t.getSizesOfTheBuffers(L.GPUInstanceData).reduce((c,s)=>c+s,0),n=t.getBuffers(L.GPUInstanceData),a=n.length;a!==this.JI&&(this.JI=a,this.deleteDataTexture());let o=this.i.webglResourceRepository.currentWebGLContextWrapper;if(o==null)return;let r=o.getMaxTextureSize();if(this.__dataTextureUid!==I.InvalidCGAPIResourceUid){let c=i/4/4,s=Math.ceil(c/r),h=r*s*4*4,l=this.i.lightClusterSystem,d=l._getExcludedByteRanges(),p=0;for(let f=0;f<n.length;f++){let g=n[f],x=g.takenSizeInByte;x>h&&ee.default.warn("The buffer size exceeds the size of the data texture.");let v=new Float32Array(g.getArrayBuffer());for(let[u,R]of oe(p,p+Math.min(x,h),d))this.CI(v,p,u,R,r);p+=g.byteLength}for(let[f,g]of l._takeDirtyByteRanges()){let x=0;for(let v of n){let u=x+v.byteLength;if(f>=x&&g<=u){let R=new Float32Array(v.getArrayBuffer());this.CI(R,x,f,g,r);break}x=u}}}else{let c=t.getBuffers(L.GPUVertexData),s=r*4*4,h=n.map(b=>Math.ceil(b.byteLength/s)*s),l=h.reduce((b,y)=>b+y,0),d=c.reduce((b,y)=>b+y.byteLength,0),p=Math.max(Math.ceil((l+d)/s),1),f=this.i.config.isMultiDrawEnabled&&this.i.webglResourceRepository.isInstanceSidTextureCapable,g=this.i.webglResourceRepository.instanceSidTable,x=f?Math.max(g.usedEnd,1):0,v=f?Math.max(Math.ceil(x/r),1):0,u=f?Math.max(Math.ceil(Math.ceil(x/4)/r),1):0,R=p+v+u;this.RI=r,this.DI=p,this.GI=p+v,this._I=this.DI*r,this.MI=this.GI*r,this.PI=x,this.OI=d,f&&g.markAllDirty(),this.i.engineState.totalSizeOfGPUShaderDataStorageExceptMorphData=l,this.__dataTextureUid=this.i.webglResourceRepository.createTexStorage2D({levels:1,internalFormat:ae.RGBA32F,width:r,height:R});let S=0;n.forEach((b,y)=>{this.CI(new Float32Array(b.getArrayBuffer()),S,S,S+b.takenSizeInByte,r),S+=h[y]}),c.forEach(b=>{this.CI(new Float32Array(b.getArrayBuffer()),S,S,S+b.byteLength,r),S+=b.byteLength}),this.i.lightClusterSystem._takeDirtyByteRanges()}}CI(t,e,i,n,a){let o=this.i.webglResourceRepository,r=Math.floor(i/16),c=Math.ceil(n/16),s=e/16,h=(l,d,p,f,g)=>{let x=(g-s)*4;o.updateTexture(this.__dataTextureUid,t.subarray(x,x+p*f*4),{level:0,offsetX:l,offsetY:d,width:p,height:f,format:Q.RGBA,type:C.Float})};for(;r<c;){let l=r%a,d=Math.floor(r/a);if(l!==0||c-r<a){let p=Math.min(a-l,c-r);h(l,d,p,1,r),r+=p}else{let p=Math.floor((c-r)/a);h(0,d,a,p,r),r+=p*a}}}deleteDataTexture(){this.__dataTextureUid!=null&&(this.i.webglResourceRepository.deleteTexture(this.__dataTextureUid),this.__dataTextureUid=I.InvalidCGAPIResourceUid),this.PI=0,this.RI=0,this.OI=0,this.SI=I.InvalidCGAPIResourceUid}prerender(){if(this.i.config.isMultiDrawEnabled&&this.i.webglResourceRepository.isInstanceSidTextureCapable){let e=this.i.webglResourceRepository.instanceSidTable;this.__dataTextureUid!==I.InvalidCGAPIResourceUid&&e.usedEnd>this.PI&&this.deleteDataTexture()}(re.getIsAnimating(this.i)||J.getUpdateCount(this.i)!==this.nr||q.getUpdateCount(this.i)!==this.qI||k.getCurrentCameraUpdateCount(this.i)!==this.hC||K(this.i)!==this.sr||this.i.materialRepository.stateVersion!==this.XI||this.i.lightClusterSystem.dataVersion!==this.YI||z.getUpdateCount(this.i)!==this.or||this.i._gpuInstanceDataVersion!==this.ZI||this.__dataTextureUid===I.InvalidCGAPIResourceUid)&&(this.W_(),this.$_(),this.nr=J.getUpdateCount(this.i),this.qI=q.getUpdateCount(this.i),this.hC=k.getCurrentCameraUpdateCount(this.i),this.sr=K(this.i),this.XI=this.i.materialRepository.stateVersion,this.YI=this.i.lightClusterSystem.dataVersion,this.or=z.getUpdateCount(this.i),this.ZI=this.i._gpuInstanceDataVersion),D.updateCount!==this.HI||D.getCountOfBlendShapeComponents(this.i)!==this.HS?(this.KS(),this.HI=D.updateCount,this.HS=D.getCountOfBlendShapeComponents(this.i),this.i.materialRepository._makeShaderInvalidateToMorphMaterials()):this.k_(),this.L_(),this.NI=this.i.componentRepository.getComponentsWithType(z)}KS(t=!1){let i=this.i.memoryManager.getBuffer(L.GPUVertexData);if(i==null||i.takenSizeInByte===0)return;let n=D._writeMorphWeightsUniformArray(this.i,this.II,t);this.VI=!1,n>0&&this.JS(n)}JS(t){this.i.webglResourceRepository.updateUniformBuffer(this.yI,this.II,0,t)}k_(){if(this.VI||this.II==null)return;this.VI=!0;let t=D._settlePreviousMorphWeights(this.i,this.II);t>0&&this.JS(t)}N_(){return this.i.webglResourceRepository.currentWebGLContextWrapper.isWebGL2&&this.i.config.isUboEnabled}$_(){if(this.N_()){let t=this.i.webglResourceRepository.currentWebGLContextWrapper,e=t.getAlignedMaxUniformBlockSize(),i=t.getMaxConventionUniformBlocks(),a=this.i.memoryManager.getBuffer(L.GPUInstanceData);if(this.bI===I.InvalidCGAPIResourceUid)this.bI=this.i.webglResourceRepository.setupUniformBufferDataArea(new Float32Array(a.getArrayBuffer()));else{let o=new Float32Array(a.getArrayBuffer());this.i.webglResourceRepository.updateUniformBuffer(this.bI,o,0,e*i/4)}}}attachGPUData(t){}attachGPUDataInner(t,e){}attachVertexData(t,e,i,n){}attachVertexDataInner(t,e,i,n,a){let o=this.i.webglResourceRepository.getWebGLResource(t.getVaoUids(i));if(o!=null)n.bindVertexArray(o);else{n.bindVertexArray(null);let r=e.vertexHandles;this.i.webglResourceRepository.setVertexDataToPipeline(r,e,t._variationVBOUid);let c=this.i.webglResourceRepository.getWebGLResource(r.iboHandle),s=n.getRawContext();s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,c)}}dettachVertexData(t){let e=t.getRawContext();t.bindVertexArray(null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindBuffer(e.ARRAY_BUFFER,null)}static init(t){return new P(t)}QS(t,e,i){if(i){let n=-1,a=this.i._webXRSystemIfEnabled;a!=null&&a.isWebXRMode&&(a.isMultiView()?n=a._getCameraComponentSIDAt(0):n=a._getCameraComponentSIDAt(e)),this.xI._v[N.CameraComponentTID]=n}else{let n=t.cameraComponent;n==null&&(n=this.i.componentRepository.getComponent(k,k.getCurrent(this.i))),n?this.xI._v[N.CameraComponentTID]=n.componentSID:this.xI._v[N.CameraComponentTID]=-1}}l_(t,e,i){this.xI==null&&(this.xI=this.i.globalDataRepository.getValue("currentComponentSIDs",0)),this.xI._v[0]=e.materialSID}F_(t,e,i){if(!this.i.config.isMultiDrawEnabled)return;let n=this.i.webglResourceRepository,a=n.currentWebGLContextWrapper;if(a==null||a.webgl2ExtMD==null)return;let o=n.instanceSidTable;if(!o.isSupported)return;let r=H._getInstanceCullingState(e),c=r!=null&&r.culledEntityCount>0;if(this.vI=c?0:1,!c){this.d_(o);return}let s=r.culledEntityStamp,h=r.cullTick,l=r.cullingId;for(let d=0;d<t.length;d++){let p=t[d];if(p===-1)continue;let f=i!=null?i[d]:A.getPrimitive(p);if(f==null)continue;let g=f.mesh;g==null||g._remapPrepassId===l||(g._remapPrepassId=l,g._packVisibleInstancesToVariationVBO(s,h))}this.d_(o)}d_(t){if(this.__dataTextureUid===I.InvalidCGAPIResourceUid||this.RI<=0)return;let e=t.usedEnd;if(e<=0){t.clearSidDirty(),t.clearRemapDirty();return}t.sidDirty&&(this.g_(this.DI,e,(i,n,a)=>t.writeSidTexels(i,n,a)),t.clearSidDirty()),t.remapDirty&&this.vI===0&&(this.g_(this.GI,Math.ceil(e/4),(i,n,a)=>t.writeRemapTexels(i,n,a)),t.clearRemapDirty())}g_(t,e,i){let n=this.RI,a=e,o=0,r=t;for(;a>0;){let c=Math.min(a,n),s=new Float32Array(c*4);i(s,o,c),this.i.webglResourceRepository.updateTexture(this.__dataTextureUid,s,{level:0,offsetX:0,offsetY:r,width:c,height:1,format:Q.RGBA,type:C.Float}),a-=c,o+=c,r++}}common_$render(t,e,i,n){typeof spector!="undefined"&&spector.setMarker("| | WebGL2:common_$render#");let a=this.i.webglResourceRepository.currentWebGLContextWrapper,o=a.getRawContextAsWebGL2(),r=G.isVrMainPass(this.i,e),c=G.getDisplayCount(r,this.i._webXRSystemIfEnabled),s=e._lastPrimitiveUids===t?e._lastPrimitives:null;if(e.isBufferLessRenderingMode())return this.z_(o,e,r),o.depthMask(!0),!0;this.F_(t,e,s);let h=!1;return e._toRenderOpaquePrimitives&&(e.depthWriteMask||o.depthMask(!1),h=this.AI(t,s,e._lastOpaqueIndex,0,-1,a,e,r,c)||h),e._toRenderTranslucentPrimitives&&(h=this.AI(t,s,e._lastOpaqueIndex+1,e._lastTranslucentIndex,1,a,e,r,c)||h),e._toRenderBlendWithZWritePrimitives&&(h=this.AI(t,s,e._lastTranslucentIndex+1,e._lastBlendWithZWriteIndex,1,a,e,r,c)||h),e._toRenderBlendWithoutZWritePrimitives&&(o.depthMask(!1),h=this.AI(t,s,e._lastBlendWithZWriteIndex+1,e._lastBlendWithoutZWriteIndex,1,a,e,r,c)||h),o.depthMask(!0),this.dettachVertexData(a),this.B_=i,h}z_(t,e,i){let n=e.material,a=e._dummyPrimitiveForBufferLessRendering;X(n,a,this);let o=n.getShaderProgramUid(a),r=this.i.webglResourceRepository.getWebGLResource(o);t.useProgram(r),this.SI=o,this.bindDataTexture(t,r),this.l_(t,n,r);let c=G.getDisplayCount(i,this.i._webXRSystemIfEnabled);G.setWebGLParameters(this.i,n,t),n._setParametersToGpuWebGLWithOutInternalSetting({shaderProgram:r,firstTime:!0}),e.depthWriteMask?t.depthMask(!0):t.depthMask(!1);let s=this.i.webglResourceRepository.currentWebGLContextWrapper;s!=null&&this.WI(s)&&(t.bindVertexArray(null),t.vertexAttribI4ui($.MaterialSid.getAttributeSlot(),n.materialSID,0,0,0),t.vertexAttribI4ui($.Instance.getAttributeSlot(),0,0,0,0),this.y_(t,r),this.x_(t,r));for(let h=0;h<c;h++){if(i?G.setVRViewport(this.i,e,h):this.i.webglResourceRepository.setViewport(this.i,e.getViewport()),this.QS(e,h,i),this.I_(t,r),this.S_(t,r),r.vrState!=null&&i){let l=this.i.globalDataRepository.getValue("vrState",0);l._v[0]=1,l._v[1]=c>1?h:0,r._gl.uniform2iv(r.vrState,l._v)}t.drawArrays(e._primitiveModeForBufferLessRendering.index,0,e._drawVertexNumberForBufferLessRendering)}}WI(t){return this.i.config.isMultiDrawEnabled&&t.webgl2ExtMD!=null&&this.i.webglResourceRepository.instanceSidTable.isSupported}H_(t,e,i){let n=$.MaterialSid.getAttributeSlot(),a=t._multiDrawGroup,o=i.getRawContextAsWebGL2();if(a==null||a.vertexHandles==null){o.vertexAttribI4ui(n,e.materialSID,0,0,0);return}let r=e===t.material,c=r?a.vertexHandles.vaoHandle:a.genericMaterialSidVaoHandle;if(c!=null){let s=this.i.webglResourceRepository.getWebGLResource(c);s!=null&&i.bindVertexArray(s)}r||o.vertexAttribI4ui(n,e.materialSID,0,0,0)}AI(t,e,i,n,a,o,r,c,s){let h=!c&&s===1&&this.i.config.isMultiDrawEnabled&&o.webgl2ExtMD!=null&&this.i.webglResourceRepository.isInstanceSidTextureCapable,l=!1;if(!h){for(let f=i;a>0?f<=n:f>=n;f+=a)l=this.TI(t[f],o,r,c,s,void 0,e==null?void 0:e[f])||l;return l}let p=le(i,n,a,f=>{let g=t[f];if(g===-1)return null;let x=e!=null?e[f]:A.getPrimitive(g);if(x==null||x._multiDrawGroup==null)return null;let v=r.getAppropriateMaterial(x);return v._materialContent.isMultiDrawCompatible?se(x,v,ce(x)):null},this.U_);for(let f=0;f<p.count;f++){let g=p.starts[f],x=p.counts[f];if(p.keys[f]===-1||x<2)for(let v=0;v<x;v++){let u=g+v*a;l=this.TI(t[u],o,r,c,s,void 0,e==null?void 0:e[u])||l}else l=this.j_(t,e,g,x,a,o,r,s)||l}return l}j_(t,e,i,n,a,o,r,c){var M;let s=e!=null?e[i]:A.getPrimitive(t[i]);if(s==null||s._multiDrawGroup==null)return!1;let h=s.mesh,l={primitive:s,mesh:h,indexed:s.hasIndices(),mode:s.primitiveMode.index,indexBitSize:s.getRenderIndexBitSize(),count:0,offset:0,instanceCount:0};if(!this.TI(t[i],o,r,!1,c,l,s)){let O=!1;for(let T=1;T<n;T++){let _=i+T*a;O=this.TI(t[_],o,r,!1,c,void 0,e==null?void 0:e[_])||O}return O}let p=s._multiDrawGroup,f=p.counts,g=p.offsets,x=p.instanceCounts,v=p.firsts,u=p.vertexCounts,R=l.indexed,S=o.getRawContextAsWebGL2(),b=0;f[b]=l.count,g[b]=l.offset,v[b]=l.offset,u[b]=l.count,x[b]=l.instanceCount,b++;let y=H._getInstanceCullingState(r),B=y==null?void 0:y.culledEntityStamp,E=(M=y==null?void 0:y.cullTick)!=null?M:0;for(let O=1;O<n;O++){let T=i+O*a,_=e!=null?e[T]:A.getPrimitive(t[T]);if(_==null||_._multiDrawGroup!==p)continue;let W=r.getAppropriateMaterial(_);if(W.getShaderProgramUid(_)===-1&&X(W,_,this),te(W,_))continue;let U=_.mesh._packVisibleInstancesToVariationVBO(B,E);if(U===0)continue;let w=_._multiDrawEntry;w!=null&&(f[b]=w.indexCount,g[b]=w.indexByteOffset,v[b]=w.vertexOffset,u[b]=w.vertexCount,x[b]=U,b++)}return b>=2?R?o.multiDrawElementsInstanced(l.mode,f,0,S.UNSIGNED_INT,g,0,x,0,b):o.multiDrawArraysInstanced(l.mode,v,0,u,0,x,0,b):b===1&&(R?S.drawElementsInstanced(l.mode,f[0],S.UNSIGNED_INT,g[0],x[0]):S.drawArraysInstanced(l.mode,v[0],u[0],x[0])),!0}TI(t,e,i,n,a,o,r){var b,y,B,E;let c=e.getRawContextAsWebGL2(),s=r!=null?r:A.getPrimitive(t);if(s==null)return!1;let h=s.mesh,l=h.meshEntitiesInner[0],d=i.getAppropriateMaterial(s);X(d,s,this);let p=l.getMeshRenderer(),f=H._getInstanceCullingState(i),g=h._packVisibleInstancesToVariationVBO(f==null?void 0:f.culledEntityStamp,(b=f==null?void 0:f.cullTick)!=null?b:0);if(g===0)return!1;let x=h.getPrimitiveIndexInMesh(s);this.attachVertexDataInner(h,s,x,e,h._variationVBOUid),this.WI(e)&&this.H_(s,d,e);let v=!1,u=!1,R=d.getShaderProgramUid(s);if(R!==this.SI||c.$A){if(te(d,s))return this.dettachVertexData(e),!1;let M=this.i.webglResourceRepository.getWebGLResource(R);c.useProgram(M),c.$A=!1,this.bindDataTexture(c,M),this.fI=M,v=!0,u=!0}((y=this.EI)==null?void 0:y.deref())!==d&&(u=!0,this.EI=new WeakRef(d)),this.kI!==d.stateVersion&&(u=!0,this.kI=d.stateVersion),this.WI(e)&&this.fI!=null&&(this.y_(c,this.fI),this.x_(c,this.fI));let S={glw:e,entity:l,worldMatrix:l.getSceneGraph().matrixInner,normalMatrix:l.getSceneGraph().normalMatrixInner,isBillboard:l.getSceneGraph().isBillboard,isVisible:l.getSceneGraph().isVisible,lightComponents:this.NI,renderPass:i,primitive:s,diffuseCube:p.diffuseCubeMap,specularCube:p.specularCubeMap,sheenCube:p.sheenCubeMap,isVr:n,displayIdx:-1};v&&d._setParametersToGpuWebGLPerShaderProgram({engine:this.i,material:d,shaderProgram:this.fI,firstTime:v,args:S}),u&&(this.l_(c,d,this.fI),G.setWebGLParameters(this.i,d,c),d._setParametersToGpuWebGL({engine:this.i,material:d,shaderProgram:this.fI,firstTime:u,args:S})),d._setParametersToGpuWebGLPerPrimitive({material:d,shaderProgram:this.fI,firstTime:u,args:S});for(let M=0;M<a;M++){if(n&&G.setVRViewport(this.i,i,M),this.QS(i,M,n),this.I_(c,this.fI),this.S_(c,this.fI),this.fI.vrState!=null&&n&&a>1){let F=this.i.globalDataRepository.getValue("vrState",0);F._v[0]=n?1:0,F._v[1]=M,this.fI._gl.uniform2iv(this.fI.vrState,F._v)}this.i.config.isMultiDrawEnabled&&e.webgl2ExtMD!=null&&this.i.webglResourceRepository.instanceSidTable.isSupported&&s._multiDrawGroup==null&&c.vertexAttribI4ui($.Instance.getAttributeSlot(),Math.max(0,h._instanceSidBase),0,0,0);let T=s.indicesAccessor,_=T!=null,W=s.getRenderIndexBitSize(),Y=W==="uint32"?c.UNSIGNED_INT:c.UNSIGNED_SHORT,U=s._multiDrawEntry,w=(B=U==null?void 0:U.indexByteOffset)!=null?B:0,Z=(E=U==null?void 0:U.vertexOffset)!=null?E:0;o!=null?(o.primitive=s,o.mesh=h,o.indexed=_,o.mode=s.primitiveMode.index,o.indexBitSize=W,o.count=_?T.elementCount:s.getVertexCountAsVerticesBased(),o.offset=_?w:Z,o.instanceCount=g):_?c.drawElementsInstanced(s.primitiveMode.index,T.elementCount,Y,w,g):c.drawArraysInstanced(s.primitiveMode.index,Z,s.getVertexCountAsVerticesBased(),g)}return this.SI=R,!0}S_(t,e){let i=e,n=i.lightClusterView;if(n==null)return;let a=this.xI._v[N.CameraComponentTID],o=this.i.lightClusterSystem,r=o.dataVersion;i._lightClusterViewCameraSid===a&&i._lightClusterViewVersion===r||(t.uniform4fv(n,o._getViewUniformData(a)),i._lightClusterViewCameraSid=a,i._lightClusterViewVersion=r)}I_(t,e){let i=this.xI._v,n=this.zI;if(this.FI===e&&n!=null&&n.length===i.length){let a=!0;for(let o=0;o<i.length;o++)if(n[o]!==i[o]){a=!1;break}if(a)return}t.uniform1fv(e.currentComponentSIDs,i),(n==null||n.length!==i.length)&&(n=new Float32Array(i.length),this.zI=n),n.set(i),this.FI=e}bindDataTexture(t,e){t.uniform1i(e.dataTexture,0),this.i.webglResourceRepository.bindTexture2D(0,this.__dataTextureUid);let i=this.i.webglResourceRepository.createOrGetTextureSamplerRepeatNearest();this.i.webglResourceRepository.bindTextureSampler(0,i),this.bindInstanceSidTextures(t,e)}bindInstanceSidTextures(t,e){let i=this.i.webglResourceRepository,n=i.currentWebGLContextWrapper;if(n==null||n.webgl2ExtMD==null||!this.i.config.isMultiDrawEnabled||!i.instanceSidTable.isSupported)return;let o=e;o.X_===void 0&&(o.BI=t.getUniformLocation(e,"u_instanceSidDataTextureIndex"),o.$I=t.getUniformLocation(e,"u_instanceRemapDataTextureIndex"),o.UI=t.getUniformLocation(e,"u_instanceRemapIdentity"),o.X_=null),o.BI!=null&&(t.uniform1i(o.BI,this._I),o.M_=this._I),o.$I!=null&&(t.uniform1i(o.$I,this.MI),o.C_=this.MI),o.UI!=null&&(t.uniform1i(o.UI,this.vI),o.A_=this.vI)}x_(t,e){let i=e;if(i.BI==null)return;let n=this._I;i.M_!==n&&(t.uniform1i(i.BI,n),i.M_=n);let a=this.MI;i.C_!==a&&(t.uniform1i(i.$I,a),i.C_=a)}y_(t,e){let i=e;if(i.UI==null)return;let n=this.vI;i.A_!==n&&(t.uniform1i(i.UI,n),i.A_=n)}destroy(){let t=this.i.webglResourceRepository;this.__dataTextureUid!==I.InvalidCGAPIResourceUid&&(t.deleteTexture(this.__dataTextureUid),this.__dataTextureUid=I.InvalidCGAPIResourceUid),this.bI!==I.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.bI),this.bI=I.InvalidCGAPIResourceUid),this.gI!==I.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.gI),this.gI=I.InvalidCGAPIResourceUid),this.yI!==I.InvalidCGAPIResourceUid&&(t.deleteUniformBuffer(this.yI),this.yI=I.InvalidCGAPIResourceUid)}};export{ie as WebGLStrategyWebGL2};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var o=`
|
|
2
2
|
|
|
3
3
|
/* shaderity: @{glslPrecision} */
|
|
4
4
|
|
|
@@ -8,14 +8,14 @@ var e=`
|
|
|
8
8
|
|
|
9
9
|
/* shaderity: @{prerequisites} */
|
|
10
10
|
|
|
11
|
-
uniform int u_shadingModel; // initialValue=0
|
|
12
|
-
uniform float u_alphaCutoff; // initialValue=0.01
|
|
13
|
-
uniform float u_shininess; // initialValue=5
|
|
14
|
-
uniform vec4 u_diffuseColorFactor; // initialValue=(1,1,1,1)
|
|
11
|
+
uniform int u_shadingModel; // initialValue=0, min=0, max=3, valueStep=1
|
|
12
|
+
uniform float u_alphaCutoff; // initialValue=0.01, min=0, max=1, valueStep=0.001
|
|
13
|
+
uniform float u_shininess; // initialValue=5, min=0, max=100, valueStep=0.1
|
|
14
|
+
uniform vec4 u_diffuseColorFactor; // initialValue=(1,1,1,1), min=0, max=1, valueStep=0.001
|
|
15
15
|
uniform sampler2D u_diffuseColorTexture; // initialValue=(1,white)
|
|
16
16
|
uniform sampler2D u_normalTexture; // initialValue=(2,blue)
|
|
17
|
-
uniform vec4 u_diffuseColorTextureTransform; // initialValue=(1,1,0,0)
|
|
18
|
-
uniform float u_diffuseColorTextureRotation; // initialValue=0
|
|
17
|
+
uniform vec4 u_diffuseColorTextureTransform; // initialValue=(1,1,0,0), min=-10, max=10, valueStep=0.001
|
|
18
|
+
uniform float u_diffuseColorTextureRotation; // initialValue=0, min=-6.2832, max=6.2832, valueStep=0.001
|
|
19
19
|
|
|
20
20
|
/* shaderity: @{renderTargetBegin} */
|
|
21
21
|
// #pragma shaderity: require(../common/deliot2019SeamlessTexture.glsl)
|
|
@@ -120,6 +120,15 @@ void classicShader(in vec4 vertexColor, in vec4 diffuseColorFactor, in vec4 diff
|
|
|
120
120
|
|
|
121
121
|
shadingColor.rgb += diffuse + specular;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
// Ambient lights: a uniform diffuse term with the same scale as the diffuse term of the lights above.
|
|
125
|
+
#ifdef RN_IS_LIGHTING
|
|
126
|
+
vec3 ambientAlbedo = diffuseColor.rgb / 2.0;
|
|
127
|
+
if (shadingModel == 1u) { // LAMBERT
|
|
128
|
+
ambientAlbedo *= 2.0; // for energy conservation, as above
|
|
129
|
+
}
|
|
130
|
+
shadingColor.rgb += ambientAlbedo * get_ambientLightIntensity(0u, 0u);
|
|
131
|
+
#endif
|
|
123
132
|
} else {
|
|
124
133
|
shadingColor.rgb = diffuseColor.rgb;
|
|
125
134
|
}
|
|
@@ -157,4 +166,4 @@ void main ()
|
|
|
157
166
|
// Pre-multiplied alpha
|
|
158
167
|
rt0 = vec4(shadingColor.rgb * shadingColor.a, shadingColor.a);
|
|
159
168
|
}
|
|
160
|
-
`,i="fragment",t=!0,
|
|
169
|
+
`,i="fragment",t=!0,a={code:o,shaderStage:i,isFragmentShader:t};export{o as code,a as default,t as isFragmentShader,i as shaderStage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e=`
|
|
2
2
|
/* shaderity: @{enableVertexExtensions} */
|
|
3
3
|
/* shaderity: @{glslPrecision} */
|
|
4
4
|
|
|
@@ -10,11 +10,11 @@ var t=`
|
|
|
10
10
|
|
|
11
11
|
/* shaderity: @{vertexInOut} */
|
|
12
12
|
|
|
13
|
-
uniform float u_pointSize; // initialValue=30
|
|
14
|
-
uniform vec3 u_pointDistanceAttenuation; // initialValue=(0,0.1,0.01)
|
|
13
|
+
uniform float u_pointSize; // initialValue=30, min=0, max=100, valueStep=0.1
|
|
14
|
+
uniform vec3 u_pointDistanceAttenuation; // initialValue=(0,0.1,0.01), min=0, max=1, valueStep=0.001
|
|
15
15
|
|
|
16
16
|
#ifdef RN_IS_MORPHING
|
|
17
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
17
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
18
18
|
#endif
|
|
19
19
|
|
|
20
20
|
|
|
@@ -66,4 +66,4 @@ void main()
|
|
|
66
66
|
gl_Position = vec4(0.0);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`,
|
|
69
|
+
`,t="vertex",a=!1,r={code:e,shaderStage:t,isFragmentShader:a};export{e as code,r as default,a as isFragmentShader,t as shaderStage};
|
|
@@ -5,7 +5,7 @@ var n=`
|
|
|
5
5
|
/* shaderity: @{vertexInOut} */
|
|
6
6
|
|
|
7
7
|
#ifdef RN_IS_MORPHING
|
|
8
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
8
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
9
9
|
#endif
|
|
10
10
|
|
|
11
11
|
|
package/dist/esm/webgl/shaderity_shaders/DepthEncodeSingleShader/DepthEncodeSingleShader.vert.js
CHANGED
|
@@ -8,7 +8,7 @@ var e=`
|
|
|
8
8
|
out vec4 v_position_inLocal;
|
|
9
9
|
|
|
10
10
|
#ifdef RN_IS_MORPHING
|
|
11
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
11
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
12
12
|
#endif
|
|
13
13
|
|
|
14
14
|
|
|
@@ -51,4 +51,4 @@ void main(){
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
}
|
|
54
|
-
`,t="vertex",
|
|
54
|
+
`,t="vertex",a=!1,r={code:e,shaderStage:t,isFragmentShader:a};export{e as code,r as default,a as isFragmentShader,t as shaderStage};
|
package/dist/esm/webgl/shaderity_shaders/DepthMomentEncodeShader/DepthMomentEncodeShader.vert.js
CHANGED
|
@@ -6,11 +6,11 @@ var t=`
|
|
|
6
6
|
|
|
7
7
|
/* shaderity: @{vertexInOut} */
|
|
8
8
|
|
|
9
|
-
uniform float u_pointSize; // initialValue=30, soloDatum=true
|
|
10
|
-
uniform vec3 u_pointDistanceAttenuation; // initialValue=(0.0, 0.1, 0.01), soloDatum=true
|
|
9
|
+
uniform float u_pointSize; // initialValue=30, soloDatum=true, min=0, max=100, valueStep=0.1
|
|
10
|
+
uniform vec3 u_pointDistanceAttenuation; // initialValue=(0.0, 0.1, 0.01), soloDatum=true, min=0, max=1, valueStep=0.001
|
|
11
11
|
|
|
12
12
|
#ifdef RN_IS_MORPHING
|
|
13
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
13
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ var t=`/* shaderity: @{enableVertexExtensions} */
|
|
|
4
4
|
/* shaderity: @{vertexInOut} */
|
|
5
5
|
|
|
6
6
|
#ifdef RN_IS_MORPHING
|
|
7
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
7
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
8
8
|
#endif
|
|
9
9
|
|
|
10
10
|
|
|
@@ -18,4 +18,4 @@ void main(){
|
|
|
18
18
|
/* shaderity: @{mainPrerequisites} */
|
|
19
19
|
/* shaderity: @{fullscreen} */
|
|
20
20
|
}
|
|
21
|
-
`,i="vertex",r=!1,
|
|
21
|
+
`,i="vertex",r=!1,a={code:t,shaderStage:i,isFragmentShader:r};export{t as code,a as default,r as isFragmentShader,i as shaderStage};
|
|
@@ -6,7 +6,7 @@ var i=`
|
|
|
6
6
|
|
|
7
7
|
/* shaderity: @{vertexInOut} */
|
|
8
8
|
#ifdef RN_IS_MORPHING
|
|
9
|
-
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true
|
|
9
|
+
uniform int u_currentPrimitiveIdx; // initialValue=0, isInternalSetting=true, soloDatum=false, needUniformInDataTextureMode=true, min=0, max=1024, valueStep=1
|
|
10
10
|
#endif
|
|
11
11
|
|
|
12
12
|
|
|
@@ -48,4 +48,4 @@ void main()
|
|
|
48
48
|
|
|
49
49
|
v_instanceIds = a_instanceIds;
|
|
50
50
|
}
|
|
51
|
-
`,t="vertex",
|
|
51
|
+
`,t="vertex",a=!1,r={code:i,shaderStage:t,isFragmentShader:a};export{i as code,r as default,a as isFragmentShader,t as shaderStage};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var r=`/* shaderity: @{glslPrecision} */
|
|
2
|
+
|
|
3
|
+
/* shaderity: @{definitions} */
|
|
4
|
+
|
|
5
|
+
/* shaderity: @{prerequisites} */
|
|
6
|
+
|
|
7
|
+
/* shaderity: @{vertexIn} */
|
|
8
|
+
|
|
9
|
+
uniform int u_envHdriFormat; // initialValue=0, min=0, max=5, valueStep=1
|
|
10
|
+
uniform float u_envRotation; // initialValue=0, min=-6.2832, max=6.2832, valueStep=0.001
|
|
11
|
+
uniform vec4 u_diffuseColorFactor; // initialValue=(1,1,1,1), min=0, max=1, valueStep=0.001
|
|
12
|
+
uniform samplerCube u_colorEnvTexture; // initialValue=(1,black)
|
|
13
|
+
uniform bool u_makeOutputSrgb; // initialValue=true, min=0, max=1, valueStep=1
|
|
14
|
+
uniform bool u_inverseEnvironment; // initialValue=false, min=0, max=1, valueStep=1
|
|
15
|
+
|
|
16
|
+
/* shaderity: @{renderTargetBegin} */
|
|
17
|
+
|
|
18
|
+
/* shaderity: @{getters} */
|
|
19
|
+
|
|
20
|
+
/* shaderity: @{matricesGetters} */
|
|
21
|
+
|
|
22
|
+
void main() {
|
|
23
|
+
/* shaderity: @{mainPrerequisites} */
|
|
24
|
+
|
|
25
|
+
#ifdef WEBGL2_MULTI_VIEW
|
|
26
|
+
// In multiview one pass draws both eye layers, so each layer has to read its own camera.
|
|
27
|
+
cameraSID += uint(v_displayIdx);
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
mat4 viewMatrix = get_viewMatrix(cameraSID);
|
|
31
|
+
mat4 projectionMatrix = get_projectionMatrix(cameraSID);
|
|
32
|
+
|
|
33
|
+
// Rebuild the world-space view direction for this pixel. The background has no
|
|
34
|
+
// geometry and no depth, so it must not depend on the camera's near / far planes.
|
|
35
|
+
vec2 ndc = v_texcoord_0 * 2.0 - 1.0;
|
|
36
|
+
|
|
37
|
+
vec3 viewDir;
|
|
38
|
+
if (abs(projectionMatrix[3][3] - 1.0) < 1e-6) {
|
|
39
|
+
// Orthographic camera: all rays share the view direction.
|
|
40
|
+
viewDir = vec3(0.0, 0.0, -1.0);
|
|
41
|
+
} else {
|
|
42
|
+
// Perspective camera: recover the view-space ray at the near plane from the
|
|
43
|
+
// projection matrix, which is independent of the near / far distances. Each
|
|
44
|
+
// WebXR eye has an off-center (asymmetric) frustum encoded in the third column,
|
|
45
|
+
// so add that offset back before dividing by the scale terms.
|
|
46
|
+
viewDir = normalize(vec3(
|
|
47
|
+
(ndc.x + projectionMatrix[2][0]) / projectionMatrix[0][0],
|
|
48
|
+
(ndc.y + projectionMatrix[2][1]) / projectionMatrix[1][1],
|
|
49
|
+
-1.0
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The upper-left 3x3 of the view matrix is a rotation, so its transpose maps
|
|
54
|
+
// a view-space direction to world space without a full matrix inverse.
|
|
55
|
+
vec3 dirWorld = normalize(transpose(mat3(viewMatrix)) * viewDir);
|
|
56
|
+
|
|
57
|
+
// Apply the same environment rotation as the environment sphere shader.
|
|
58
|
+
float envRotation = get_envRotation(materialSID, 0u);
|
|
59
|
+
float rot = envRotation;
|
|
60
|
+
mat3 rotEnvMatrix = mat3(cos(rot), 0.0, -sin(rot), 0.0, 1.0, 0.0, sin(rot), 0.0, cos(rot));
|
|
61
|
+
vec3 envDir = normalize(rotEnvMatrix * dirWorld);
|
|
62
|
+
|
|
63
|
+
if (get_inverseEnvironment(materialSID, 0u)) {
|
|
64
|
+
envDir.x *= -1.0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
vec4 diffuseColorFactor = get_diffuseColorFactor(materialSID, 0u);
|
|
68
|
+
vec4 diffuseTexel = texture(u_colorEnvTexture, envDir);
|
|
69
|
+
vec3 textureColor;
|
|
70
|
+
int envHdriFormat = get_envHdriFormat(materialSID, 0u);
|
|
71
|
+
if (envHdriFormat == 0) { // LDR_SRGB
|
|
72
|
+
textureColor = srgbToLinear(diffuseTexel.rgb);
|
|
73
|
+
} else if (envHdriFormat == 3) { // RGBE
|
|
74
|
+
textureColor = diffuseTexel.rgb * pow(2.0, diffuseTexel.a*255.0-128.0);
|
|
75
|
+
} else {
|
|
76
|
+
textureColor = diffuseTexel.rgb;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
rt0 = vec4(diffuseColorFactor.rgb * textureColor, diffuseColorFactor.a);
|
|
80
|
+
|
|
81
|
+
/* shaderity: @{outputSrgb} */
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
`,t="fragment",i=!0,a={code:r,shaderStage:t,isFragmentShader:i};export{r as code,a as default,i as isFragmentShader,t as shaderStage};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var t=`/* shaderity: @{enableVertexExtensions} */
|
|
2
|
+
/* shaderity: @{glslPrecision} */
|
|
3
|
+
|
|
4
|
+
/* shaderity: @{definitions} */
|
|
5
|
+
|
|
6
|
+
#ifdef WEBGL2_MULTI_VIEW
|
|
7
|
+
// The background is drawn into the multiview framebuffer, whose color attachment covers
|
|
8
|
+
// both eye layers. Without this declaration the program is not a multiview program and
|
|
9
|
+
// the draw leaves the background black.
|
|
10
|
+
layout(num_views=2) in;
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
/* shaderity: @{vertexInOut} */
|
|
14
|
+
|
|
15
|
+
/* shaderity: @{prerequisites} */
|
|
16
|
+
|
|
17
|
+
/* shaderity: @{getters} */
|
|
18
|
+
|
|
19
|
+
/* shaderity: @{matricesGetters} */
|
|
20
|
+
|
|
21
|
+
void main()
|
|
22
|
+
{
|
|
23
|
+
|
|
24
|
+
/* shaderity: @{mainPrerequisites} */
|
|
25
|
+
/* shaderity: @{fullscreen} */
|
|
26
|
+
|
|
27
|
+
#ifdef WEBGL2_MULTI_VIEW
|
|
28
|
+
// One multiview draw writes both eye layers. The fragment shader can not read
|
|
29
|
+
// gl_ViewID_OVR, so pass the eye index down with the other varyings.
|
|
30
|
+
v_displayIdx = float(gl_ViewID_OVR);
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
`,i="vertex",r=!1,a={code:t,shaderStage:i,isFragmentShader:r};export{t as code,a as default,r as isFragmentShader,i as shaderStage};
|
package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js
CHANGED
|
@@ -8,12 +8,12 @@ var o=`
|
|
|
8
8
|
|
|
9
9
|
/* shaderity: @{vertexIn} */
|
|
10
10
|
|
|
11
|
-
uniform int u_envHdriFormat; // initialValue=0
|
|
12
|
-
uniform float u_envRotation; // initialValue=0
|
|
13
|
-
uniform vec4 u_diffuseColorFactor; // initialValue=(1,1,1,1)
|
|
11
|
+
uniform int u_envHdriFormat; // initialValue=0, min=0, max=5, valueStep=1
|
|
12
|
+
uniform float u_envRotation; // initialValue=0, min=-6.2832, max=6.2832, valueStep=0.001
|
|
13
|
+
uniform vec4 u_diffuseColorFactor; // initialValue=(1,1,1,1), min=0, max=1, valueStep=0.001
|
|
14
14
|
uniform samplerCube u_colorEnvTexture; // initialValue=(1,black)
|
|
15
|
-
uniform bool u_makeOutputSrgb; // initialValue=true
|
|
16
|
-
uniform bool u_inverseEnvironment; // initialValue=false
|
|
15
|
+
uniform bool u_makeOutputSrgb; // initialValue=true, min=0, max=1, valueStep=1
|
|
16
|
+
uniform bool u_inverseEnvironment; // initialValue=false, min=0, max=1, valueStep=1
|
|
17
17
|
|
|
18
18
|
/* shaderity: @{renderTargetBegin} */
|
|
19
19
|
|
package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js
CHANGED
|
@@ -10,7 +10,7 @@ var i=`
|
|
|
10
10
|
|
|
11
11
|
/* shaderity: @{vertexInOut} */
|
|
12
12
|
|
|
13
|
-
uniform bool u_enableViewMatrix; // initialValue=true
|
|
13
|
+
uniform bool u_enableViewMatrix; // initialValue=true, min=0, max=1, valueStep=1
|
|
14
14
|
|
|
15
15
|
/* shaderity: @{prerequisites} */
|
|
16
16
|
|
|
@@ -43,4 +43,4 @@ void main(){
|
|
|
43
43
|
v_texcoord_0 = a_texcoord_0;
|
|
44
44
|
|
|
45
45
|
}
|
|
46
|
-
`,a="vertex",
|
|
46
|
+
`,a="vertex",e=!1,r={code:i,shaderStage:a,isFragmentShader:e};export{i as code,r as default,e as isFragmentShader,a as shaderStage};
|