Skip to content

Commit

Permalink
WebGPURenderer: Ignore diagnostic() method in firefox (#29306)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag authored Sep 3, 2024
1 parent ef813c6 commit 841ea63
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/renderers/webgpu/nodes/WGSLNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ if ( /Windows/g.test( navigator.userAgent ) ) {

//

let diagnostics = '';

if ( /Firefox/g.test( navigator.userAgent ) !== true ) {

diagnostics += 'diagnostic( off, derivative_uniformity );\n';

}

//

class WGSLNodeBuilder extends NodeBuilder {

constructor( object, renderer ) {
Expand Down Expand Up @@ -1246,8 +1256,8 @@ fn main( ${shaderData.attributes} ) -> VaryingsStruct {
_getWGSLFragmentCode( shaderData ) {

return `${ this.getSignature() }
diagnostic( off, derivative_uniformity );
// global
${ diagnostics }
// uniforms
${shaderData.uniforms}
Expand Down

0 comments on commit 841ea63

Please sign in to comment.