INNER CODE UNIT · JavaScript

gl_FragColor

hyperfy-xyz/hyperfy · src/core/libs/three-custom-shader-material/index.js:347

      gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * 1.0 - ${e.depthAlpha} );
    `,
      'gl_FragColor = packDepthToRGBA( fragCoordZ );': `
      if(${e.depthAlpha} < 1.0) discard;
      gl_FragColor = packDepthToRGBA( dist );
    `,
      'gl_FragColor = packDepthToRGBA( dist );': `
      if(${e.depthAlpha} < 1.0) discard;
      gl_FragColor = packDepthToRGBA( dist );
    `,
    },
    [`${e.clearcoat}`]: {
      'material.clearcoat = clearcoat;': `material.clearcoat = ${e.clearcoat};`,
    },
    [`${e.clearcoatRoughness}`]: {
      'material.clearcoatRoughness = clearcoatRoughness;': `material.clearcoatRoughness = ${e.clearcoatRoughness};`,
    },
    [`${e.clearcoatNormal}`]: {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…