API

Interface EngineCapabilities

Interface used to describe the capabilities of the engine relatively to the current browser

interface EngineCapabilities {
    astc: any;
    blendFloat: boolean;
    blendMinMax: boolean;
    blendParametersPerTarget: boolean;
    bptc: any;
    canUseGLInstanceID: boolean;
    canUseGLVertexID: boolean;
    canUseTimestampForTimerQuery: boolean;
    colorBufferFloat: boolean;
    colorBufferHalfFloat?: boolean;
    depthTextureExtension: boolean;
    disableMorphTargetTexture: boolean;
    drawBuffersExtension: boolean;
    dualSourceBlending: boolean;
    etc1: any;
    etc2: any;
    fragmentDepthSupported: boolean;
    highPrecisionShaderSupported: boolean;
    instancedArrays: boolean;
    maxAnisotropy: number;
    maxCombinedTexturesImageUnits: number;
    maxCubemapTextureSize: number;
    maxDrawBuffers?: number;
    maxFragmentUniformVectors: number;
    maxMSAASamples: number;
    maxRenderTextureSize: number;
    maxSamples?: number;
    maxTexturesImageUnits: number;
    maxTextureSize: number;
    maxUniformBuffersPerShaderStage?: number;
    maxVaryingVectors: number;
    maxVertexAttribs: number;
    maxVertexTextureImageUnits: number;
    maxVertexUniformVectors: number;
    multiview?: any;
    oculusMultiview?: any;
    parallelShaderCompile?: { COMPLETION_STATUS_KHR: number };
    pvrtc: any;
    rg11b10ufColorRenderable: boolean;
    s3tc?: WEBGL_compressed_texture_s3tc;
    s3tc_srgb?: WEBGL_compressed_texture_s3tc_srgb;
    shaderFloatPrecision: number;
    standardDerivatives: boolean;
    supportComputeShaders: boolean;
    supportFloatTexturesResolve: boolean;
    supportOcclusionQuery: boolean;
    supportReadWriteStorageTextures: boolean;
    supportSRGBBuffers: boolean;
    supportTransformFeedbacks: boolean;
    texelFetch: boolean;
    texture2DArrayMaxLayerCount: number;
    textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic;
    textureFloat: boolean;
    textureFloatLinearFiltering: boolean;
    textureFloatRender: boolean;
    textureHalfFloat: boolean;
    textureHalfFloatLinearFiltering: boolean;
    textureHalfFloatRender: boolean;
    textureLOD: boolean;
    textureMaxLevel: boolean;
    textureNorm16: boolean;
    timerQuery?: any;
    uintIndices: boolean;
    vertexArrayObject: boolean;
}
Index
astc: any

Defines if astc texture compression is supported

blendFloat: boolean

Defines if float color blending is supported

blendMinMax: boolean

Defines if the blend min max extension is supported

blendParametersPerTarget: boolean

Defines if blend parameters can be defined per target

bptc: any

Defines if bptc texture compression is supported

canUseGLInstanceID: boolean

In some iOS + WebGL1, gl_InstanceID (and gl_InstanceIDEXT) is undefined even if instancedArrays is true. So don't use gl_InstanceID in those cases

canUseGLVertexID: boolean

Defines if gl_vertexID is available

canUseTimestampForTimerQuery: boolean

Defines if timestamp can be used with timer query

colorBufferFloat: boolean

Defines if float color buffer are supported

colorBufferHalfFloat?: boolean

Defines if half float color buffer are supported

depthTextureExtension: boolean

Defines if depth textures are supported

disableMorphTargetTexture: boolean

Defines if the morph target texture is supported.

drawBuffersExtension: boolean

Defines if draw buffers extension is supported

dualSourceBlending: boolean

Defines if dual source blending is supported

etc1: any

Defines if etc1 texture compression is supported

etc2: any

Defines if etc2 texture compression is supported

fragmentDepthSupported: boolean

Defines if depth reading in the fragment shader is supported

