Pārlūkot izejas kodu

Fix pre-pass renderer with webgpu

Popov72 4 gadi atpakaļ
vecāks
revīzija
515555bc65

+ 1 - 1
src/Engines/WebGPU/webgpuShaderProcessors.ts

@@ -90,7 +90,7 @@ export class WebGPUShaderProcessor implements IShaderProcessor {
 
         const webgpuProcessingContext = processingContext! as WebGPUShaderProcessingContext;
 
-        const varyingRegex = new RegExp(/\s*varying\s+(\S+)\s+(\S+)\s*;/gm);
+        const varyingRegex = new RegExp(/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm);
         const match = varyingRegex.exec(varying);
         if (match != null) {
             const varyingType = match[1];

+ 0 - 2
src/Shaders/ShadersInclude/prePassDeclaration.fx

@@ -1,9 +1,7 @@
 #ifdef PREPASS
 #extension GL_EXT_draw_buffers : require
-#ifdef WEBGL2
 layout(location = 0) out highp vec4 glFragData[{X}];
 highp vec4 gl_FragColor;
-#endif
 
 #ifdef PREPASS_DEPTHNORMAL
     varying highp vec3 vViewPos;