|
@@ -13824,7 +13824,7 @@ var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGH
|
|
|
|
|
|
var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";
|
|
|
|
|
|
-var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";
|
|
|
+var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";
|
|
|
|
|
|
var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";
|
|
|
|
|
@@ -19891,14 +19891,12 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
|
|
|
prefixVertex = [
|
|
|
customVertexExtensions,
|
|
|
- 'precision mediump sampler2DArray;',
|
|
|
'#define attribute in',
|
|
|
'#define varying out',
|
|
|
'#define texture2D texture'
|
|
|
].join( '\n' ) + '\n' + prefixVertex;
|
|
|
|
|
|
prefixFragment = [
|
|
|
- 'precision mediump sampler2DArray;',
|
|
|
'#define varying in',
|
|
|
( parameters.glslVersion === GLSL3 ) ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;',
|
|
|
( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor',
|
|
@@ -26234,11 +26232,11 @@ void main() {
|
|
|
|
|
|
if ( coord.x >= 1.0 ) {
|
|
|
|
|
|
- gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
|
|
|
+ gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
|
|
|
+ gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -26286,7 +26284,6 @@ class WebXRDepthSensing {
|
|
|
|
|
|
const viewport = cameraXR.cameras[ 0 ].viewport;
|
|
|
const material = new ShaderMaterial( {
|
|
|
- extensions: { fragDepth: true },
|
|
|
vertexShader: _occlusion_vertex,
|
|
|
fragmentShader: _occlusion_fragment,
|
|
|
uniforms: {
|
|
@@ -50724,11 +50721,9 @@ function intersect( object, raycaster, intersects, recursive ) {
|
|
|
/**
|
|
|
* Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system
|
|
|
*
|
|
|
- * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.
|
|
|
- * The azimuthal angle (theta) is measured from the positive z-axis.
|
|
|
+ * phi (the polar angle) is measured from the positive y-axis. The positive y-axis is up.
|
|
|
+ * theta (the azimuthal angle) is measured from the positive z-axis.
|
|
|
*/
|
|
|
-
|
|
|
-
|
|
|
class Spherical {
|
|
|
|
|
|
constructor( radius = 1, phi = 0, theta = 0 ) {
|