@galacean/engine-core 2.0.0-alpha.6 → 2.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +28967 -22183
- package/dist/main.js.map +1 -1
- package/dist/module.js +28951 -22175
- package/dist/module.js.map +1 -1
- package/package.json +3 -5
- package/types/2d/assembler/ISpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/ISpriteRenderer.d.ts +3 -2
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
- package/types/2d/atlas/FontAtlas.d.ts +23 -1
- package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
- package/types/2d/sprite/Sprite.d.ts +30 -4
- package/types/2d/sprite/SpriteMask.d.ts +49 -1
- package/types/2d/sprite/SpriteRenderer.d.ts +35 -1
- package/types/2d/text/CharInfo.d.ts +20 -1
- package/types/2d/text/CharRenderInfo.d.ts +15 -1
- package/types/2d/text/Font.d.ts +11 -1
- package/types/2d/text/ITextRenderer.d.ts +3 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +54 -1
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +19 -2
- package/types/BasicResources.d.ts +58 -0
- package/types/Camera.d.ts +79 -1
- package/types/Canvas.d.ts +36 -7
- package/types/Component.d.ts +35 -2
- package/types/ComponentsDependencies.d.ts +38 -1
- package/types/ComponentsManager.d.ts +20 -0
- package/types/Engine.d.ts +114 -7
- package/types/EngineEventType.d.ts +13 -0
- package/types/Entity.d.ts +112 -21
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -2
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/Blitter.d.ts +1 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +15 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -0
- package/types/RenderPipeline/MaskManager.d.ts +36 -1
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
- package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
- package/types/RenderPipeline/RenderContext.d.ts +46 -1
- package/types/RenderPipeline/RenderElement.d.ts +26 -6
- package/types/RenderPipeline/RenderQueue.d.ts +23 -1
- package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
- package/types/RenderPipeline/VertexArea.d.ts +10 -1
- package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +4 -1
- package/types/Renderer.d.ts +82 -19
- package/types/Scene.d.ts +34 -7
- package/types/SceneManager.d.ts +18 -6
- package/types/Script.d.ts +41 -0
- package/types/Signal.d.ts +71 -0
- package/types/SystemInfo.d.ts +14 -2
- package/types/Transform.d.ts +26 -1
- package/types/UpdateFlag.d.ts +4 -1
- package/types/UpdateFlagManager.d.ts +41 -1
- package/types/Utils.d.ts +20 -0
- package/types/VirtualCamera.d.ts +16 -1
- package/types/animation/AnimationClip.d.ts +13 -2
- package/types/animation/AnimationClipCurveBinding.d.ts +17 -2
- package/types/animation/AnimationEvent.d.ts +2 -2
- package/types/animation/Animator.d.ts +49 -10
- package/types/animation/AnimatorController.d.ts +20 -2
- package/types/animation/AnimatorControllerLayer.d.ts +17 -2
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +46 -2
- package/types/animation/AnimatorStateInstance.d.ts +46 -0
- package/types/animation/AnimatorStateMachine.d.ts +17 -2
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
- package/types/animation/Keyframe.d.ts +1 -1
- package/types/animation/StateMachineScript.d.ts +2 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +9 -1
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +20 -2
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
- package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
- package/types/animation/index.d.ts +1 -0
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
- package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
- package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
- package/types/animation/internal/AnimatorStateData.d.ts +14 -1
- package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
- package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
- package/types/asset/AssetPromise.d.ts +4 -4
- package/types/asset/AssetType.d.ts +7 -9
- package/types/asset/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/JSONAsset.d.ts +1 -1
- package/types/asset/LoadItem.d.ts +1 -1
- package/types/asset/Loader.d.ts +2 -2
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +117 -9
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +18 -0
- package/types/audio/AudioSource.d.ts +20 -2
- package/types/base/Constant.d.ts +2 -19
- package/types/base/DataObject.d.ts +6 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/base/index.d.ts +1 -0
- package/types/clone/CloneDecorators.d.ts +37 -0
- package/types/clone/CloneUtil.d.ts +30 -0
- package/types/clone/ComponentCloner.d.ts +4 -10
- package/types/clone/ICloneHook.d.ts +12 -0
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/env-probe/Probe.d.ts +1 -1
- package/types/graphic/Buffer.d.ts +23 -3
- package/types/graphic/BufferUtil.d.ts +8 -0
- package/types/graphic/ElementRangeMapping.d.ts +9 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +58 -1
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -0
- package/types/graphic/TransformFeedbackPrimitive.d.ts +57 -0
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -0
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/graphic/VertexElement.d.ts +1 -0
- package/types/graphic/enums/BufferBindFlag.d.ts +5 -3
- package/types/index.d.ts +7 -4
- package/types/input/InputManager.d.ts +25 -6
- package/types/input/enums/PointerButton.d.ts +8 -0
- package/types/input/keyboard/KeyboardManager.d.ts +41 -1
- package/types/input/pointer/Pointer.d.ts +37 -1
- package/types/input/pointer/PointerEventData.d.ts +4 -0
- package/types/input/pointer/PointerManager.d.ts +58 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
- package/types/input/wheel/WheelManager.d.ts +34 -1
- package/types/lighting/AmbientLight.d.ts +9 -8
- package/types/lighting/DirectLight.d.ts +17 -0
- package/types/lighting/KHR_lights.d.ts +13 -1
- package/types/lighting/Light.d.ts +2 -0
- package/types/lighting/LightManager.d.ts +57 -0
- package/types/lighting/PointLight.d.ts +17 -0
- package/types/lighting/SpotLight.d.ts +17 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +37 -1
- package/types/material/BaseMaterial.d.ts +15 -11
- package/types/material/Material.d.ts +6 -9
- package/types/mesh/BlendShape.d.ts +14 -1
- package/types/mesh/BlendShapeFrame.d.ts +11 -4
- package/types/mesh/BlendShapeManager.d.ts +100 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/MeshRenderer.d.ts +42 -0
- package/types/mesh/MeshTangentUtils.d.ts +9 -0
- package/types/mesh/ModelMesh.d.ts +28 -12
- package/types/mesh/PrimitiveMesh.d.ts +266 -104
- package/types/mesh/PrimitiveMeshOptions.d.ts +415 -0
- package/types/mesh/Skin.d.ts +12 -3
- package/types/mesh/SkinnedMeshRenderer.d.ts +27 -1
- package/types/mesh/enums/PrimitiveMeshCapMode.d.ts +21 -0
- package/types/mesh/index.d.ts +2 -0
- package/types/mesh/primitive/MeshPathUtils.d.ts +13 -0
- package/types/mesh/primitive/PolygonUtils.d.ts +44 -0
- package/types/mesh/primitive/PrimitiveMeshBuilder.d.ts +25 -0
- package/types/mesh/primitive/PrimitiveMeshRestorer.d.ts +15 -0
- package/types/mesh/primitive/SubdivisionUtils.d.ts +9 -0
- package/types/particle/ParticleBounds.d.ts +87 -0
- package/types/particle/ParticleBufferUtils.d.ts +33 -1
- package/types/particle/ParticleGenerator.d.ts +142 -24
- package/types/particle/ParticleMaterial.d.ts +3 -1
- package/types/particle/ParticleRenderer.d.ts +62 -6
- package/types/particle/ParticleSubEmitterSpawnState.d.ts +36 -0
- package/types/particle/ParticleSystemManager.d.ts +17 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +48 -0
- package/types/particle/enums/ParticleInheritVelocityMode.d.ts +14 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +26 -1
- package/types/particle/enums/ParticleScaleMode.d.ts +5 -5
- package/types/particle/enums/ParticleSubEmitterInheritProperty.d.ts +17 -0
- package/types/particle/enums/ParticleSubEmitterType.d.ts +12 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +10 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +19 -1
- package/types/particle/index.d.ts +9 -0
- package/types/particle/modules/BirthSubEmitterCommand.d.ts +29 -0
- package/types/particle/modules/BirthSubEmitterState.d.ts +9 -0
- package/types/particle/modules/Burst.d.ts +23 -2
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +19 -0
- package/types/particle/modules/CustomDataModule.d.ts +90 -0
- package/types/particle/modules/DeathSubEmitterCommand.d.ts +19 -0
- package/types/particle/modules/EmissionModule.d.ts +51 -4
- package/types/particle/modules/EmissionState.d.ts +13 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/InheritVelocityModule.d.ts +86 -0
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +163 -0
- package/types/particle/modules/MainModule.d.ts +56 -11
- package/types/particle/modules/NoiseModule.d.ts +114 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +46 -4
- package/types/particle/modules/ParticleCompositeGradient.d.ts +8 -2
- package/types/particle/modules/ParticleCurve.d.ts +31 -2
- package/types/particle/modules/ParticleGeneratorModule.d.ts +9 -3
- package/types/particle/modules/ParticleGradient.d.ts +22 -5
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +27 -3
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +25 -0
- package/types/particle/modules/SubEmitter.d.ts +32 -0
- package/types/particle/modules/SubEmittersModule.d.ts +111 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +124 -3
- package/types/particle/modules/shape/BaseShape.d.ts +65 -2
- package/types/particle/modules/shape/BoxShape.d.ts +13 -2
- package/types/particle/modules/shape/CircleShape.d.ts +13 -1
- package/types/particle/modules/shape/ConeShape.d.ts +13 -4
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +26 -3
- package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
- package/types/particle/modules/shape/SphereShape.d.ts +13 -0
- package/types/physics/CharacterController.d.ts +24 -3
- package/types/physics/Collider.d.ts +47 -3
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +33 -7
- package/types/physics/HitResult.d.ts +2 -2
- package/types/physics/PhysicsMaterial.d.ts +11 -2
- package/types/physics/PhysicsScene.d.ts +99 -7
- package/types/physics/StaticCollider.d.ts +5 -0
- package/types/physics/enums/HingeJointFlag.d.ts +14 -1
- package/types/physics/joint/HingeJoint.d.ts +4 -0
- package/types/physics/joint/Joint.d.ts +22 -2
- package/types/physics/joint/JointLimits.d.ts +2 -1
- package/types/physics/joint/JointMotor.d.ts +2 -1
- package/types/physics/shape/ColliderShape.d.ts +44 -7
- package/types/physics/shape/MeshColliderShape.d.ts +13 -12
- package/types/postProcess/FinalPass.d.ts +20 -1
- package/types/postProcess/PostProcess.d.ts +11 -6
- package/types/postProcess/PostProcessEffect.d.ts +6 -1
- package/types/postProcess/PostProcessEffectParameter.d.ts +23 -3
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/PostProcessPass.d.ts +3 -2
- package/types/postProcess/PostProcessUberPass.d.ts +2 -1
- package/types/postProcess/effects/BloomEffect.d.ts +26 -1
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +74 -0
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +1 -0
- package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformShaderProgram.d.ts +4 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +39 -0
- package/types/renderingHardwareInterface/index.d.ts +5 -0
- package/types/shader/BuiltinShaders.d.ts +27 -0
- package/types/shader/Shader.d.ts +52 -25
- package/types/shader/ShaderBlockProperty.d.ts +19 -0
- package/types/shader/ShaderData.d.ts +43 -4
- package/types/shader/ShaderFactory.d.ts +77 -0
- package/types/shader/ShaderMacro.d.ts +17 -2
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +54 -0
- package/types/shader/ShaderPass.d.ts +42 -13
- package/types/shader/ShaderProgram.d.ts +92 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -0
- package/types/shader/ShaderProperty.d.ts +17 -0
- package/types/shader/ShaderTagKey.d.ts +2 -0
- package/types/shader/ShaderUniform.d.ts +49 -1
- package/types/shader/ShaderUniformBlock.d.ts +9 -1
- package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -0
- package/types/shader/enums/ShaderLanguage.d.ts +1 -3
- package/types/shader/enums/ShaderPreprocessorDirective.d.ts +22 -0
- package/types/shader/index.d.ts +3 -1
- package/types/shader/state/BlendState.d.ts +16 -1
- package/types/shader/state/DepthState.d.ts +16 -1
- package/types/shader/state/RasterState.d.ts +19 -1
- package/types/shader/state/RenderState.d.ts +13 -2
- package/types/shader/state/RenderTargetBlendState.d.ts +2 -1
- package/types/shader/state/StencilState.d.ts +15 -1
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -3
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +41 -1
- package/types/sky/Sky.d.ts +13 -4
- package/types/sky/SkyBoxMaterial.d.ts +0 -7
- package/types/texture/RenderTarget.d.ts +28 -3
- package/types/texture/Texture.d.ts +46 -12
- package/types/texture/Texture2D.d.ts +4 -1
- package/types/texture/Texture2DArray.d.ts +4 -1
- package/types/texture/TextureCube.d.ts +4 -1
- package/types/texture/TextureUtils.d.ts +15 -1
- package/types/texture/enums/TextureFormat.d.ts +1 -9
- package/types/trail/TrailRenderer.d.ts +13 -8
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +3 -1
- package/types/xr/XRManager.d.ts +28 -0
- package/types/RenderPipeline/BatchUtils.d.ts +0 -1
- package/types/RenderPipeline/SubRenderElement.d.ts +0 -22
- package/types/clone/CloneManager.d.ts +0 -31
- package/types/clone/enums/CloneMode.d.ts +0 -13
- package/types/mesh/PrimitiveMeshRestorer.d.ts +0 -1
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +0 -1
- package/types/shader/ShaderPool.d.ts +0 -1
- package/types/shader/ShaderProgramPool.d.ts +0 -1
- package/types/shader/state/index.d.ts +0 -6
- package/types/shaderlib/ShaderFactory.d.ts +0 -20
- package/types/shaderlib/ShaderLib.d.ts +0 -73
- package/types/shaderlib/index.d.ts +0 -1
- package/types/shaderlib/particle/index.d.ts +0 -15
- package/types/shaderlib/pbr/index.d.ts +0 -11
- package/types/shaderlib/shadow/index.d.ts +0 -8
|
@@ -13,6 +13,8 @@ export declare class PostProcess extends Component {
|
|
|
13
13
|
* The outer distance to start blending from, only takes effect when the `isGlobal` is false.
|
|
14
14
|
*/
|
|
15
15
|
blendDistance: number;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_effects: PostProcessEffect[];
|
|
16
18
|
private _priority;
|
|
17
19
|
private _isGlobal;
|
|
18
20
|
/**
|
|
@@ -33,31 +35,34 @@ export declare class PostProcess extends Component {
|
|
|
33
35
|
/**
|
|
34
36
|
* Get the PostProcessEffect by type.
|
|
35
37
|
* @param type - The type of PostProcessEffect
|
|
36
|
-
* @returns The
|
|
38
|
+
* @returns The effect, or `undefined` if none matches.
|
|
37
39
|
*/
|
|
38
|
-
getEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
40
|
+
getEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
39
41
|
/**
|
|
40
42
|
* Add a PostProcessEffect to the PostProcess.
|
|
41
43
|
* @remarks Only one effect of the same type can be added to the PostProcess.
|
|
42
44
|
* @param type - The type of PostProcessEffect
|
|
43
|
-
* @returns The
|
|
45
|
+
* @returns The added effect, or `undefined` if the type already exists.
|
|
44
46
|
*/
|
|
45
|
-
addEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
47
|
+
addEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
46
48
|
/**
|
|
47
49
|
* Remove a PostProcessEffect from the PostProcess.
|
|
48
50
|
* @param type - The type of PostProcessEffect
|
|
49
|
-
* @returns The
|
|
51
|
+
* @returns The removed effect, or `undefined` if none matches.
|
|
50
52
|
*/
|
|
51
|
-
removeEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
53
|
+
removeEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
52
54
|
/**
|
|
55
|
+
* @internal
|
|
53
56
|
* @inheritdoc
|
|
54
57
|
*/
|
|
55
58
|
_onEnableInScene(): void;
|
|
56
59
|
/**
|
|
60
|
+
* @internal
|
|
57
61
|
* @inheritdoc
|
|
58
62
|
*/
|
|
59
63
|
_onDisableInScene(): void;
|
|
60
64
|
/**
|
|
65
|
+
* @internal
|
|
61
66
|
* @inheritdoc
|
|
62
67
|
*/
|
|
63
68
|
_onDestroy(): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DataObject } from "../base/DataObject";
|
|
1
2
|
/**
|
|
2
3
|
* The base class for post process effect.
|
|
3
4
|
*/
|
|
4
|
-
export declare class PostProcessEffect {
|
|
5
|
+
export declare class PostProcessEffect extends DataObject {
|
|
5
6
|
private _enabled;
|
|
6
7
|
private _parameters;
|
|
7
8
|
private _parameterInitialized;
|
|
@@ -16,6 +17,10 @@ export declare class PostProcessEffect {
|
|
|
16
17
|
* This method can be overridden to control the effect's real validity.
|
|
17
18
|
*/
|
|
18
19
|
isValid(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
_lerp(to: PostProcessEffect, factor: number): void;
|
|
19
24
|
/**
|
|
20
25
|
* Get all parameters of the post process effect.
|
|
21
26
|
* @remarks
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataObject } from "../base/DataObject";
|
|
1
2
|
import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
3
|
import { Texture } from "../texture";
|
|
3
4
|
/**
|
|
@@ -5,7 +6,7 @@ import { Texture } from "../texture";
|
|
|
5
6
|
* @remarks
|
|
6
7
|
* The parameter will be mixed to a final value and be used in post process manager.
|
|
7
8
|
*/
|
|
8
|
-
export declare abstract class PostProcessEffectParameter<T> {
|
|
9
|
+
export declare abstract class PostProcessEffectParameter<T> extends DataObject {
|
|
9
10
|
/**
|
|
10
11
|
* Whether the parameter is enabled.
|
|
11
12
|
*/
|
|
@@ -18,6 +19,10 @@ export declare abstract class PostProcessEffectParameter<T> {
|
|
|
18
19
|
get value(): T;
|
|
19
20
|
set value(value: T);
|
|
20
21
|
constructor(value: T, needLerp?: boolean);
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_lerp(to: T, factor: number): void;
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* Represents a float parameter of a post process effect.
|
|
@@ -35,6 +40,9 @@ export declare class PostProcessEffectFloatParameter extends PostProcessEffectPa
|
|
|
35
40
|
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
36
41
|
*/
|
|
37
42
|
constructor(value: number, min?: number, max?: number, needLerp?: boolean);
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
38
46
|
_lerp(to: number, factor: number): void;
|
|
39
47
|
}
|
|
40
48
|
/**
|
|
@@ -50,12 +58,12 @@ export declare class PostProcessEffectBoolParameter extends PostProcessEffectPar
|
|
|
50
58
|
/**
|
|
51
59
|
* Represents a texture parameter of a post process effect.
|
|
52
60
|
*/
|
|
53
|
-
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture> {
|
|
61
|
+
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture | null> {
|
|
54
62
|
/**
|
|
55
63
|
* Create a new texture parameter.
|
|
56
64
|
* @param value - The default texture of the parameter
|
|
57
65
|
*/
|
|
58
|
-
constructor(value: Texture);
|
|
66
|
+
constructor(value: Texture | null);
|
|
59
67
|
}
|
|
60
68
|
/**
|
|
61
69
|
* Represents a color parameter of a post process effect.
|
|
@@ -67,6 +75,9 @@ export declare class PostProcessEffectColorParameter extends PostProcessEffectPa
|
|
|
67
75
|
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
68
76
|
*/
|
|
69
77
|
constructor(value: Color, needLerp?: boolean);
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
70
81
|
_lerp(to: Color, factor: number): void;
|
|
71
82
|
}
|
|
72
83
|
/**
|
|
@@ -79,6 +90,9 @@ export declare class PostProcessEffectVector2Parameter extends PostProcessEffect
|
|
|
79
90
|
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
80
91
|
*/
|
|
81
92
|
constructor(value: Vector2, needLerp?: boolean);
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
82
96
|
_lerp(to: Vector2, factor: number): void;
|
|
83
97
|
}
|
|
84
98
|
/**
|
|
@@ -91,6 +105,9 @@ export declare class PostProcessEffectVector3Parameter extends PostProcessEffect
|
|
|
91
105
|
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
92
106
|
*/
|
|
93
107
|
constructor(value: Vector3, needLerp?: boolean);
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
94
111
|
_lerp(to: Vector3, factor: number): void;
|
|
95
112
|
}
|
|
96
113
|
/**
|
|
@@ -103,6 +120,9 @@ export declare class PostProcessEffectVector4Parameter extends PostProcessEffect
|
|
|
103
120
|
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
104
121
|
*/
|
|
105
122
|
constructor(value: Vector4, needLerp?: boolean);
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
106
126
|
_lerp(to: Vector4, factor: number): void;
|
|
107
127
|
}
|
|
108
128
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { Camera } from "../Camera";
|
|
1
2
|
import { Scene } from "../Scene";
|
|
3
|
+
import { Material } from "../material";
|
|
4
|
+
import { RenderTarget } from "../texture";
|
|
5
|
+
import { PostProcess } from "./PostProcess";
|
|
2
6
|
import { PostProcessEffect } from "./PostProcessEffect";
|
|
3
7
|
/**
|
|
4
8
|
* A global manager of the PostProcess.
|
|
@@ -7,6 +11,12 @@ export declare class PostProcessManager {
|
|
|
7
11
|
readonly scene: Scene;
|
|
8
12
|
private static _tempColliders;
|
|
9
13
|
private static _tempVector3;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_uberMaterial: Material;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_postProcessNeedSorting: boolean;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_postProcessPassNeedSorting: boolean;
|
|
10
20
|
private _activePostProcesses;
|
|
11
21
|
private _swapRenderTarget;
|
|
12
22
|
private _srcRenderTarget;
|
|
@@ -22,6 +32,23 @@ export declare class PostProcessManager {
|
|
|
22
32
|
* @param scene - Scene to which the current PostProcessManager belongs
|
|
23
33
|
*/
|
|
24
34
|
constructor(scene: Scene);
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
* Whether has any valid post process pass.
|
|
38
|
+
*/
|
|
39
|
+
_isValid(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
_update(camera: Camera): void;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
_addPostProcess(postProcess: PostProcess): void;
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
_removePostProcess(postProcess: PostProcess): void;
|
|
25
52
|
/**
|
|
26
53
|
* Get the blend effect by type.
|
|
27
54
|
* @remarks
|
|
@@ -30,6 +57,22 @@ export declare class PostProcessManager {
|
|
|
30
57
|
* @returns The PostProcessEffect instance found
|
|
31
58
|
*/
|
|
32
59
|
getBlendEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T>;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
_render(camera: Camera, srcRenderTarget: RenderTarget, destRenderTarget: RenderTarget | null): void;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_releaseSwapRenderTarget(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
_releaseOutputRenderTarget(): void;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
_getOutputRenderTarget(camera: Camera): RenderTarget;
|
|
33
76
|
private _sortActivePostProcess;
|
|
34
77
|
private _resetDefaultValue;
|
|
35
78
|
private _initSwapRenderTarget;
|
|
@@ -40,10 +40,11 @@ export declare abstract class PostProcessPass extends EngineObject {
|
|
|
40
40
|
* Execute the post process pass if it is active.
|
|
41
41
|
* @param camera - The camera used to render
|
|
42
42
|
* @param srcTexture - The source texture from last render target
|
|
43
|
-
* @param destTarget - The destination render target
|
|
43
|
+
* @param destTarget - The destination render target, or null for the canvas
|
|
44
44
|
*/
|
|
45
|
-
abstract onRender(camera: Camera, srcTexture: Texture2D, destTarget: RenderTarget): void;
|
|
45
|
+
abstract onRender(camera: Camera, srcTexture: Texture2D, destTarget: RenderTarget | null): void;
|
|
46
46
|
/**
|
|
47
|
+
* @internal
|
|
47
48
|
* @inheritdoc
|
|
48
49
|
*/
|
|
49
50
|
_onDestroy(): void;
|
|
@@ -4,7 +4,7 @@ import { RenderTarget, Texture2D } from "../texture";
|
|
|
4
4
|
import { PostProcessManager } from "./PostProcessManager";
|
|
5
5
|
import { PostProcessPass } from "./PostProcessPass";
|
|
6
6
|
export declare class PostProcessUberPass extends PostProcessPass {
|
|
7
|
-
static readonly UBER_SHADER_NAME = "
|
|
7
|
+
static readonly UBER_SHADER_NAME = "PostProcess/Uber";
|
|
8
8
|
private _uberMaterial;
|
|
9
9
|
private _bloomMaterial;
|
|
10
10
|
private _mipDownRT;
|
|
@@ -17,6 +17,7 @@ export declare class PostProcessUberPass extends PostProcessPass {
|
|
|
17
17
|
*/
|
|
18
18
|
onRender(camera: Camera, srcTexture: Texture2D, destTarget: RenderTarget): void;
|
|
19
19
|
/**
|
|
20
|
+
* @internal
|
|
20
21
|
* @inheritdoc
|
|
21
22
|
*/
|
|
22
23
|
_onDestroy(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderMacro, ShaderProperty } from "../../shader";
|
|
1
2
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
2
3
|
import { PostProcessEffectBoolParameter, PostProcessEffectColorParameter, PostProcessEffectEnumParameter, PostProcessEffectFloatParameter, PostProcessEffectTextureParameter } from "../PostProcessEffectParameter";
|
|
3
4
|
/**
|
|
@@ -10,7 +11,31 @@ export declare enum BloomDownScaleMode {
|
|
|
10
11
|
Quarter = 1
|
|
11
12
|
}
|
|
12
13
|
export declare class BloomEffect extends PostProcessEffect {
|
|
13
|
-
static readonly SHADER_NAME = "
|
|
14
|
+
static readonly SHADER_NAME = "PostProcess/Bloom";
|
|
15
|
+
/** @internal */
|
|
16
|
+
static _maxIterations: number;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static _hqMacro: ShaderMacro;
|
|
19
|
+
/** @internal */
|
|
20
|
+
static _dirtMacro: ShaderMacro;
|
|
21
|
+
/** @internal */
|
|
22
|
+
static _bloomParams: ShaderProperty;
|
|
23
|
+
/** @internal */
|
|
24
|
+
static _lowMipTextureProp: ShaderProperty;
|
|
25
|
+
/** @internal */
|
|
26
|
+
static _lowMipTexelSizeProp: ShaderProperty;
|
|
27
|
+
/** @internal */
|
|
28
|
+
static _enableMacro: ShaderMacro;
|
|
29
|
+
/** @internal */
|
|
30
|
+
static _bloomTextureProp: ShaderProperty;
|
|
31
|
+
/** @internal */
|
|
32
|
+
static _dirtTextureProp: ShaderProperty;
|
|
33
|
+
/** @internal */
|
|
34
|
+
static _tintProp: ShaderProperty;
|
|
35
|
+
/** @internal */
|
|
36
|
+
static _bloomIntensityParams: ShaderProperty;
|
|
37
|
+
/** @internal */
|
|
38
|
+
static _dirtTilingOffsetProp: ShaderProperty;
|
|
14
39
|
/**
|
|
15
40
|
* Controls whether to use bicubic sampling instead of bilinear sampling for the upSampling passes.
|
|
16
41
|
* @remarks This is slightly more expensive but helps getting smoother visuals.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderMacro } from "../../shader";
|
|
1
2
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
2
3
|
import { PostProcessEffectEnumParameter } from "../PostProcessEffectParameter";
|
|
3
4
|
/**
|
|
@@ -18,6 +19,8 @@ export declare enum TonemappingMode {
|
|
|
18
19
|
ACES = 1
|
|
19
20
|
}
|
|
20
21
|
export declare class TonemappingEffect extends PostProcessEffect {
|
|
22
|
+
/** @internal */
|
|
23
|
+
static _enableMacro: ShaderMacro;
|
|
21
24
|
/**
|
|
22
25
|
* Use this to select a tonemapping algorithm to use.
|
|
23
26
|
*/
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Color, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import type { Canvas } from "../Canvas";
|
|
3
|
+
import type { Engine } from "../Engine";
|
|
4
|
+
import type { GLCapabilityType } from "../base/Constant";
|
|
5
|
+
import type { BufferBindFlag, BufferUsage, Primitive, SubPrimitive } from "../graphic";
|
|
6
|
+
import type { CameraClearFlags } from "../enums/CameraClearFlags";
|
|
7
|
+
import type { RenderTarget, Texture2D, Texture2DArray, TextureCube, TextureCubeFace, TextureFormat } from "../texture";
|
|
8
|
+
import type { IPlatformBuffer } from "./IPlatformBuffer";
|
|
9
|
+
import type { IPlatformPrimitive } from "./IPlatformPrimitive";
|
|
10
|
+
import type { IPlatformRenderTarget } from "./IPlatformRenderTarget";
|
|
11
|
+
import type { IPlatformShaderProgram } from "./IPlatformShaderProgram";
|
|
12
|
+
import type { IPlatformTexture } from "./IPlatformTexture";
|
|
13
|
+
import type { IPlatformTexture2D } from "./IPlatformTexture2D";
|
|
14
|
+
import type { IPlatformTexture2DArray } from "./IPlatformTexture2DArray";
|
|
15
|
+
import type { IPlatformTextureCube } from "./IPlatformTextureCube";
|
|
16
|
+
import type { IPlatformTransformFeedback } from "./IPlatformTransformFeedback";
|
|
17
|
+
import type { IPlatformTransformFeedbackPrimitive } from "./IPlatformTransformFeedbackPrimitive";
|
|
18
|
+
/** Graphics resource and command boundary used by the engine. */
|
|
19
|
+
export interface IHardwareRenderer {
|
|
20
|
+
/** WebGL access requires a graphics-capable backend. */
|
|
21
|
+
readonly gl: WebGL2RenderingContext;
|
|
22
|
+
readonly maxUniformBlockSize: number;
|
|
23
|
+
/** Whether this device can execute rendering commands. */
|
|
24
|
+
readonly supportsRendering: boolean;
|
|
25
|
+
readonly capability: {
|
|
26
|
+
readonly maxTextureSize: number;
|
|
27
|
+
readonly maxAntiAliasing: number;
|
|
28
|
+
readonly maxVertexUniformVectors: number;
|
|
29
|
+
};
|
|
30
|
+
/** @internal */
|
|
31
|
+
readonly _options: {
|
|
32
|
+
readonly depth?: boolean;
|
|
33
|
+
readonly stencil?: boolean;
|
|
34
|
+
readonly _forceFlush?: boolean;
|
|
35
|
+
readonly _maxAllowSkinUniformVectorCount?: number;
|
|
36
|
+
};
|
|
37
|
+
/** @internal */
|
|
38
|
+
_currentBindShaderProgram: IPlatformShaderProgram | null;
|
|
39
|
+
/** @internal */
|
|
40
|
+
_enableGlobalDepthBias: boolean;
|
|
41
|
+
init(canvas: Canvas, onDeviceLost: () => void, onDeviceRestored: () => void): void;
|
|
42
|
+
canIUse(capability: GLCapabilityType): boolean;
|
|
43
|
+
canIUseCompressedTextureInternalFormat(format: number): boolean;
|
|
44
|
+
supportsTextureFormat(format: TextureFormat): boolean;
|
|
45
|
+
supportsRenderTargetColorFormat(format: TextureFormat): boolean;
|
|
46
|
+
createPlatformPrimitive(primitive: Primitive): IPlatformPrimitive;
|
|
47
|
+
createPlatformBuffer(type: BufferBindFlag, byteLength: number, usage?: BufferUsage, data?: ArrayBuffer | ArrayBufferView): IPlatformBuffer;
|
|
48
|
+
createPlatformTexture2D(texture: Texture2D): IPlatformTexture2D;
|
|
49
|
+
createPlatformTexture2DArray(texture: Texture2DArray): IPlatformTexture2DArray;
|
|
50
|
+
createPlatformTextureCube(texture: TextureCube): IPlatformTextureCube;
|
|
51
|
+
createPlatformRenderTarget(target: RenderTarget): IPlatformRenderTarget;
|
|
52
|
+
createPlatformTransformFeedback(): IPlatformTransformFeedback;
|
|
53
|
+
createPlatformTransformFeedbackPrimitive(): IPlatformTransformFeedbackPrimitive;
|
|
54
|
+
activeRenderTarget(target: RenderTarget | null, viewport: Vector4, isFlipProjection: boolean | null, mipLevel?: number, faceIndex?: TextureCubeFace): void;
|
|
55
|
+
clearRenderTarget(engine: Engine, flags: CameraClearFlags, color?: Color | null): void;
|
|
56
|
+
drawPrimitive(primitive: Primitive, subPrimitive: SubPrimitive | null, program: IPlatformShaderProgram): void;
|
|
57
|
+
blitInternalRTByBlitFrameBuffer(source: RenderTarget | null, destination: RenderTarget, flags: CameraClearFlags, viewport: Vector4): void;
|
|
58
|
+
copyRenderTargetToSubTexture(source: RenderTarget | null, texture: Texture2D, viewport: Vector4): void;
|
|
59
|
+
viewport(x: number, y: number, width: number, height: number): void;
|
|
60
|
+
scissor(x: number, y: number, width: number, height: number): void;
|
|
61
|
+
activeTexture(textureID: number): void;
|
|
62
|
+
bindTexture(texture: IPlatformTexture): void;
|
|
63
|
+
bindUniformBufferBase(bindingPoint: number, buffer: IPlatformBuffer): void;
|
|
64
|
+
setGlobalDepthBias(bias: number, slopeBias: number): void;
|
|
65
|
+
enableRasterizerDiscard(): void;
|
|
66
|
+
disableRasterizerDiscard(): void;
|
|
67
|
+
invalidateShaderProgramState(): void;
|
|
68
|
+
flush(): void;
|
|
69
|
+
forceLoseDevice(): void;
|
|
70
|
+
forceRestoreDevice(): void;
|
|
71
|
+
isContextLost(): boolean;
|
|
72
|
+
resetState(): void;
|
|
73
|
+
destroy(): void;
|
|
74
|
+
}
|
|
@@ -3,5 +3,6 @@ export interface IPlatformBuffer {
|
|
|
3
3
|
bind(): void;
|
|
4
4
|
setData(byteLength: number, data: ArrayBuffer | ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number, options?: SetDataOptions): void;
|
|
5
5
|
getData(data: ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number): void;
|
|
6
|
+
copyFromBuffer(srcBuffer: IPlatformBuffer, srcByteOffset: number, dstByteOffset: number, byteLength: number): void;
|
|
6
7
|
destroy(): void;
|
|
7
8
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SubPrimitive } from "../graphic/SubPrimitive";
|
|
2
|
+
import type { IPlatformShaderProgram } from "./IPlatformShaderProgram";
|
|
3
|
+
export interface IPlatformPrimitive {
|
|
4
|
+
draw(shaderProgram: IPlatformShaderProgram, subPrimitive: SubPrimitive): void;
|
|
5
|
+
destroy(): void;
|
|
6
|
+
}
|
|
@@ -5,7 +5,6 @@ import { IPlatformTexture } from "./IPlatformTexture";
|
|
|
5
5
|
export interface IPlatformTexture2D extends IPlatformTexture {
|
|
6
6
|
/**
|
|
7
7
|
* Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
|
|
8
|
-
* @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
|
|
9
8
|
* @param colorBuffer - Color buffer data
|
|
10
9
|
* @param mipLevel - Texture mipmapping level
|
|
11
10
|
* @param x - X coordinate of area start
|
|
@@ -6,7 +6,6 @@ import { IPlatformTexture } from "./IPlatformTexture";
|
|
|
6
6
|
export interface IPlatformTextureCube extends IPlatformTexture {
|
|
7
7
|
/**
|
|
8
8
|
* Setting pixels data through cube face,color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
|
|
9
|
-
* @remarks When compressed texture is in WebGL1, the texture must be filled first before writing the sub-region
|
|
10
9
|
* @param face - Cube face
|
|
11
10
|
* @param colorBuffer - Color buffer data
|
|
12
11
|
* @param mipLevel - Texture mipmapping level
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IPlatformBuffer } from "./IPlatformBuffer";
|
|
2
|
+
/**
|
|
3
|
+
* Platform interface for Transform Feedback operations.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface IPlatformTransformFeedback {
|
|
7
|
+
/**
|
|
8
|
+
* Bind a buffer range as Transform Feedback output at the given index.
|
|
9
|
+
*/
|
|
10
|
+
bindBufferRange(index: number, buffer: IPlatformBuffer, byteOffset: number, byteSize: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Unbind buffer from Transform Feedback output at the given index.
|
|
13
|
+
*/
|
|
14
|
+
unbindBuffer(index: number): void;
|
|
15
|
+
/**
|
|
16
|
+
* Begin a Transform Feedback pass.
|
|
17
|
+
* @param primitiveMode - The primitive mode (e.g., POINTS)
|
|
18
|
+
*/
|
|
19
|
+
begin(primitiveMode: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* End the current Transform Feedback pass.
|
|
22
|
+
*/
|
|
23
|
+
end(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Bind this Transform Feedback object as the active TF.
|
|
26
|
+
*/
|
|
27
|
+
bind(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Unbind the Transform Feedback object.
|
|
30
|
+
*/
|
|
31
|
+
unbind(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Destroy native resources.
|
|
34
|
+
*/
|
|
35
|
+
destroy(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
2
|
+
import type { VertexElement } from "../graphic/VertexElement";
|
|
3
|
+
import type { IPlatformShaderProgram } from "./IPlatformShaderProgram";
|
|
4
|
+
/**
|
|
5
|
+
* Platform interface for Transform Feedback primitive operations.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface IPlatformTransformFeedbackPrimitive {
|
|
9
|
+
/**
|
|
10
|
+
* Bind the read layout, rebuilding cached state when its inputs change.
|
|
11
|
+
* @param program - Shader program (for attribute locations)
|
|
12
|
+
* @param bindingA - First feedback buffer binding
|
|
13
|
+
* @param bindingB - Second feedback buffer binding
|
|
14
|
+
* @param feedbackElements - Vertex elements for feedback buffer
|
|
15
|
+
* @param inputBindings - Input buffer bindings
|
|
16
|
+
* @param inputElements - Vertex elements for input buffers
|
|
17
|
+
* @param readIsA - Whether to use direction A as read
|
|
18
|
+
*/
|
|
19
|
+
bind(program: IPlatformShaderProgram, bindingA: VertexBufferBinding, bindingB: VertexBufferBinding, feedbackElements: VertexElement[], inputBindings: VertexBufferBinding[], inputElements: VertexElement[], readIsA: boolean): void;
|
|
20
|
+
/**
|
|
21
|
+
* Unbind attribute state.
|
|
22
|
+
*/
|
|
23
|
+
unbind(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Issue a draw call.
|
|
26
|
+
* @param mode - Primitive topology
|
|
27
|
+
* @param first - First vertex index
|
|
28
|
+
* @param count - Number of vertices
|
|
29
|
+
*/
|
|
30
|
+
draw(mode: number, first: number, count: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Invalidate cached state, forcing rebuild on next bind.
|
|
33
|
+
*/
|
|
34
|
+
invalidate(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Destroy native resources.
|
|
37
|
+
*/
|
|
38
|
+
destroy(): void;
|
|
39
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export type { IHardwareRenderer } from "./IHardwareRenderer";
|
|
1
2
|
export type { IPlatformBuffer } from "./IPlatformBuffer";
|
|
3
|
+
export type { IPlatformPrimitive } from "./IPlatformPrimitive";
|
|
2
4
|
export type { IPlatformRenderTarget } from "./IPlatformRenderTarget";
|
|
5
|
+
export type { IPlatformShaderProgram } from "./IPlatformShaderProgram";
|
|
3
6
|
export type { IPlatformTexture } from "./IPlatformTexture";
|
|
4
7
|
export type { IPlatformTexture2D } from "./IPlatformTexture2D";
|
|
5
8
|
export type { IPlatformTexture2DArray } from "./IPlatformTexture2DArray";
|
|
6
9
|
export type { IPlatformTextureCube } from "./IPlatformTextureCube";
|
|
10
|
+
export type { IPlatformTransformFeedback } from "./IPlatformTransformFeedback";
|
|
11
|
+
export type { IPlatformTransformFeedbackPrimitive } from "./IPlatformTransformFeedbackPrimitive";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Shader } from "./Shader";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface BuiltinShaders {
|
|
6
|
+
readonly blit: Shader;
|
|
7
|
+
readonly blitScreen: Shader;
|
|
8
|
+
readonly pbr: Shader;
|
|
9
|
+
readonly blinnPhong: Shader;
|
|
10
|
+
readonly unlit: Shader;
|
|
11
|
+
readonly skybox: Shader;
|
|
12
|
+
readonly skyProcedural: Shader;
|
|
13
|
+
readonly backgroundTexture: Shader;
|
|
14
|
+
readonly sprite: Shader;
|
|
15
|
+
readonly spriteMask: Shader;
|
|
16
|
+
readonly text: Shader;
|
|
17
|
+
readonly trail: Shader;
|
|
18
|
+
readonly ui: Shader;
|
|
19
|
+
readonly spine: Shader;
|
|
20
|
+
readonly particle: Shader;
|
|
21
|
+
readonly particleFeedback: Shader;
|
|
22
|
+
readonly uber: Shader;
|
|
23
|
+
readonly finalSRGB: Shader;
|
|
24
|
+
readonly finalAntiAliasing: Shader;
|
|
25
|
+
readonly bloom: Shader;
|
|
26
|
+
readonly scalableAmbientOcclusion: Shader;
|
|
27
|
+
}
|