engineCapabilities.d.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /**
  2. * Interface used to describe the capabilities of the engine relatively to the current browser
  3. */
  4. export interface EngineCapabilities {
  5. /** Maximum textures units per fragment shader */
  6. maxTexturesImageUnits: number;
  7. /** Maximum texture units per vertex shader */
  8. maxVertexTextureImageUnits: number;
  9. /** Maximum textures units in the entire pipeline */
  10. maxCombinedTexturesImageUnits: number;
  11. /** Maximum texture size */
  12. maxTextureSize: number;
  13. /** Maximum texture samples */
  14. maxSamples?: number;
  15. /** Maximum cube texture size */
  16. maxCubemapTextureSize: number;
  17. /** Maximum render texture size */
  18. maxRenderTextureSize: number;
  19. /** Maximum number of vertex attributes */
  20. maxVertexAttribs: number;
  21. /** Maximum number of varyings */
  22. maxVaryingVectors: number;
  23. /** Maximum number of uniforms per vertex shader */
  24. maxVertexUniformVectors: number;
  25. /** Maximum number of uniforms per fragment shader */
  26. maxFragmentUniformVectors: number;
  27. /** Defines if standard derivatives (dx/dy) are supported */
  28. standardDerivatives: boolean;
  29. /** Defines if s3tc texture compression is supported */
  30. s3tc?: WEBGL_compressed_texture_s3tc;
  31. /** Defines if s3tc sRGB texture compression is supported */
  32. s3tc_srgb?: WEBGL_compressed_texture_s3tc_srgb;
  33. /** Defines if pvrtc texture compression is supported */
  34. pvrtc: any;
  35. /** Defines if etc1 texture compression is supported */
  36. etc1: any;
  37. /** Defines if etc2 texture compression is supported */
  38. etc2: any;
  39. /** Defines if astc texture compression is supported */
  40. astc: any;
  41. /** Defines if bptc texture compression is supported */
  42. bptc: any;
  43. /** Defines if float textures are supported */
  44. textureFloat: boolean;
  45. /** Defines if vertex array objects are supported */
  46. vertexArrayObject: boolean;
  47. /** Gets the webgl extension for anisotropic filtering (null if not supported) */
  48. textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic;
  49. /** Gets the maximum level of anisotropy supported */
  50. maxAnisotropy: number;
  51. /** Defines if instancing is supported */
  52. instancedArrays: boolean;
  53. /** Defines if 32 bits indices are supported */
  54. uintIndices: boolean;
  55. /** Defines if high precision shaders are supported */
  56. highPrecisionShaderSupported: boolean;
  57. /** Defines if depth reading in the fragment shader is supported */
  58. fragmentDepthSupported: boolean;
  59. /** Defines if float texture linear filtering is supported*/
  60. textureFloatLinearFiltering: boolean;
  61. /** Defines if rendering to float textures is supported */
  62. textureFloatRender: boolean;
  63. /** Defines if half float textures are supported*/
  64. textureHalfFloat: boolean;
  65. /** Defines if half float texture linear filtering is supported*/
  66. textureHalfFloatLinearFiltering: boolean;
  67. /** Defines if rendering to half float textures is supported */
  68. textureHalfFloatRender: boolean;
  69. /** Defines if textureLOD shader command is supported */
  70. textureLOD: boolean;
  71. /** Defines if texelFetch shader command is supported */
  72. texelFetch: boolean;
  73. /** Defines if draw buffers extension is supported */
  74. drawBuffersExtension: boolean;
  75. /** Defines if depth textures are supported */
  76. depthTextureExtension: boolean;
  77. /** Defines if float color buffer are supported */
  78. colorBufferFloat: boolean;
  79. /** Defines if half float color buffer are supported */
  80. colorBufferHalfFloat?: boolean;
  81. /** Gets disjoint timer query extension (null if not supported) */
  82. timerQuery?: EXT_disjoint_timer_query;
  83. /** Defines if timestamp can be used with timer query */
  84. canUseTimestampForTimerQuery: boolean;
  85. /** Defines if occlusion queries are supported by the engine */
  86. supportOcclusionQuery: boolean;
  87. /** Defines if multiview is supported (https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/) */
  88. multiview?: any;
  89. /** Defines if oculus multiview is supported (https://developer.oculus.com/documentation/oculus-browser/latest/concepts/browser-multiview/) */
  90. oculusMultiview?: any;
  91. /** Function used to let the system compiles shaders in background */
  92. parallelShaderCompile?: {
  93. COMPLETION_STATUS_KHR: number;
  94. };
  95. /** Max number of texture samples for MSAA */
  96. maxMSAASamples: number;
  97. /** Defines if the blend min max extension is supported */
  98. blendMinMax: boolean;
  99. /** 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 */
  100. canUseGLInstanceID: boolean;
  101. /** Defines if gl_vertexID is available */
  102. canUseGLVertexID: boolean;
  103. /** Defines if compute shaders are supported by the engine */
  104. supportComputeShaders: boolean;
  105. /** Defines if sRGB texture formats are supported */
  106. supportSRGBBuffers: boolean;
  107. /** Defines if transform feedbacks are supported */
  108. supportTransformFeedbacks: boolean;
  109. /** Defines if texture max level are supported */
  110. textureMaxLevel: boolean;
  111. /** Defines the maximum layer count for a 2D Texture array. */
  112. texture2DArrayMaxLayerCount: number;
  113. /** Defines if the morph target texture is supported. */
  114. disableMorphTargetTexture: boolean;
  115. /** Defines if float textures like r32f, rg32f or rgba32f support being used as a resolve target */
  116. supportFloatTexturesResolve: boolean;
  117. /** Defines if RG11B10UFloat texture format is color renderable */
  118. rg11b10ufColorRenderable: boolean;
  119. }