浏览代码

Add new framebuffersHaveYTopToBottom feature to engine

Popov72 4 年之前
父节点
当前提交
4799d42af0
共有 3 个文件被更改,包括 5 次插入0 次删除
  1. 3 0
      src/Engines/engineFeatures.ts
  2. 1 0
      src/Engines/thinEngine.ts
  3. 1 0
      src/Engines/webgpuEngine.ts

+ 3 - 0
src/Engines/engineFeatures.ts

@@ -4,4 +4,7 @@ export interface EngineFeatures {
 
     /** Indicates that the engine support rendering to as well as copying to lod float textures */
     supportRenderAndCopyToLodForFloatTextures: boolean;
+
+    /** Indicates that framebuffers have Y going from top to bottom for increasing y values */
+    framebuffersHaveYTopToBottom: boolean;
 }

+ 1 - 0
src/Engines/thinEngine.ts

@@ -172,6 +172,7 @@ export class ThinEngine {
     public static Features: EngineFeatures = {
         forceBitmapOverHTMLImageElement: false,
         supportRenderAndCopyToLodForFloatTextures: false,
+        framebuffersHaveYTopToBottom: false,
     };
 
     /**

+ 1 - 0
src/Engines/webgpuEngine.ts

@@ -196,6 +196,7 @@ export class WebGPUEngine extends Engine {
 
         ThinEngine.Features.forceBitmapOverHTMLImageElement = true;
         ThinEngine.Features.supportRenderAndCopyToLodForFloatTextures = false; // TODO WEBGPU should be true but needs RTT support first for env texture to be generated correctly with this flag on
+        ThinEngine.Features.framebuffersHaveYTopToBottom = true;
 
         options.deviceDescriptor = options.deviceDescriptor || { };
         options.swapChainFormat = options.swapChainFormat || WebGPUConstants.TextureFormat.BGRA8Unorm;