@onerjs/core 8.25.2 → 8.25.3

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.
Files changed (119) hide show
  1. package/Bones/bone.js +14 -54
  2. package/Bones/bone.js.map +1 -1
  3. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js +1 -1
  4. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js.map +1 -1
  5. package/Engines/Native/nativeShaderProcessors.js +3 -0
  6. package/Engines/Native/nativeShaderProcessors.js.map +1 -1
  7. package/Engines/WebGL/webGL2ShaderProcessors.js +3 -0
  8. package/Engines/WebGL/webGL2ShaderProcessors.js.map +1 -1
  9. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.d.ts +3 -1
  10. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +4 -1
  11. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
  12. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +4 -1
  13. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  14. package/Engines/abstractEngine.d.ts +1 -1
  15. package/Engines/abstractEngine.functions.d.ts +2 -2
  16. package/Engines/abstractEngine.functions.js.map +1 -1
  17. package/Engines/abstractEngine.js +2 -2
  18. package/Engines/abstractEngine.js.map +1 -1
  19. package/Engines/nullEngine.js +1 -0
  20. package/Engines/nullEngine.js.map +1 -1
  21. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +3 -0
  22. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +10 -0
  23. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  24. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +3 -0
  25. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +10 -0
  26. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  27. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +8 -0
  28. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -1
  29. package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js +16 -0
  30. package/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js.map +1 -1
  31. package/FrameGraph/Node/Blocks/inputBlock.js +2 -0
  32. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
  33. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +6 -0
  34. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +16 -0
  35. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  36. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +8 -1
  37. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +40 -1
  38. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  39. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.d.ts +3 -1
  40. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +10 -7
  41. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  42. package/FrameGraph/frameGraph.d.ts +2 -2
  43. package/FrameGraph/frameGraph.js.map +1 -1
  44. package/FrameGraph/frameGraphTextureManager.js +4 -0
  45. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  46. package/Gizmos/cameraGizmo.js +11 -13
  47. package/Gizmos/cameraGizmo.js.map +1 -1
  48. package/Gizmos/planeDragGizmo.js +21 -13
  49. package/Gizmos/planeDragGizmo.js.map +1 -1
  50. package/Loading/sceneLoader.d.ts +3 -1
  51. package/Loading/sceneLoader.js +3 -2
  52. package/Loading/sceneLoader.js.map +1 -1
  53. package/Materials/Background/backgroundMaterial.js +1 -1
  54. package/Materials/Background/backgroundMaterial.js.map +1 -1
  55. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
  56. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  57. package/Materials/Node/nodeMaterial.d.ts +1 -1
  58. package/Materials/Node/nodeMaterial.js +3 -14
  59. package/Materials/Node/nodeMaterial.js.map +1 -1
  60. package/Materials/PBR/pbrBaseMaterial.js +1 -1
  61. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  62. package/Materials/Textures/renderTargetTexture.d.ts +5 -0
  63. package/Materials/Textures/renderTargetTexture.js +9 -0
  64. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  65. package/Materials/material.d.ts +17 -1
  66. package/Materials/material.js +38 -7
  67. package/Materials/material.js.map +1 -1
  68. package/Materials/materialDefines.d.ts +1 -0
  69. package/Materials/materialDefines.js +1 -0
  70. package/Materials/materialDefines.js.map +1 -1
  71. package/Materials/materialHelper.functions.d.ts +2 -1
  72. package/Materials/materialHelper.functions.js +3 -1
  73. package/Materials/materialHelper.functions.js.map +1 -1
  74. package/Materials/standardMaterial.js +1 -1
  75. package/Materials/standardMaterial.js.map +1 -1
  76. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +3 -10
  77. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  78. package/Meshes/geometry.js +4 -4
  79. package/Meshes/geometry.js.map +1 -1
  80. package/Misc/assetsManager.d.ts +81 -25
  81. package/Misc/assetsManager.js +70 -32
  82. package/Misc/assetsManager.js.map +1 -1
  83. package/Misc/fileTools.d.ts +2 -2
  84. package/Misc/fileTools.js +3 -1
  85. package/Misc/fileTools.js.map +1 -1
  86. package/Misc/sceneSerializer.js +3 -1
  87. package/Misc/sceneSerializer.js.map +1 -1
  88. package/Particles/IParticleSystem.d.ts +6 -0
  89. package/Particles/IParticleSystem.js.map +1 -1
  90. package/Particles/gpuParticleSystem.d.ts +4 -0
  91. package/Particles/gpuParticleSystem.js +4 -0
  92. package/Particles/gpuParticleSystem.js.map +1 -1
  93. package/Particles/thinParticleSystem.d.ts +4 -0
  94. package/Particles/thinParticleSystem.js +4 -0
  95. package/Particles/thinParticleSystem.js.map +1 -1
  96. package/Physics/joinedPhysicsEngineComponent.js +1 -1
  97. package/Physics/joinedPhysicsEngineComponent.js.map +1 -1
  98. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +5 -3
  99. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +22 -9
  100. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  101. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.js +3 -0
  102. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.js.map +1 -1
  103. package/Rendering/objectRenderer.d.ts +18 -2
  104. package/Rendering/objectRenderer.js +69 -29
  105. package/Rendering/objectRenderer.js.map +1 -1
  106. package/Rendering/outlineRenderer.d.ts +4 -0
  107. package/Rendering/outlineRenderer.js +10 -0
  108. package/Rendering/outlineRenderer.js.map +1 -1
  109. package/Shaders/pbr.vertex.js +1 -5
  110. package/Shaders/pbr.vertex.js.map +1 -1
  111. package/Shaders/ssao2.fragment.js +14 -2
  112. package/Shaders/ssao2.fragment.js.map +1 -1
  113. package/ShadersWGSL/ssao2.fragment.js +14 -2
  114. package/ShadersWGSL/ssao2.fragment.js.map +1 -1
  115. package/XR/features/WebXRDepthSensing.js +6 -2
  116. package/XR/features/WebXRDepthSensing.js.map +1 -1
  117. package/package.json +1 -1
  118. package/scene.js +2 -0
  119. package/scene.js.map +1 -1
@@ -638,6 +638,7 @@ export class NullEngine extends Engine {
638
638
  fullOptions.samplingMode = 3;
639
639
  }
640
640
  const texture = new InternalTexture(this, 5 /* InternalTextureSource.RenderTarget */);
641
+ rtWrapper.setTexture(texture);
641
642
  const width = size.width || size;
642
643
  const height = size.height || size;
643
644
  rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;