highPrecisionShaderSupported: boolean

Defines if high precision shaders are supported

instancedArrays: boolean

Defines if instancing is supported

maxAnisotropy: number

Gets the maximum level of anisotropy supported

maxCombinedTexturesImageUnits: number

Maximum textures units in the entire pipeline

maxCubemapTextureSize: number

Maximum cube texture size

maxDrawBuffers?: number

Maximum draw buffers

maxFragmentUniformVectors: number

Maximum number of uniforms per fragment shader

maxMSAASamples: number

Max number of texture samples for MSAA

maxRenderTextureSize: number

Maximum render texture size

maxSamples?: number

Maximum texture samples

maxTexturesImageUnits: number

Maximum textures units per fragment shader

maxTextureSize: number

Maximum texture size

maxUniformBuffersPerShaderStage?: number

Maximum number of uniform buffers that can be bound to a single shader stage. Only reported by engines where this is a hard, enforced limit (WebGPU). Left undefined elsewhere.

maxVaryingVectors: number

Maximum number of varyings

maxVertexAttribs: number

Maximum number of vertex attributes

maxVertexTextureImageUnits: number

Maximum texture units per vertex shader

maxVertexUniformVectors: number

Maximum number of uniforms per vertex shader

multiview?: any
oculusMultiview?: any
parallelShaderCompile?: { COMPLETION_STATUS_KHR: number }

Function used to let the system compiles shaders in background

pvrtc: any

Defines if pvrtc texture compression is supported

rg11b10ufColorRenderable: boolean

Defines if RG11B10UFloat texture format is color renderable

s3tc?: WEBGL_compressed_texture_s3tc

Defines if s3tc texture compression is supported

s3tc_srgb?: WEBGL_compressed_texture_s3tc_srgb

Defines if s3tc sRGB texture compression is supported

shaderFloatPrecision: number

The number of bits that can be accurately represented in shader floats

standardDerivatives: boolean

Defines if standard derivatives (dx/dy) are supported

supportComputeShaders: boolean

Defines if compute shaders are supported by the engine

supportFloatTexturesResolve: boolean

Defines if float textures like r32f, rg32f or rgba32f support being used as a resolve target

supportOcclusionQuery: boolean

Defines if occlusion queries are supported by the engine

supportReadWriteStorageTextures: boolean

Defines if read-only and read-write storage textures are supported (WebGPU only, requires the readonly_and_readwrite_storage_textures WGSL language feature)

supportSRGBBuffers: boolean

Defines if sRGB texture formats are supported

supportTransformFeedbacks: boolean

Defines if transform feedbacks are supported

texelFetch: boolean

Defines if texelFetch shader command is supported

texture2DArrayMaxLayerCount: number

Defines the maximum layer count for a 2D Texture array.

textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic

Gets the webgl extension for anisotropic filtering (null if not supported)

textureFloat: boolean

Defines if float textures are supported

textureFloatLinearFiltering: boolean

Defines if float texture linear filtering is supported

textureFloatRender: boolean

Defines if rendering to float textures is supported

textureHalfFloat: boolean

Defines if half float textures are supported

textureHalfFloatLinearFiltering: boolean

Defines if half float texture linear filtering is supported

textureHalfFloatRender: boolean

Defines if rendering to half float textures is supported

textureLOD: boolean

Defines if textureLOD shader command is supported

textureMaxLevel: boolean

Defines if texture max level are supported

textureNorm16: boolean

Defines if EXT_texture_norm16 is available which enables the following texture formats: R16_EXT, RG16_EXT, RGB16_EXT, RGBA16_EXT, R16_SNORM_EXT, RG16_SNORM_EXT, RGB16_SNORM_EXT, RGBA16_SNORM_EXT

timerQuery?: any

Gets disjoint timer query extension (null if not supported)

uintIndices: boolean

Defines if 32 bits indices are supported

vertexArrayObject: boolean

Defines if vertex array objects are supported