engineCapabilities.ts 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 derivates (dx/dy) are supported */
  28. standardDerivatives: boolean;
  29. /** Defines if s3tc texture compression is supported */
  30. s3tc?: WEBGL_compressed_texture_s3tc;
  31. /** Defines if pvrtc texture compression is supported */
  32. pvrtc: any; //WEBGL_compressed_texture_pvrtc;
  33. /** Defines if etc1 texture compression is supported */
  34. etc1: any; //WEBGL_compressed_texture_etc1;
  35. /** Defines if etc2 texture compression is supported */
  36. etc2: any; //WEBGL_compressed_texture_etc;
  37. /** Defines if astc texture compression is supported */
  38. astc: any; //WEBGL_compressed_texture_astc;
  39. /** Defines if float textures are supported */
  40. textureFloat: boolean;
  41. /** Defines if vertex array objects are supported */
  42. vertexArrayObject: boolean;
  43. /** Gets the webgl extension for anisotropic filtering (null if not supported) */
  44. textureAnisotropicFilterExtension?: EXT_texture_filter_anisotropic;
  45. /** Gets the maximum level of anisotropy supported */
  46. maxAnisotropy: number;
  47. /** Defines if instancing is supported */
  48. instancedArrays: boolean;
  49. /** Defines if 32 bits indices are supported */
  50. uintIndices: boolean;
  51. /** Defines if high precision shaders are supported */
  52. highPrecisionShaderSupported: boolean;
  53. /** Defines if depth reading in the fragment shader is supported */
  54. fragmentDepthSupported: boolean;
  55. /** Defines if float texture linear filtering is supported*/
  56. textureFloatLinearFiltering: boolean;
  57. /** Defines if rendering to float textures is supported */
  58. textureFloatRender: boolean;
  59. /** Defines if half float textures are supported*/
  60. textureHalfFloat: boolean;
  61. /** Defines if half float texture linear filtering is supported*/
  62. textureHalfFloatLinearFiltering: boolean;
  63. /** Defines if rendering to half float textures is supported */
  64. textureHalfFloatRender: boolean;
  65. /** Defines if textureLOD shader command is supported */
  66. textureLOD: boolean;
  67. /** Defines if draw buffers extension is supported */
  68. drawBuffersExtension: boolean;
  69. /** Defines if depth textures are supported */
  70. depthTextureExtension: boolean;
  71. /** Defines if float color buffer are supported */
  72. colorBufferFloat: boolean;
  73. /** Gets disjoint timer query extension (null if not supported) */
  74. timerQuery?: EXT_disjoint_timer_query;
  75. /** Defines if timestamp can be used with timer query */
  76. canUseTimestampForTimerQuery: boolean;
  77. /** Defines if multiview is supported (https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/) */
  78. multiview?: any;
  79. /** Defines if oculus multiview is supported (https://developer.oculus.com/documentation/oculus-browser/latest/concepts/browser-multiview/) */
  80. oculusMultiview?: any;
  81. /** Function used to let the system compiles shaders in background */
  82. parallelShaderCompile?: {
  83. COMPLETION_STATUS_KHR: number;
  84. };
  85. /** Max number of texture samples for MSAA */
  86. maxMSAASamples: number;
  87. /** Defines if the blend min max extension is supported */
  88. blendMinMax: boolean;
  89. }