@@ -1 +1 @@
1
- {"version":3,"file":"nullEngine.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/nullEngine.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,MAAM,EAAE,M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CAAC;QAED,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAEkB,aAAa,CAAC,MAAmB,IAAS,CAAC;IAE9D;;OAEG;IACa,cAAc,KAAI,CAAC;IAEnB,gBAAgB,KAAU,CAAC;IAE3B,aAAa,KAAU,CAAC;IAExC,IAAoB,aAAa,CAAC,CAAS,IAAG,CAAC;IAE/B,gBAAgB,KAAU,CAAC;IAE3C;;OAEG;IACa,sCAAsC,CAClD,OAAwB,EACxB,cAAsB,EACtB,KAAa,EACb,MAAc,EACd,IAAqB,EACrB,YAAoB,CAAC,EACrB,MAAc,CAAC,IAChB,CAAC;IAEJ;;OAEG;IACa,4BAA4B,CAAC,OAAwB,EAAE,SAA0B,EAAE,YAAoB,CAAC,EAAE,MAAc,CAAC,IAAS,CAAC;IAEnJ;;OAEG;IACa,+BAA+B,CAAC,OAAwB,EAAE,SAA0B,EAAE,YAAoB,CAAC,EAAE,MAAc,CAAC,IAAS,CAAC;IAEtJ;;OAEG;IACa,qBAAqB,CAAC,OAAwB,EAAE,KAAuB,EAAE,YAAoB,CAAC,EAAE,MAAc,CAAC,IAAG,CAAC;CACtI","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport { Logger } from \"../Misc/logger\";\r\nimport type { Nullable, FloatArray, IndicesArray } from \"../types\";\r\nimport { Engine } from \"../Engines/engine\";\r\nimport type { RenderTargetCreationOptions } from \"../Materials/Textures/textureCreationOptions\";\r\nimport type { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport { Constants } from \"./constants\";\r\nimport type { IPipelineContext } from \"./IPipelineContext\";\r\nimport { DataBuffer } from \"../Buffers/dataBuffer\";\r\nimport type { IColor4Like, IViewportLike } from \"../Maths/math.like\";\r\nimport type { ISceneLike } from \"./abstractEngine\";\r\nimport { PerformanceConfigurator } from \"./performanceConfigurator\";\r\nimport type { DrawWrapper } from \"../Materials/drawWrapper\";\r\nimport { RenderTargetWrapper } from \"./renderTargetWrapper\";\r\nimport type { IStencilState } from \"../States/IStencilState\";\r\nimport { IsWrapper } from \"../Materials/drawWrapper.functions\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\ndeclare const global: any;\r\n\r\n/**\r\n * Options to create the null engine\r\n */\r\nexport class NullEngineOptions {\r\n /**\r\n * Render width (Default: 512)\r\n */\r\n public renderWidth = 512;\r\n /**\r\n * Render height (Default: 256)\r\n */\r\n public renderHeight = 256;\r\n\r\n /**\r\n * Texture size (Default: 512)\r\n */\r\n public textureSize = 512;\r\n\r\n /**\r\n * If delta time between frames should be constant\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n */\r\n public deterministicLockstep = false;\r\n\r\n /** Defines the seconds between each deterministic lock step */\r\n timeStep?: number;\r\n\r\n /**\r\n * Maximum about of steps between frames (Default: 4)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n */\r\n public lockstepMaxSteps = 4;\r\n\r\n /**\r\n * Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default\r\n */\r\n useHighPrecisionMatrix?: boolean;\r\n\r\n /**\r\n * If supplied, the HTMLCanvasElement to use (e.g. as the inputElement)\r\n */\r\n renderingCanvas?: HTMLCanvasElement;\r\n}\r\n\r\n/**\r\n * The null engine class provides support for headless version of babylon.js.\r\n * This can be used in server side scenario or for testing purposes\r\n */\r\nexport class NullEngine extends Engine {\r\n private _options: NullEngineOptions;\r\n\r\n /**\r\n * Gets a boolean indicating that the engine is running in deterministic lock step mode\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n * @returns true if engine is in deterministic lock step mode\r\n */\r\n public override isDeterministicLockStep(): boolean {\r\n return this._options.deterministicLockstep;\r\n }\r\n\r\n /**\r\n * Gets the max steps when engine is running in deterministic lock step\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n * @returns the max steps\r\n */\r\n public override getLockstepMaxSteps(): number {\r\n return this._options.lockstepMaxSteps;\r\n }\r\n\r\n /**\r\n * Gets the current hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @returns a number indicating the current hardware scaling level\r\n */\r\n public override getHardwareScalingLevel(): number {\r\n return 1.0;\r\n }\r\n\r\n public constructor(options: NullEngineOptions = new NullEngineOptions()) {\r\n super(null);\r\n\r\n if (options.deterministicLockstep === undefined) {\r\n options.deterministicLockstep = false;\r\n }\r\n\r\n if (options.timeStep !== undefined) {\r\n this._timeStep = options.timeStep;\r\n }\r\n\r\n if (options.lockstepMaxSteps === undefined) {\r\n options.lockstepMaxSteps = 4;\r\n }\r\n\r\n this._options = options;\r\n\r\n PerformanceConfigurator.SetMatrixPrecision(!!options.useHighPrecisionMatrix);\r\n\r\n // Init caps\r\n // We consider we are on a webgl1 capable device\r\n\r\n this._caps = {\r\n maxTexturesImageUnits: 16,\r\n maxVertexTextureImageUnits: 16,\r\n maxCombinedTexturesImageUnits: 32,\r\n maxTextureSize: 512,\r\n maxCubemapTextureSize: 512,\r\n maxDrawBuffers: 0,\r\n maxRenderTextureSize: 512,\r\n maxVertexAttribs: 16,\r\n maxVaryingVectors: 16,\r\n maxFragmentUniformVectors: 16,\r\n maxVertexUniformVectors: 16,\r\n shaderFloatPrecision: 10, // Minimum precision for mediump floats WebGL 1\r\n standardDerivatives: false,\r\n astc: null,\r\n pvrtc: null,\r\n etc1: null,\r\n etc2: null,\r\n bptc: null,\r\n maxAnisotropy: 0,\r\n uintIndices: false,\r\n fragmentDepthSupported: false,\r\n highPrecisionShaderSupported: true,\r\n colorBufferFloat: false,\r\n blendFloat: false,\r\n supportFloatTexturesResolve: false,\r\n rg11b10ufColorRenderable: false,\r\n textureFloat: false,\r\n textureFloatLinearFiltering: false,\r\n textureFloatRender: false,\r\n textureHalfFloat: false,\r\n textureHalfFloatLinearFiltering: false,\r\n textureHalfFloatRender: false,\r\n textureLOD: false,\r\n texelFetch: false,\r\n drawBuffersExtension: false,\r\n depthTextureExtension: false,\r\n vertexArrayObject: false,\r\n instancedArrays: false,\r\n supportOcclusionQuery: false,\r\n canUseTimestampForTimerQuery: false,\r\n maxMSAASamples: 1,\r\n blendMinMax: false,\r\n canUseGLInstanceID: false,\r\n canUseGLVertexID: false,\r\n supportComputeShaders: false,\r\n supportSRGBBuffers: false,\r\n supportTransformFeedbacks: false,\r\n textureMaxLevel: false,\r\n texture2DArrayMaxLayerCount: 128,\r\n disableMorphTargetTexture: false,\r\n textureNorm16: false,\r\n blendParametersPerTarget: false,\r\n dualSourceBlending: false,\r\n };\r\n\r\n this._features = {\r\n forceBitmapOverHTMLImageElement: false,\r\n supportRenderAndCopyToLodForFloatTextures: false,\r\n supportDepthStencilTexture: false,\r\n supportShadowSamplers: false,\r\n uniformBufferHardCheckMatrix: false,\r\n allowTexturePrefiltering: false,\r\n trackUbosInFrame: false,\r\n checkUbosContentBeforeUpload: false,\r\n supportCSM: false,\r\n basisNeedsPOT: false,\r\n support3DTextures: false,\r\n needTypeSuffixInShaderConstants: false,\r\n supportMSAA: false,\r\n supportSSAO2: false,\r\n supportIBLShadows: false,\r\n supportExtendedTextureFormats: false,\r\n supportSwitchCaseInShader: false,\r\n supportSyncTextureRead: false,\r\n needsInvertingBitmap: false,\r\n useUBOBindingCache: false,\r\n needShaderCodeInlining: false,\r\n needToAlwaysBindUniformBuffers: false,\r\n supportRenderPasses: true,\r\n supportSpriteInstancing: false,\r\n forceVertexBufferStrideAndOffsetMultiple4Bytes: false,\r\n _checkNonFloatVertexBuffersDontRecreatePipelineContext: false,\r\n _collectUbosUpdatedInFrame: false,\r\n };\r\n\r\n if (options.renderingCanvas) {\r\n this._renderingCanvas = options.renderingCanvas;\r\n }\r\n\r\n Logger.Log(`Babylon.js v${Engine.Version} - Null engine`);\r\n\r\n // Wrappers\r\n const theCurrentGlobal = typeof self !== \"undefined\" ? self : typeof global !== \"undefined\" ? global : window;\r\n if (typeof URL === \"undefined\") {\r\n theCurrentGlobal.URL = {\r\n createObjectURL: function () {},\r\n revokeObjectURL: function () {},\r\n };\r\n }\r\n if (typeof Blob === \"undefined\") {\r\n theCurrentGlobal.Blob = function () {};\r\n }\r\n }\r\n\r\n /**\r\n * Creates a vertex buffer\r\n * @param vertices the data for the vertex buffer\r\n * @returns the new WebGL static buffer\r\n */\r\n public override createVertexBuffer(vertices: FloatArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the content of the index buffer\r\n * @returns a new webGL buffer\r\n */\r\n public override createIndexBuffer(indices: IndicesArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Clear the current render buffer or the current render target (if any is set up)\r\n * @param color defines the color to use\r\n * @param backBuffer defines if the back buffer must be cleared\r\n * @param depth defines if the depth buffer must be cleared\r\n * @param stencil defines if the stencil buffer must be cleared\r\n */\r\n public override clear(color: IColor4Like, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {}\r\n\r\n /**\r\n * Gets the current render width\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render width\r\n */\r\n public override getRenderWidth(useScreen = false): number {\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.width;\r\n }\r\n\r\n return this._options.renderWidth;\r\n }\r\n\r\n /**\r\n * Gets the current render height\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render height\r\n */\r\n public override getRenderHeight(useScreen = false): number {\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.height;\r\n }\r\n\r\n return this._options.renderHeight;\r\n }\r\n\r\n /**\r\n * Set the WebGL's viewport\r\n * @param viewport defines the viewport element to be used\r\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\r\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\r\n */\r\n public override setViewport(viewport: IViewportLike, requiredWidth?: number, requiredHeight?: number): void {\r\n this._cachedViewport = viewport;\r\n }\r\n\r\n public override createShaderProgram(\r\n pipelineContext: IPipelineContext,\r\n vertexCode: string,\r\n fragmentCode: string,\r\n defines: string,\r\n context?: WebGLRenderingContext\r\n ): WebGLProgram {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n __SPECTOR_rebuildProgram: null,\r\n };\r\n }\r\n\r\n /**\r\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param uniformsNames defines the list of uniform names\r\n * @returns an array of webGL uniform locations\r\n */\r\n public override getUniforms(pipelineContext: IPipelineContext, uniformsNames: string[]): Nullable<WebGLUniformLocation>[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * Gets the lsit of active attributes for a given webGL program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param attributesNames defines the list of attribute names to get\r\n * @returns an array of indices indicating the offset of each attribute\r\n */\r\n public override getAttributes(pipelineContext: IPipelineContext, attributesNames: string[]): number[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * Binds an effect to the webGL context\r\n * @param effect defines the effect to bind\r\n */\r\n public override bindSamplers(effect: Effect): void {\r\n this._currentEffect = null;\r\n }\r\n\r\n /**\r\n * Activates an effect, making it the current one (ie. the one used for rendering)\r\n * @param effect defines the effect to activate\r\n */\r\n public override enableEffect(effect: Nullable<Effect | DrawWrapper>): void {\r\n effect = effect !== null && IsWrapper(effect) ? effect.effect : effect; // get only the effect, we don't need a Wrapper in the WebGL engine\r\n\r\n this._currentEffect = effect as Nullable<Effect>;\r\n if (!effect) {\r\n return;\r\n }\r\n\r\n if (effect.onBind) {\r\n effect.onBind(effect);\r\n }\r\n if (effect._onBindObservable) {\r\n effect._onBindObservable.notifyObservers(effect);\r\n }\r\n }\r\n\r\n public override setStateCullFaceType(cullBackFaces?: boolean, force?: boolean): void {}\r\n\r\n /**\r\n * Set various states to the webGL context\r\n * @param culling defines culling state: true to enable culling, false to disable it\r\n * @param zOffset defines the value to apply to zOffset (0 by default)\r\n * @param force defines if states must be applied even if cache is up to date\r\n * @param reverseSide defines if culling must be reversed (CCW if false, CW if true)\r\n * @param cullBackFaces true to cull back faces, false to cull front faces (if culling is enabled)\r\n * @param stencil stencil states to set\r\n * @param zOffsetUnits defines the value to apply to zOffsetUnits (0 by default)\r\n */\r\n public override setState(\r\n culling: boolean,\r\n zOffset: number = 0,\r\n force?: boolean,\r\n reverseSide = false,\r\n cullBackFaces?: boolean,\r\n stencil?: IStencilState,\r\n zOffsetUnits: number = 0\r\n ): void {}\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray2(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray3(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray4(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray2(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray3(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray4(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray2(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray3(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray4(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as matrices)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrices defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrices(uniform: WebGLUniformLocation, matrices: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a matrix (3x3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrix3x3(uniform: WebGLUniformLocation, matrix: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a matrix (2x2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrix2x2(uniform: WebGLUniformLocation, matrix: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a number (float)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the float number to store\r\n * @returns true if value was set\r\n */\r\n public override setFloat(uniform: WebGLUniformLocation, value: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec2\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat2(uniform: WebGLUniformLocation, x: number, y: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec3\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat3(uniform: WebGLUniformLocation, x: number, y: number, z: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a boolean\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param bool defines the boolean to store\r\n * @returns true if value was set\r\n */\r\n public setBool(uniform: WebGLUniformLocation, bool: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec4\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @param w defines the 4th component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat4(uniform: WebGLUniformLocation, x: number, y: number, z: number, w: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Sets the current alpha mode\r\n * @param mode defines the mode to use (one of the Engine.ALPHA_XXX)\r\n * @param noDepthWriteChange defines if depth writing state should remains unchanged (false by default)\r\n * @param targetIndex defines the index of the target to set the alpha mode for (default is 0)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering\r\n */\r\n public override setAlphaMode(mode: number, noDepthWriteChange: boolean = false, targetIndex = 0): void {\r\n if (this._alphaMode[targetIndex] === mode) {\r\n return;\r\n }\r\n\r\n this.alphaState.setAlphaBlend(mode !== Constants.ALPHA_DISABLE, 0);\r\n\r\n if (!noDepthWriteChange) {\r\n this.setDepthWrite(mode === Constants.ALPHA_DISABLE);\r\n }\r\n this._alphaMode[targetIndex] = mode;\r\n }\r\n\r\n /**\r\n * Bind webGl buffers directly to the webGL context\r\n * @param vertexBuffers defines the vertex buffer to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param effect defines the effect associated with the vertex buffer\r\n */\r\n public override bindBuffers(vertexBuffers: { [key: string]: VertexBuffer }, indexBuffer: DataBuffer, effect: Effect): void {}\r\n\r\n /**\r\n * Force the entire cache to be cleared\r\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\r\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\r\n */\r\n public override wipeCaches(bruteForce?: boolean): void {\r\n if (this.preventCacheWipeBetweenFrames) {\r\n return;\r\n }\r\n this.resetTextureCache();\r\n this._currentEffect = null;\r\n\r\n if (bruteForce) {\r\n this._currentProgram = null;\r\n\r\n this._stencilStateComposer.reset();\r\n this.depthCullingState.reset();\r\n this.alphaState.reset();\r\n }\r\n\r\n this._cachedVertexBuffers = null;\r\n this._cachedIndexBuffer = null;\r\n this._cachedEffectForVertexBuffers = null;\r\n }\r\n\r\n /**\r\n * Send a draw order\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void {}\r\n\r\n /**\r\n * Draw a list of indexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override drawElementsType(fillMode: number, indexStart: number, indexCount: number, instancesCount?: number): void {}\r\n\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override drawArraysType(fillMode: number, verticesStart: number, verticesCount: number, instancesCount?: number): void {}\r\n\r\n /** @internal */\r\n protected override _createTexture(): WebGLTexture {\r\n return {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _releaseTexture(texture: InternalTexture): void {}\r\n\r\n /**\r\n * Usually called from Texture.ts.\r\n * Passed information to create a WebGLTexture\r\n * @param urlArg defines a value which contains one of the following:\r\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\r\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\r\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\r\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\r\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\r\n * @param scene needed for loading to the correct scene\r\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\r\n * @param onLoad optional callback to be called upon successful completion\r\n * @param onError optional callback to be called upon failure\r\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\r\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\r\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\r\n * @param forcedExtension defines the extension to use to pick the right loader\r\n * @param mimeType defines an optional mime type\r\n * @returns a InternalTexture for assignment back into BABYLON.Texture\r\n */\r\n public override createTexture(\r\n urlArg: Nullable<string>,\r\n noMipmap: boolean,\r\n invertY: boolean,\r\n scene: Nullable<ISceneLike>,\r\n samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n onLoad: Nullable<(texture: InternalTexture) => void> = null,\r\n onError: Nullable<(message: string, exception: any) => void> = null,\r\n buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap> = null,\r\n fallback: Nullable<InternalTexture> = null,\r\n format: Nullable<number> = null,\r\n forcedExtension: Nullable<string> = null,\r\n mimeType?: string\r\n ): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Url);\r\n const url = String(urlArg);\r\n\r\n texture.url = url;\r\n texture.generateMipMaps = !noMipmap;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture.baseWidth = this._options.textureSize;\r\n texture.baseHeight = this._options.textureSize;\r\n texture.width = this._options.textureSize;\r\n texture.height = this._options.textureSize;\r\n if (format) {\r\n texture.format = format;\r\n }\r\n\r\n texture.isReady = true;\r\n\r\n if (onLoad) {\r\n setTimeout(() => {\r\n onLoad(texture);\r\n });\r\n }\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _createHardwareRenderTargetWrapper(\r\n isMulti: boolean,\r\n isCube: boolean,\r\n size: number | { width: number; height: number; depth?: number; layers?: number }\r\n ): RenderTargetWrapper {\r\n const rtWrapper = new RenderTargetWrapper(isMulti, isCube, size, this);\r\n this._renderTargetWrapperCache.push(rtWrapper);\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Creates a new render target wrapper\r\n * @param size defines the size of the texture\r\n * @param options defines the options used to create the texture\r\n * @returns a new render target wrapper\r\n */\r\n public override createRenderTargetTexture(size: any, options: boolean | RenderTargetCreationOptions): RenderTargetWrapper {\r\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, false, size);\r\n\r\n const fullOptions: RenderTargetCreationOptions = {};\r\n\r\n if (options !== undefined && typeof options === \"object\") {\r\n fullOptions.generateMipMaps = options.generateMipMaps;\r\n fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;\r\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;\r\n fullOptions.type = options.type === undefined ? Constants.TEXTURETYPE_UNSIGNED_BYTE : options.type;\r\n fullOptions.samplingMode = options.samplingMode === undefined ? Constants.TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;\r\n } else {\r\n fullOptions.generateMipMaps = options;\r\n fullOptions.generateDepthBuffer = true;\r\n fullOptions.generateStencilBuffer = false;\r\n fullOptions.type = Constants.TEXTURETYPE_UNSIGNED_BYTE;\r\n fullOptions.samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE;\r\n }\r\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\r\n\r\n const width = size.width || size;\r\n const height = size.height || size;\r\n\r\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\r\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.isReady = true;\r\n texture.samples = 1;\r\n texture.generateMipMaps = fullOptions.generateMipMaps ? true : false;\r\n texture.samplingMode = fullOptions.samplingMode;\r\n texture.type = fullOptions.type;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Creates a new render target wrapper\r\n * @param size defines the size of the texture\r\n * @param options defines the options used to create the texture\r\n * @returns a new render target wrapper\r\n */\r\n public override createRenderTargetCubeTexture(size: number, options?: RenderTargetCreationOptions): RenderTargetWrapper {\r\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\r\n\r\n const fullOptions = {\r\n generateMipMaps: true,\r\n generateDepthBuffer: true,\r\n generateStencilBuffer: false,\r\n type: Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n format: Constants.TEXTUREFORMAT_RGBA,\r\n ...options,\r\n };\r\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\r\n\r\n if (fullOptions.type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {\r\n // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE\r\n fullOptions.samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n } else if (fullOptions.type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {\r\n // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE\r\n fullOptions.samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n }\r\n\r\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\r\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;\r\n\r\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\r\n texture.baseWidth = size;\r\n texture.baseHeight = size;\r\n texture.width = size;\r\n texture.height = size;\r\n texture.isReady = true;\r\n texture.isCube = true;\r\n texture.samples = 1;\r\n texture.generateMipMaps = fullOptions.generateMipMaps ? true : false;\r\n texture.samplingMode = fullOptions.samplingMode;\r\n texture.type = fullOptions.type;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Update the sampling mode of a given texture\r\n * @param samplingMode defines the required sampling mode\r\n * @param texture defines the texture to update\r\n */\r\n public override updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void {\r\n texture.samplingMode = samplingMode;\r\n }\r\n\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n public override createRawTexture(\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n creationFlags = 0,\r\n useSRGBBuffer = false\r\n ): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Raw);\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.format = format;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n */\r\n public override updateRawTexture(\r\n texture: Nullable<InternalTexture>,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n useSRGBBuffer: boolean = false\r\n ): void {\r\n if (texture) {\r\n texture._bufferView = data;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n }\r\n }\r\n\r\n /**\r\n * Binds the frame buffer to the specified texture.\r\n * @param rtWrapper The render target wrapper to render to\r\n * @param faceIndex The face of the texture to render to in case of cube texture\r\n * @param requiredWidth The width of the target to render to\r\n * @param requiredHeight The height of the target to render to\r\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\r\n */\r\n public override bindFramebuffer(rtWrapper: RenderTargetWrapper, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean): void {\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n this._currentRenderTarget = rtWrapper;\r\n this._currentFramebuffer = null;\r\n if (this._cachedViewport && !forceFullscreenViewport) {\r\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\r\n }\r\n }\r\n\r\n /**\r\n * Unbind the current render target texture from the webGL context\r\n * @param rtWrapper defines the render target wrapper to unbind\r\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\r\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\r\n */\r\n public override unBindFramebuffer(rtWrapper: RenderTargetWrapper, disableGenerateMipMaps = false, onBeforeUnbind?: () => void): void {\r\n this._currentRenderTarget = null;\r\n\r\n if (onBeforeUnbind) {\r\n onBeforeUnbind();\r\n }\r\n this._currentFramebuffer = null;\r\n }\r\n\r\n /**\r\n * Creates a dynamic vertex buffer\r\n * @param vertices the data for the dynamic vertex buffer\r\n * @returns the new WebGL dynamic buffer\r\n */\r\n public override createDynamicVertexBuffer(vertices: FloatArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n buffer.capacity = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Update the content of a dynamic texture\r\n * @param texture defines the texture to update\r\n * @param canvas defines the canvas containing the source\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param premulAlpha defines if alpha is stored as premultiplied\r\n * @param format defines the format of the data\r\n */\r\n public override updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha: boolean = false, format?: number): void {}\r\n\r\n /**\r\n * Gets a boolean indicating if all created effects are ready\r\n * @returns true if all effects are ready\r\n */\r\n public override areAllEffectsReady(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Get the current error code of the webGL context\r\n * @returns the error code\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\r\n */\r\n public override getError(): number {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n public override _getUnpackAlignement(): number {\r\n return 1;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _unpackFlipY(value: boolean) {}\r\n\r\n /**\r\n * Update a dynamic index buffer\r\n * @param indexBuffer defines the target index buffer\r\n * @param indices defines the data to update\r\n * @param offset defines the offset in the target index buffer where update should start\r\n */\r\n public override updateDynamicIndexBuffer(indexBuffer: WebGLBuffer, indices: IndicesArray, offset: number = 0): void {}\r\n\r\n /**\r\n * Updates a dynamic vertex buffer.\r\n * @param vertexBuffer the vertex buffer to update\r\n * @param vertices the data used to update the vertex buffer\r\n * @param byteOffset the byte offset of the data (optional)\r\n * @param byteLength the byte length of the data (optional)\r\n */\r\n public override updateDynamicVertexBuffer(vertexBuffer: WebGLBuffer, vertices: FloatArray, byteOffset?: number, byteLength?: number): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _bindTextureDirectly(target: number, texture: InternalTexture): boolean {\r\n if (this._boundTexturesCache[this._activeChannel] !== texture) {\r\n this._boundTexturesCache[this._activeChannel] = texture;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _bindTexture(channel: number, texture: InternalTexture): void {\r\n if (channel < 0) {\r\n return;\r\n }\r\n\r\n this._bindTextureDirectly(0, texture);\r\n }\r\n\r\n protected override _deleteBuffer(buffer: WebGLBuffer): void {}\r\n\r\n /**\r\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\r\n */\r\n public override releaseEffects() {}\r\n\r\n public override displayLoadingUI(): void {}\r\n\r\n public override hideLoadingUI(): void {}\r\n\r\n public override set loadingUIText(_: string) {}\r\n\r\n public override flushFramebuffer(): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadCompressedDataToTextureDirectly(\r\n texture: InternalTexture,\r\n internalFormat: number,\r\n width: number,\r\n height: number,\r\n data: ArrayBufferView,\r\n faceIndex: number = 0,\r\n lod: number = 0\r\n ) {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadImageToTexture(texture: InternalTexture, image: HTMLImageElement, faceIndex: number = 0, lod: number = 0) {}\r\n}\r\n"]}
1
+ {"version":3,"file":"nullEngine.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/nullEngine.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAyB,MAAM,uCAAuC,CAAC;AAE/F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAK/D;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAA9B;QACI;;WAEG;QACI,gBAAW,GAAG,GAAG,CAAC;QACzB;;WAEG;QACI,iBAAY,GAAG,GAAG,CAAC;QAE1B;;WAEG;QACI,gBAAW,GAAG,GAAG,CAAC;QAEzB;;;WAGG;QACI,0BAAqB,GAAG,KAAK,CAAC;QAKrC;;;WAGG;QACI,qBAAgB,GAAG,CAAC,CAAC;IAWhC,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,MAAM;IAGlC;;;;OAIG;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AAoB,CAAC,EAAE,MAAc,CAAC,IAAG,CAAC;CACtI","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport { Logger } from \"../Misc/logger\";\r\nimport type { Nullable, FloatArray, IndicesArray } from \"../types\";\r\nimport { Engine } from \"../Engines/engine\";\r\nimport type { RenderTargetCreationOptions } from \"../Materials/Textures/textureCreationOptions\";\r\nimport type { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { InternalTexture, InternalTextureSource } from \"../Materials/Textures/internalTexture\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport { Constants } from \"./constants\";\r\nimport type { IPipelineContext } from \"./IPipelineContext\";\r\nimport { DataBuffer } from \"../Buffers/dataBuffer\";\r\nimport type { IColor4Like, IViewportLike } from \"../Maths/math.like\";\r\nimport type { ISceneLike } from \"./abstractEngine\";\r\nimport { PerformanceConfigurator } from \"./performanceConfigurator\";\r\nimport type { DrawWrapper } from \"../Materials/drawWrapper\";\r\nimport { RenderTargetWrapper } from \"./renderTargetWrapper\";\r\nimport type { IStencilState } from \"../States/IStencilState\";\r\nimport { IsWrapper } from \"../Materials/drawWrapper.functions\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\ndeclare const global: any;\r\n\r\n/**\r\n * Options to create the null engine\r\n */\r\nexport class NullEngineOptions {\r\n /**\r\n * Render width (Default: 512)\r\n */\r\n public renderWidth = 512;\r\n /**\r\n * Render height (Default: 256)\r\n */\r\n public renderHeight = 256;\r\n\r\n /**\r\n * Texture size (Default: 512)\r\n */\r\n public textureSize = 512;\r\n\r\n /**\r\n * If delta time between frames should be constant\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n */\r\n public deterministicLockstep = false;\r\n\r\n /** Defines the seconds between each deterministic lock step */\r\n timeStep?: number;\r\n\r\n /**\r\n * Maximum about of steps between frames (Default: 4)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n */\r\n public lockstepMaxSteps = 4;\r\n\r\n /**\r\n * Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default\r\n */\r\n useHighPrecisionMatrix?: boolean;\r\n\r\n /**\r\n * If supplied, the HTMLCanvasElement to use (e.g. as the inputElement)\r\n */\r\n renderingCanvas?: HTMLCanvasElement;\r\n}\r\n\r\n/**\r\n * The null engine class provides support for headless version of babylon.js.\r\n * This can be used in server side scenario or for testing purposes\r\n */\r\nexport class NullEngine extends Engine {\r\n private _options: NullEngineOptions;\r\n\r\n /**\r\n * Gets a boolean indicating that the engine is running in deterministic lock step mode\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n * @returns true if engine is in deterministic lock step mode\r\n */\r\n public override isDeterministicLockStep(): boolean {\r\n return this._options.deterministicLockstep;\r\n }\r\n\r\n /**\r\n * Gets the max steps when engine is running in deterministic lock step\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#deterministic-lockstep\r\n * @returns the max steps\r\n */\r\n public override getLockstepMaxSteps(): number {\r\n return this._options.lockstepMaxSteps;\r\n }\r\n\r\n /**\r\n * Gets the current hardware scaling level.\r\n * By default the hardware scaling level is computed from the window device ratio.\r\n * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.\r\n * @returns a number indicating the current hardware scaling level\r\n */\r\n public override getHardwareScalingLevel(): number {\r\n return 1.0;\r\n }\r\n\r\n public constructor(options: NullEngineOptions = new NullEngineOptions()) {\r\n super(null);\r\n\r\n if (options.deterministicLockstep === undefined) {\r\n options.deterministicLockstep = false;\r\n }\r\n\r\n if (options.timeStep !== undefined) {\r\n this._timeStep = options.timeStep;\r\n }\r\n\r\n if (options.lockstepMaxSteps === undefined) {\r\n options.lockstepMaxSteps = 4;\r\n }\r\n\r\n this._options = options;\r\n\r\n PerformanceConfigurator.SetMatrixPrecision(!!options.useHighPrecisionMatrix);\r\n\r\n // Init caps\r\n // We consider we are on a webgl1 capable device\r\n\r\n this._caps = {\r\n maxTexturesImageUnits: 16,\r\n maxVertexTextureImageUnits: 16,\r\n maxCombinedTexturesImageUnits: 32,\r\n maxTextureSize: 512,\r\n maxCubemapTextureSize: 512,\r\n maxDrawBuffers: 0,\r\n maxRenderTextureSize: 512,\r\n maxVertexAttribs: 16,\r\n maxVaryingVectors: 16,\r\n maxFragmentUniformVectors: 16,\r\n maxVertexUniformVectors: 16,\r\n shaderFloatPrecision: 10, // Minimum precision for mediump floats WebGL 1\r\n standardDerivatives: false,\r\n astc: null,\r\n pvrtc: null,\r\n etc1: null,\r\n etc2: null,\r\n bptc: null,\r\n maxAnisotropy: 0,\r\n uintIndices: false,\r\n fragmentDepthSupported: false,\r\n highPrecisionShaderSupported: true,\r\n colorBufferFloat: false,\r\n blendFloat: false,\r\n supportFloatTexturesResolve: false,\r\n rg11b10ufColorRenderable: false,\r\n textureFloat: false,\r\n textureFloatLinearFiltering: false,\r\n textureFloatRender: false,\r\n textureHalfFloat: false,\r\n textureHalfFloatLinearFiltering: false,\r\n textureHalfFloatRender: false,\r\n textureLOD: false,\r\n texelFetch: false,\r\n drawBuffersExtension: false,\r\n depthTextureExtension: false,\r\n vertexArrayObject: false,\r\n instancedArrays: false,\r\n supportOcclusionQuery: false,\r\n canUseTimestampForTimerQuery: false,\r\n maxMSAASamples: 1,\r\n blendMinMax: false,\r\n canUseGLInstanceID: false,\r\n canUseGLVertexID: false,\r\n supportComputeShaders: false,\r\n supportSRGBBuffers: false,\r\n supportTransformFeedbacks: false,\r\n textureMaxLevel: false,\r\n texture2DArrayMaxLayerCount: 128,\r\n disableMorphTargetTexture: false,\r\n textureNorm16: false,\r\n blendParametersPerTarget: false,\r\n dualSourceBlending: false,\r\n };\r\n\r\n this._features = {\r\n forceBitmapOverHTMLImageElement: false,\r\n supportRenderAndCopyToLodForFloatTextures: false,\r\n supportDepthStencilTexture: false,\r\n supportShadowSamplers: false,\r\n uniformBufferHardCheckMatrix: false,\r\n allowTexturePrefiltering: false,\r\n trackUbosInFrame: false,\r\n checkUbosContentBeforeUpload: false,\r\n supportCSM: false,\r\n basisNeedsPOT: false,\r\n support3DTextures: false,\r\n needTypeSuffixInShaderConstants: false,\r\n supportMSAA: false,\r\n supportSSAO2: false,\r\n supportIBLShadows: false,\r\n supportExtendedTextureFormats: false,\r\n supportSwitchCaseInShader: false,\r\n supportSyncTextureRead: false,\r\n needsInvertingBitmap: false,\r\n useUBOBindingCache: false,\r\n needShaderCodeInlining: false,\r\n needToAlwaysBindUniformBuffers: false,\r\n supportRenderPasses: true,\r\n supportSpriteInstancing: false,\r\n forceVertexBufferStrideAndOffsetMultiple4Bytes: false,\r\n _checkNonFloatVertexBuffersDontRecreatePipelineContext: false,\r\n _collectUbosUpdatedInFrame: false,\r\n };\r\n\r\n if (options.renderingCanvas) {\r\n this._renderingCanvas = options.renderingCanvas;\r\n }\r\n\r\n Logger.Log(`Babylon.js v${Engine.Version} - Null engine`);\r\n\r\n // Wrappers\r\n const theCurrentGlobal = typeof self !== \"undefined\" ? self : typeof global !== \"undefined\" ? global : window;\r\n if (typeof URL === \"undefined\") {\r\n theCurrentGlobal.URL = {\r\n createObjectURL: function () {},\r\n revokeObjectURL: function () {},\r\n };\r\n }\r\n if (typeof Blob === \"undefined\") {\r\n theCurrentGlobal.Blob = function () {};\r\n }\r\n }\r\n\r\n /**\r\n * Creates a vertex buffer\r\n * @param vertices the data for the vertex buffer\r\n * @returns the new WebGL static buffer\r\n */\r\n public override createVertexBuffer(vertices: FloatArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the content of the index buffer\r\n * @returns a new webGL buffer\r\n */\r\n public override createIndexBuffer(indices: IndicesArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Clear the current render buffer or the current render target (if any is set up)\r\n * @param color defines the color to use\r\n * @param backBuffer defines if the back buffer must be cleared\r\n * @param depth defines if the depth buffer must be cleared\r\n * @param stencil defines if the stencil buffer must be cleared\r\n */\r\n public override clear(color: IColor4Like, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {}\r\n\r\n /**\r\n * Gets the current render width\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render width\r\n */\r\n public override getRenderWidth(useScreen = false): number {\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.width;\r\n }\r\n\r\n return this._options.renderWidth;\r\n }\r\n\r\n /**\r\n * Gets the current render height\r\n * @param useScreen defines if screen size must be used (or the current render target if any)\r\n * @returns a number defining the current render height\r\n */\r\n public override getRenderHeight(useScreen = false): number {\r\n if (!useScreen && this._currentRenderTarget) {\r\n return this._currentRenderTarget.height;\r\n }\r\n\r\n return this._options.renderHeight;\r\n }\r\n\r\n /**\r\n * Set the WebGL's viewport\r\n * @param viewport defines the viewport element to be used\r\n * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used\r\n * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used\r\n */\r\n public override setViewport(viewport: IViewportLike, requiredWidth?: number, requiredHeight?: number): void {\r\n this._cachedViewport = viewport;\r\n }\r\n\r\n public override createShaderProgram(\r\n pipelineContext: IPipelineContext,\r\n vertexCode: string,\r\n fragmentCode: string,\r\n defines: string,\r\n context?: WebGLRenderingContext\r\n ): WebGLProgram {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n __SPECTOR_rebuildProgram: null,\r\n };\r\n }\r\n\r\n /**\r\n * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param uniformsNames defines the list of uniform names\r\n * @returns an array of webGL uniform locations\r\n */\r\n public override getUniforms(pipelineContext: IPipelineContext, uniformsNames: string[]): Nullable<WebGLUniformLocation>[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * Gets the lsit of active attributes for a given webGL program\r\n * @param pipelineContext defines the pipeline context to use\r\n * @param attributesNames defines the list of attribute names to get\r\n * @returns an array of indices indicating the offset of each attribute\r\n */\r\n public override getAttributes(pipelineContext: IPipelineContext, attributesNames: string[]): number[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * Binds an effect to the webGL context\r\n * @param effect defines the effect to bind\r\n */\r\n public override bindSamplers(effect: Effect): void {\r\n this._currentEffect = null;\r\n }\r\n\r\n /**\r\n * Activates an effect, making it the current one (ie. the one used for rendering)\r\n * @param effect defines the effect to activate\r\n */\r\n public override enableEffect(effect: Nullable<Effect | DrawWrapper>): void {\r\n effect = effect !== null && IsWrapper(effect) ? effect.effect : effect; // get only the effect, we don't need a Wrapper in the WebGL engine\r\n\r\n this._currentEffect = effect as Nullable<Effect>;\r\n if (!effect) {\r\n return;\r\n }\r\n\r\n if (effect.onBind) {\r\n effect.onBind(effect);\r\n }\r\n if (effect._onBindObservable) {\r\n effect._onBindObservable.notifyObservers(effect);\r\n }\r\n }\r\n\r\n public override setStateCullFaceType(cullBackFaces?: boolean, force?: boolean): void {}\r\n\r\n /**\r\n * Set various states to the webGL context\r\n * @param culling defines culling state: true to enable culling, false to disable it\r\n * @param zOffset defines the value to apply to zOffset (0 by default)\r\n * @param force defines if states must be applied even if cache is up to date\r\n * @param reverseSide defines if culling must be reversed (CCW if false, CW if true)\r\n * @param cullBackFaces true to cull back faces, false to cull front faces (if culling is enabled)\r\n * @param stencil stencil states to set\r\n * @param zOffsetUnits defines the value to apply to zOffsetUnits (0 by default)\r\n */\r\n public override setState(\r\n culling: boolean,\r\n zOffset: number = 0,\r\n force?: boolean,\r\n reverseSide = false,\r\n cullBackFaces?: boolean,\r\n stencil?: IStencilState,\r\n zOffsetUnits: number = 0\r\n ): void {}\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray2(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray3(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of int32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of int32 to store\r\n * @returns true if value was set\r\n */\r\n public override setIntArray4(uniform: WebGLUniformLocation, array: Int32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray2(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray3(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public setFloatArray4(uniform: WebGLUniformLocation, array: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray2(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray3(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of number (stored as vec4)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param array defines the array of number to store\r\n * @returns true if value was set\r\n */\r\n public override setArray4(uniform: WebGLUniformLocation, array: number[]): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to an array of float32 (stored as matrices)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrices defines the array of float32 to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrices(uniform: WebGLUniformLocation, matrices: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a matrix (3x3)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 3x3 matrix to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrix3x3(uniform: WebGLUniformLocation, matrix: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a matrix (2x2)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param matrix defines the Float32Array representing the 2x2 matrix to store\r\n * @returns true if value was set\r\n */\r\n public override setMatrix2x2(uniform: WebGLUniformLocation, matrix: Float32Array): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a number (float)\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param value defines the float number to store\r\n * @returns true if value was set\r\n */\r\n public override setFloat(uniform: WebGLUniformLocation, value: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec2\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat2(uniform: WebGLUniformLocation, x: number, y: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec3\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat3(uniform: WebGLUniformLocation, x: number, y: number, z: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a boolean\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param bool defines the boolean to store\r\n * @returns true if value was set\r\n */\r\n public setBool(uniform: WebGLUniformLocation, bool: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Set the value of an uniform to a vec4\r\n * @param uniform defines the webGL uniform location where to store the value\r\n * @param x defines the 1st component of the value\r\n * @param y defines the 2nd component of the value\r\n * @param z defines the 3rd component of the value\r\n * @param w defines the 4th component of the value\r\n * @returns true if value was set\r\n */\r\n public override setFloat4(uniform: WebGLUniformLocation, x: number, y: number, z: number, w: number): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Sets the current alpha mode\r\n * @param mode defines the mode to use (one of the Engine.ALPHA_XXX)\r\n * @param noDepthWriteChange defines if depth writing state should remains unchanged (false by default)\r\n * @param targetIndex defines the index of the target to set the alpha mode for (default is 0)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering\r\n */\r\n public override setAlphaMode(mode: number, noDepthWriteChange: boolean = false, targetIndex = 0): void {\r\n if (this._alphaMode[targetIndex] === mode) {\r\n return;\r\n }\r\n\r\n this.alphaState.setAlphaBlend(mode !== Constants.ALPHA_DISABLE, 0);\r\n\r\n if (!noDepthWriteChange) {\r\n this.setDepthWrite(mode === Constants.ALPHA_DISABLE);\r\n }\r\n this._alphaMode[targetIndex] = mode;\r\n }\r\n\r\n /**\r\n * Bind webGl buffers directly to the webGL context\r\n * @param vertexBuffers defines the vertex buffer to bind\r\n * @param indexBuffer defines the index buffer to bind\r\n * @param effect defines the effect associated with the vertex buffer\r\n */\r\n public override bindBuffers(vertexBuffers: { [key: string]: VertexBuffer }, indexBuffer: DataBuffer, effect: Effect): void {}\r\n\r\n /**\r\n * Force the entire cache to be cleared\r\n * You should not have to use this function unless your engine needs to share the webGL context with another engine\r\n * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)\r\n */\r\n public override wipeCaches(bruteForce?: boolean): void {\r\n if (this.preventCacheWipeBetweenFrames) {\r\n return;\r\n }\r\n this.resetTextureCache();\r\n this._currentEffect = null;\r\n\r\n if (bruteForce) {\r\n this._currentProgram = null;\r\n\r\n this._stencilStateComposer.reset();\r\n this.depthCullingState.reset();\r\n this.alphaState.reset();\r\n }\r\n\r\n this._cachedVertexBuffers = null;\r\n this._cachedIndexBuffer = null;\r\n this._cachedEffectForVertexBuffers = null;\r\n }\r\n\r\n /**\r\n * Send a draw order\r\n * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void {}\r\n\r\n /**\r\n * Draw a list of indexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param indexStart defines the starting index\r\n * @param indexCount defines the number of index to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override drawElementsType(fillMode: number, indexStart: number, indexCount: number, instancesCount?: number): void {}\r\n\r\n /**\r\n * Draw a list of unindexed primitives\r\n * @param fillMode defines the primitive to use\r\n * @param verticesStart defines the index of first vertex to draw\r\n * @param verticesCount defines the count of vertices to draw\r\n * @param instancesCount defines the number of instances to draw (if instantiation is enabled)\r\n */\r\n public override drawArraysType(fillMode: number, verticesStart: number, verticesCount: number, instancesCount?: number): void {}\r\n\r\n /** @internal */\r\n protected override _createTexture(): WebGLTexture {\r\n return {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _releaseTexture(texture: InternalTexture): void {}\r\n\r\n /**\r\n * Usually called from Texture.ts.\r\n * Passed information to create a WebGLTexture\r\n * @param urlArg defines a value which contains one of the following:\r\n * * A conventional http URL, e.g. 'http://...' or 'file://...'\r\n * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'\r\n * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'\r\n * @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file\r\n * @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)\r\n * @param scene needed for loading to the correct scene\r\n * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)\r\n * @param onLoad optional callback to be called upon successful completion\r\n * @param onError optional callback to be called upon failure\r\n * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob\r\n * @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities\r\n * @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures\r\n * @param forcedExtension defines the extension to use to pick the right loader\r\n * @param mimeType defines an optional mime type\r\n * @returns a InternalTexture for assignment back into BABYLON.Texture\r\n */\r\n public override createTexture(\r\n urlArg: Nullable<string>,\r\n noMipmap: boolean,\r\n invertY: boolean,\r\n scene: Nullable<ISceneLike>,\r\n samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n onLoad: Nullable<(texture: InternalTexture) => void> = null,\r\n onError: Nullable<(message: string, exception: any) => void> = null,\r\n buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap> = null,\r\n fallback: Nullable<InternalTexture> = null,\r\n format: Nullable<number> = null,\r\n forcedExtension: Nullable<string> = null,\r\n mimeType?: string\r\n ): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Url);\r\n const url = String(urlArg);\r\n\r\n texture.url = url;\r\n texture.generateMipMaps = !noMipmap;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture.baseWidth = this._options.textureSize;\r\n texture.baseHeight = this._options.textureSize;\r\n texture.width = this._options.textureSize;\r\n texture.height = this._options.textureSize;\r\n if (format) {\r\n texture.format = format;\r\n }\r\n\r\n texture.isReady = true;\r\n\r\n if (onLoad) {\r\n setTimeout(() => {\r\n onLoad(texture);\r\n });\r\n }\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _createHardwareRenderTargetWrapper(\r\n isMulti: boolean,\r\n isCube: boolean,\r\n size: number | { width: number; height: number; depth?: number; layers?: number }\r\n ): RenderTargetWrapper {\r\n const rtWrapper = new RenderTargetWrapper(isMulti, isCube, size, this);\r\n this._renderTargetWrapperCache.push(rtWrapper);\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Creates a new render target wrapper\r\n * @param size defines the size of the texture\r\n * @param options defines the options used to create the texture\r\n * @returns a new render target wrapper\r\n */\r\n public override createRenderTargetTexture(size: any, options: boolean | RenderTargetCreationOptions): RenderTargetWrapper {\r\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, false, size);\r\n\r\n const fullOptions: RenderTargetCreationOptions = {};\r\n\r\n if (options !== undefined && typeof options === \"object\") {\r\n fullOptions.generateMipMaps = options.generateMipMaps;\r\n fullOptions.generateDepthBuffer = options.generateDepthBuffer === undefined ? true : options.generateDepthBuffer;\r\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && options.generateStencilBuffer;\r\n fullOptions.type = options.type === undefined ? Constants.TEXTURETYPE_UNSIGNED_BYTE : options.type;\r\n fullOptions.samplingMode = options.samplingMode === undefined ? Constants.TEXTURE_TRILINEAR_SAMPLINGMODE : options.samplingMode;\r\n } else {\r\n fullOptions.generateMipMaps = options;\r\n fullOptions.generateDepthBuffer = true;\r\n fullOptions.generateStencilBuffer = false;\r\n fullOptions.type = Constants.TEXTURETYPE_UNSIGNED_BYTE;\r\n fullOptions.samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE;\r\n }\r\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\r\n rtWrapper.setTexture(texture);\r\n\r\n const width = size.width || size;\r\n const height = size.height || size;\r\n\r\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\r\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;\r\n\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.isReady = true;\r\n texture.samples = 1;\r\n texture.generateMipMaps = fullOptions.generateMipMaps ? true : false;\r\n texture.samplingMode = fullOptions.samplingMode;\r\n texture.type = fullOptions.type;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Creates a new render target wrapper\r\n * @param size defines the size of the texture\r\n * @param options defines the options used to create the texture\r\n * @returns a new render target wrapper\r\n */\r\n public override createRenderTargetCubeTexture(size: number, options?: RenderTargetCreationOptions): RenderTargetWrapper {\r\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\r\n\r\n const fullOptions = {\r\n generateMipMaps: true,\r\n generateDepthBuffer: true,\r\n generateStencilBuffer: false,\r\n type: Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\r\n format: Constants.TEXTUREFORMAT_RGBA,\r\n ...options,\r\n };\r\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\r\n\r\n if (fullOptions.type === Constants.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {\r\n // if floating point linear (gl.FLOAT) then force to NEAREST_SAMPLINGMODE\r\n fullOptions.samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n } else if (fullOptions.type === Constants.TEXTURETYPE_HALF_FLOAT && !this._caps.textureHalfFloatLinearFiltering) {\r\n // if floating point linear (HALF_FLOAT) then force to NEAREST_SAMPLINGMODE\r\n fullOptions.samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\r\n }\r\n\r\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\r\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;\r\n\r\n const texture = new InternalTexture(this, InternalTextureSource.RenderTarget);\r\n texture.baseWidth = size;\r\n texture.baseHeight = size;\r\n texture.width = size;\r\n texture.height = size;\r\n texture.isReady = true;\r\n texture.isCube = true;\r\n texture.samples = 1;\r\n texture.generateMipMaps = fullOptions.generateMipMaps ? true : false;\r\n texture.samplingMode = fullOptions.samplingMode;\r\n texture.type = fullOptions.type;\r\n\r\n this._internalTexturesCache.push(texture);\r\n\r\n return rtWrapper;\r\n }\r\n\r\n /**\r\n * Update the sampling mode of a given texture\r\n * @param samplingMode defines the required sampling mode\r\n * @param texture defines the texture to update\r\n */\r\n public override updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void {\r\n texture.samplingMode = samplingMode;\r\n }\r\n\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n public override createRawTexture(\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n creationFlags = 0,\r\n useSRGBBuffer = false\r\n ): InternalTexture {\r\n const texture = new InternalTexture(this, InternalTextureSource.Raw);\r\n texture.baseWidth = width;\r\n texture.baseHeight = height;\r\n texture.width = width;\r\n texture.height = height;\r\n texture.format = format;\r\n texture.generateMipMaps = generateMipMaps;\r\n texture.samplingMode = samplingMode;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n\r\n if (!this._doNotHandleContextLost) {\r\n texture._bufferView = data;\r\n }\r\n\r\n return texture;\r\n }\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n */\r\n public override updateRawTexture(\r\n texture: Nullable<InternalTexture>,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string> = null,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n useSRGBBuffer: boolean = false\r\n ): void {\r\n if (texture) {\r\n texture._bufferView = data;\r\n texture.format = format;\r\n texture.invertY = invertY;\r\n texture._compression = compression;\r\n texture.type = type;\r\n texture._useSRGBBuffer = useSRGBBuffer;\r\n }\r\n }\r\n\r\n /**\r\n * Binds the frame buffer to the specified texture.\r\n * @param rtWrapper The render target wrapper to render to\r\n * @param faceIndex The face of the texture to render to in case of cube texture\r\n * @param requiredWidth The width of the target to render to\r\n * @param requiredHeight The height of the target to render to\r\n * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true\r\n */\r\n public override bindFramebuffer(rtWrapper: RenderTargetWrapper, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean): void {\r\n if (this._currentRenderTarget) {\r\n this.unBindFramebuffer(this._currentRenderTarget);\r\n }\r\n this._currentRenderTarget = rtWrapper;\r\n this._currentFramebuffer = null;\r\n if (this._cachedViewport && !forceFullscreenViewport) {\r\n this.setViewport(this._cachedViewport, requiredWidth, requiredHeight);\r\n }\r\n }\r\n\r\n /**\r\n * Unbind the current render target texture from the webGL context\r\n * @param rtWrapper defines the render target wrapper to unbind\r\n * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated\r\n * @param onBeforeUnbind defines a function which will be called before the effective unbind\r\n */\r\n public override unBindFramebuffer(rtWrapper: RenderTargetWrapper, disableGenerateMipMaps = false, onBeforeUnbind?: () => void): void {\r\n this._currentRenderTarget = null;\r\n\r\n if (onBeforeUnbind) {\r\n onBeforeUnbind();\r\n }\r\n this._currentFramebuffer = null;\r\n }\r\n\r\n /**\r\n * Creates a dynamic vertex buffer\r\n * @param vertices the data for the dynamic vertex buffer\r\n * @returns the new WebGL dynamic buffer\r\n */\r\n public override createDynamicVertexBuffer(vertices: FloatArray): DataBuffer {\r\n const buffer = new DataBuffer();\r\n buffer.references = 1;\r\n buffer.capacity = 1;\r\n return buffer;\r\n }\r\n\r\n /**\r\n * Update the content of a dynamic texture\r\n * @param texture defines the texture to update\r\n * @param canvas defines the canvas containing the source\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param premulAlpha defines if alpha is stored as premultiplied\r\n * @param format defines the format of the data\r\n */\r\n public override updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha: boolean = false, format?: number): void {}\r\n\r\n /**\r\n * Gets a boolean indicating if all created effects are ready\r\n * @returns true if all effects are ready\r\n */\r\n public override areAllEffectsReady(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Get the current error code of the webGL context\r\n * @returns the error code\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError\r\n */\r\n public override getError(): number {\r\n return 0;\r\n }\r\n\r\n /** @internal */\r\n public override _getUnpackAlignement(): number {\r\n return 1;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _unpackFlipY(value: boolean) {}\r\n\r\n /**\r\n * Update a dynamic index buffer\r\n * @param indexBuffer defines the target index buffer\r\n * @param indices defines the data to update\r\n * @param offset defines the offset in the target index buffer where update should start\r\n */\r\n public override updateDynamicIndexBuffer(indexBuffer: WebGLBuffer, indices: IndicesArray, offset: number = 0): void {}\r\n\r\n /**\r\n * Updates a dynamic vertex buffer.\r\n * @param vertexBuffer the vertex buffer to update\r\n * @param vertices the data used to update the vertex buffer\r\n * @param byteOffset the byte offset of the data (optional)\r\n * @param byteLength the byte length of the data (optional)\r\n */\r\n public override updateDynamicVertexBuffer(vertexBuffer: WebGLBuffer, vertices: FloatArray, byteOffset?: number, byteLength?: number): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _bindTextureDirectly(target: number, texture: InternalTexture): boolean {\r\n if (this._boundTexturesCache[this._activeChannel] !== texture) {\r\n this._boundTexturesCache[this._activeChannel] = texture;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _bindTexture(channel: number, texture: InternalTexture): void {\r\n if (channel < 0) {\r\n return;\r\n }\r\n\r\n this._bindTextureDirectly(0, texture);\r\n }\r\n\r\n protected override _deleteBuffer(buffer: WebGLBuffer): void {}\r\n\r\n /**\r\n * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled\r\n */\r\n public override releaseEffects() {}\r\n\r\n public override displayLoadingUI(): void {}\r\n\r\n public override hideLoadingUI(): void {}\r\n\r\n public override set loadingUIText(_: string) {}\r\n\r\n public override flushFramebuffer(): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadCompressedDataToTextureDirectly(\r\n texture: InternalTexture,\r\n internalFormat: number,\r\n width: number,\r\n height: number,\r\n data: ArrayBufferView,\r\n faceIndex: number = 0,\r\n lod: number = 0\r\n ) {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadDataToTextureDirectly(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadArrayBufferViewToTexture(texture: InternalTexture, imageData: ArrayBufferView, faceIndex: number = 0, lod: number = 0): void {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _uploadImageToTexture(texture: InternalTexture, image: HTMLImageElement, faceIndex: number = 0, lod: number = 0) {}\r\n}\r\n"]}
@@ -38,6 +38,9 @@ export declare class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGr
38
38
  /** Indicates if bounding boxes should be rendered */
39
39
  get enableBoundingBoxRendering(): boolean;
40
40
  set enableBoundingBoxRendering(value: boolean);
41
+ /** Indicates if outlines/overlays should be rendered */
42
+ get enableOutlineRendering(): boolean;
43
+ set enableOutlineRendering(value: boolean);
41
44
  /** Indicates if shadows must be enabled or disabled */
42
45
  get disableShadows(): boolean;
43
46
  set disableShadows(value: boolean);
@@ -86,6 +86,13 @@ export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock
86
86
  set enableBoundingBoxRendering(value) {
87
87
  this._frameGraphTask.enableBoundingBoxRendering = value;
88
88
  }
89
+ /** Indicates if outlines/overlays should be rendered */
90
+ get enableOutlineRendering() {
91
+ return this._frameGraphTask.enableOutlineRendering;
92
+ }
93
+ set enableOutlineRendering(value) {
94
+ this._frameGraphTask.enableOutlineRendering = value;
95
+ }
89
96
  /** Indicates if shadows must be enabled or disabled */
90
97
  get disableShadows() {
91
98
  return this._frameGraphTask.disableShadows;
@@ -246,6 +253,9 @@ __decorate([
246
253
  __decorate([
247
254
  editableInPropertyPage("Enable bounding box rendering", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
248
255
  ], NodeRenderGraphBaseObjectRendererBlock.prototype, "enableBoundingBoxRendering", null);
256
+ __decorate([
257
+ editableInPropertyPage("Enable outline/overlay rendering", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
258
+ ], NodeRenderGraphBaseObjectRendererBlock.prototype, "enableOutlineRendering", null);
249
259
  __decorate([
250
260
  editableInPropertyPage("Disable shadows", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
251
261
  ], NodeRenderGraphBaseObjectRendererBlock.prototype, "disableShadows", null);
@@ -1 +1 @@
1
- {"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,0CAA0C,EAAE,MAAM,kDAAkD,CAAC;AAE9G;;GAEG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0BAA0B,0CAAkC,YAAY,CAAC;iFAGhG","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointDirection } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\r\n \"objectRenderer\",\r\n NodeRenderGraphBlockConnectionPointTypes.Object,\r\n new NodeRenderGraphConnectionPointCustomObject(\r\n \"objectRenderer\",\r\n this,\r\n NodeRenderGraphConnectionPointDirection.Output,\r\n NodeRenderGraphBaseObjectRendererBlock,\r\n \"NodeRenderGraphBaseObjectRendererBlock\"\r\n )\r\n );\r\n\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment | NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment\r\n );\r\n this.shadowGenerators.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator | NodeRenderGraphBlockConnectionPointTypes.ResourceContainer\r\n );\r\n\r\n this.output._typeConnectionSource = this.target;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates that this object renderer is the main object renderer of the frame graph. */\r\n @editableInPropertyPage(\"Is main object renderer\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get isMainObjectRenderer() {\r\n return this._frameGraphTask.isMainObjectRenderer;\r\n }\r\n\r\n public set isMainObjectRenderer(value: boolean) {\r\n this._frameGraphTask.isMainObjectRenderer = value;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /** Indicates if particles should be rendered */\r\n @editableInPropertyPage(\"Render particles\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderParticles() {\r\n return this._frameGraphTask.renderParticles;\r\n }\r\n\r\n public set renderParticles(value: boolean) {\r\n this._frameGraphTask.renderParticles = value;\r\n }\r\n\r\n /** Indicates if sprites should be rendered */\r\n @editableInPropertyPage(\"Render sprites\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderSprites() {\r\n return this._frameGraphTask.renderSprites;\r\n }\r\n\r\n public set renderSprites(value: boolean) {\r\n this._frameGraphTask.renderSprites = value;\r\n }\r\n\r\n /** Indicates if layer mask check must be forced */\r\n @editableInPropertyPage(\"Force layer mask check\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get forceLayerMaskCheck() {\r\n return this._frameGraphTask.forceLayerMaskCheck;\r\n }\r\n\r\n public set forceLayerMaskCheck(value: boolean) {\r\n this._frameGraphTask.forceLayerMaskCheck = value;\r\n }\r\n\r\n /** Indicates if bounding boxes should be rendered */\r\n @editableInPropertyPage(\"Enable bounding box rendering\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get enableBoundingBoxRendering() {\r\n return this._frameGraphTask.enableBoundingBoxRendering;\r\n }\r\n\r\n public set enableBoundingBoxRendering(value: boolean) {\r\n this._frameGraphTask.enableBoundingBoxRendering = value;\r\n }\r\n\r\n /** Indicates if shadows must be enabled or disabled */\r\n @editableInPropertyPage(\"Disable shadows\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get disableShadows() {\r\n return this._frameGraphTask.disableShadows;\r\n }\r\n\r\n public set disableShadows(value: boolean) {\r\n this._frameGraphTask.disableShadows = value;\r\n }\r\n\r\n /** If image processing should be disabled */\r\n @editableInPropertyPage(\"Disable image processing\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderInLinearSpace() {\r\n return this._frameGraphTask.disableImageProcessing;\r\n }\r\n\r\n public set renderInLinearSpace(value: boolean) {\r\n this._frameGraphTask.disableImageProcessing = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the target texture input component\r\n */\r\n public get target(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the objectRenderer component\r\n */\r\n public get objectRenderer(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself\r\n\r\n this._frameGraphTask.targetTexture = this.target.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n for (const input of container.inputs) {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n }\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n codes.push(`${this._codeVariableName}.renderParticles = ${this.renderParticles};`);\r\n codes.push(`${this._codeVariableName}.renderSprites = ${this.renderSprites};`);\r\n codes.push(`${this._codeVariableName}.forceLayerMaskCheck = ${this.forceLayerMaskCheck};`);\r\n codes.push(`${this._codeVariableName}.enableBoundingBoxRendering = ${this.enableBoundingBoxRendering};`);\r\n codes.push(`${this._codeVariableName}.disableShadows = ${this.disableShadows};`);\r\n codes.push(`${this._codeVariableName}.renderInLinearSpace = ${this.renderInLinearSpace};`);\r\n codes.push(`${this._codeVariableName}.isMainObjectRenderer = ${this.isMainObjectRenderer};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n serializationObject.renderParticles = this.renderParticles;\r\n serializationObject.renderSprites = this.renderSprites;\r\n serializationObject.forceLayerMaskCheck = this.forceLayerMaskCheck;\r\n serializationObject.enableBoundingBoxRendering = this.enableBoundingBoxRendering;\r\n serializationObject.disableShadows = this.disableShadows;\r\n serializationObject.renderInLinearSpace = this.renderInLinearSpace;\r\n serializationObject.isMainObjectRenderer = this.isMainObjectRenderer;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n this.renderParticles = serializationObject.renderParticles ?? true;\r\n this.renderSprites = serializationObject.renderSprites ?? true;\r\n this.forceLayerMaskCheck = serializationObject.forceLayerMaskCheck ?? true;\r\n this.enableBoundingBoxRendering = serializationObject.enableBoundingBoxRendering ?? true;\r\n this.disableShadows = serializationObject.disableShadows;\r\n this.renderInLinearSpace = !!serializationObject.renderInLinearSpace;\r\n this.isMainObjectRenderer = !!serializationObject.isMainObjectRenderer;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BA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CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF;AAQD;IADC,sBAAsB,CAAC,kBAAkB,0CAAkC,YAAY,CAAC;6EAGxF;AAQD;IADC,sBAAsB,CAAC,gBAAgB,0CAAkC,YAAY,CAAC;2EAGtF;AAQD;IADC,sBAAsB,CAAC,wBAAwB,0CAAkC,YAAY,CAAC;iFAG9F;AAQD;IADC,sBAAsB,CAAC,+BAA+B,0CAAkC,YAAY,CAAC;wFAGrG;AAQD;IADC,sBAAsB,CAAC,kCAAkC,0CAAkC,YAAY,CAAC;oFAGxG;AAQD;IADC,sBAAsB,CAAC,iBAAiB,0CAAkC,YAAY,CAAC;4EAGvF;AAQD;IADC,sBAAsB,CAAC,0BAA0B,0CAAkC,YAAY,CAAC;iFAGhG","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointDirection } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\r\n \"objectRenderer\",\r\n NodeRenderGraphBlockConnectionPointTypes.Object,\r\n new NodeRenderGraphConnectionPointCustomObject(\r\n \"objectRenderer\",\r\n this,\r\n NodeRenderGraphConnectionPointDirection.Output,\r\n NodeRenderGraphBaseObjectRendererBlock,\r\n \"NodeRenderGraphBaseObjectRendererBlock\"\r\n )\r\n );\r\n\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment | NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment\r\n );\r\n this.shadowGenerators.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator | NodeRenderGraphBlockConnectionPointTypes.ResourceContainer\r\n );\r\n\r\n this.output._typeConnectionSource = this.target;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates that this object renderer is the main object renderer of the frame graph. */\r\n @editableInPropertyPage(\"Is main object renderer\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get isMainObjectRenderer() {\r\n return this._frameGraphTask.isMainObjectRenderer;\r\n }\r\n\r\n public set isMainObjectRenderer(value: boolean) {\r\n this._frameGraphTask.isMainObjectRenderer = value;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /** Indicates if particles should be rendered */\r\n @editableInPropertyPage(\"Render particles\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderParticles() {\r\n return this._frameGraphTask.renderParticles;\r\n }\r\n\r\n public set renderParticles(value: boolean) {\r\n this._frameGraphTask.renderParticles = value;\r\n }\r\n\r\n /** Indicates if sprites should be rendered */\r\n @editableInPropertyPage(\"Render sprites\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderSprites() {\r\n return this._frameGraphTask.renderSprites;\r\n }\r\n\r\n public set renderSprites(value: boolean) {\r\n this._frameGraphTask.renderSprites = value;\r\n }\r\n\r\n /** Indicates if layer mask check must be forced */\r\n @editableInPropertyPage(\"Force layer mask check\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get forceLayerMaskCheck() {\r\n return this._frameGraphTask.forceLayerMaskCheck;\r\n }\r\n\r\n public set forceLayerMaskCheck(value: boolean) {\r\n this._frameGraphTask.forceLayerMaskCheck = value;\r\n }\r\n\r\n /** Indicates if bounding boxes should be rendered */\r\n @editableInPropertyPage(\"Enable bounding box rendering\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get enableBoundingBoxRendering() {\r\n return this._frameGraphTask.enableBoundingBoxRendering;\r\n }\r\n\r\n public set enableBoundingBoxRendering(value: boolean) {\r\n this._frameGraphTask.enableBoundingBoxRendering = value;\r\n }\r\n\r\n /** Indicates if outlines/overlays should be rendered */\r\n @editableInPropertyPage(\"Enable outline/overlay rendering\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get enableOutlineRendering() {\r\n return this._frameGraphTask.enableOutlineRendering;\r\n }\r\n\r\n public set enableOutlineRendering(value: boolean) {\r\n this._frameGraphTask.enableOutlineRendering = value;\r\n }\r\n\r\n /** Indicates if shadows must be enabled or disabled */\r\n @editableInPropertyPage(\"Disable shadows\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get disableShadows() {\r\n return this._frameGraphTask.disableShadows;\r\n }\r\n\r\n public set disableShadows(value: boolean) {\r\n this._frameGraphTask.disableShadows = value;\r\n }\r\n\r\n /** If image processing should be disabled */\r\n @editableInPropertyPage(\"Disable image processing\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get renderInLinearSpace() {\r\n return this._frameGraphTask.disableImageProcessing;\r\n }\r\n\r\n public set renderInLinearSpace(value: boolean) {\r\n this._frameGraphTask.disableImageProcessing = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the target texture input component\r\n */\r\n public get target(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the objectRenderer component\r\n */\r\n public get objectRenderer(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself\r\n\r\n this._frameGraphTask.targetTexture = this.target.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n for (const input of container.inputs) {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n }\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n codes.push(`${this._codeVariableName}.renderParticles = ${this.renderParticles};`);\r\n codes.push(`${this._codeVariableName}.renderSprites = ${this.renderSprites};`);\r\n codes.push(`${this._codeVariableName}.forceLayerMaskCheck = ${this.forceLayerMaskCheck};`);\r\n codes.push(`${this._codeVariableName}.enableBoundingBoxRendering = ${this.enableBoundingBoxRendering};`);\r\n codes.push(`${this._codeVariableName}.disableShadows = ${this.disableShadows};`);\r\n codes.push(`${this._codeVariableName}.renderInLinearSpace = ${this.renderInLinearSpace};`);\r\n codes.push(`${this._codeVariableName}.isMainObjectRenderer = ${this.isMainObjectRenderer};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n serializationObject.renderParticles = this.renderParticles;\r\n serializationObject.renderSprites = this.renderSprites;\r\n serializationObject.forceLayerMaskCheck = this.forceLayerMaskCheck;\r\n serializationObject.enableBoundingBoxRendering = this.enableBoundingBoxRendering;\r\n serializationObject.disableShadows = this.disableShadows;\r\n serializationObject.renderInLinearSpace = this.renderInLinearSpace;\r\n serializationObject.isMainObjectRenderer = this.isMainObjectRenderer;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n this.renderParticles = serializationObject.renderParticles ?? true;\r\n this.renderSprites = serializationObject.renderSprites ?? true;\r\n this.forceLayerMaskCheck = serializationObject.forceLayerMaskCheck ?? true;\r\n this.enableBoundingBoxRendering = serializationObject.enableBoundingBoxRendering ?? true;\r\n this.disableShadows = serializationObject.disableShadows;\r\n this.renderInLinearSpace = !!serializationObject.renderInLinearSpace;\r\n this.isMainObjectRenderer = !!serializationObject.isMainObjectRenderer;\r\n }\r\n}\r\n"]}
@@ -26,6 +26,9 @@ export declare class NodeRenderGraphGeometryRendererBlock extends NodeRenderGrap
26
26
  set depthWrite(value: boolean);
27
27
  /** True (default) to not change the aspect ratio of the scene in the RTT */
28
28
  get doNotChangeAspectRatio(): boolean;
29
+ /** Indicates if layer mask check must be forced */
30
+ get forceLayerMaskCheck(): boolean;
31
+ set forceLayerMaskCheck(value: boolean);
29
32
  set doNotChangeAspectRatio(value: boolean);
30
33
  /** Width of the geometry texture */
31
34
  get width(): number;
@@ -96,6 +96,13 @@ export class NodeRenderGraphGeometryRendererBlock extends NodeRenderGraphBlock {
96
96
  get doNotChangeAspectRatio() {
97
97
  return this._frameGraphTask.objectRenderer.options.doNotChangeAspectRatio;
98
98
  }
99
+ /** Indicates if layer mask check must be forced */
100
+ get forceLayerMaskCheck() {
101
+ return this._frameGraphTask.forceLayerMaskCheck;
102
+ }
103
+ set forceLayerMaskCheck(value) {
104
+ this._frameGraphTask.forceLayerMaskCheck = value;
105
+ }
99
106
  set doNotChangeAspectRatio(value) {
100
107
  const disabled = this._frameGraphTask.disabled;
101
108
  const depthTest = this.depthTest;
@@ -440,6 +447,9 @@ __decorate([
440
447
  __decorate([
441
448
  editableInPropertyPage("Do not change aspect ratio", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
442
449
  ], NodeRenderGraphGeometryRendererBlock.prototype, "doNotChangeAspectRatio", null);
450
+ __decorate([
451
+ editableInPropertyPage("Force layer mask check", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
452
+ ], NodeRenderGraphGeometryRendererBlock.prototype, "forceLayerMaskCheck", null);
443
453
  __decorate([
444
454
  editableInPropertyPage("Texture width", 2 /* PropertyTypeForEdition.Int */, "PROPERTIES")
445
455
  ], NodeRenderGraphGeometryRendererBlock.prototype, "width", null);