Error with r150 - Does Not Display Simple Mesh

Is this the proper place to report errors?

I have been updating and modifying an Ocean Wave Generator. My program is here on CodePen and has been updated to r150.

I have been making some minor changes, one of which was to add back a SpecularFactor. To show the sun, I added this simple subroutine:

	// Sun Object
	let geoSun = new THREE.SphereGeometry(64, 16, 16);
	let matSun = new THREE.MeshBasicMaterial({color: SunCol});
	let mshSun = new THREE.Mesh(geoSun, matSun);
	scene.add(mshSun);
	mshSun.position.x = 5000*sunLightPosition.x;
	mshSun.position.y = 5000*sunLightPosition.y;
	mshSun.position.z = 5000*sunLightPosition.z;

However, if I run the program in Chrome on r150, the sun does not display and I get a three.js shader error (although the program otherwise keeps running). If I downgrade to r149, the problem disappears. I don’t see any obvious changes to r150 that would cause this.

  • Here is the program that uses r149.
  • Here is the identical program that uses r150.

It lists the following errors with three_module.js:

ERROR: 0:165: ‘textureLod’ : no matching overloaded function found
ERROR: 0:165: ‘textureLod’ : no matching overloaded function found
ERROR: 0:166: ‘textureLod’ : no matching overloaded function found
ERROR: 0:166: ‘textureLod’ : no matching overloaded function found
ERROR: 0:165: ‘return’ : function return is not matching type:
ERROR: 0:169: ‘textureSize’ : no matching overloaded function found
ERROR: 0:170: ‘textureSize’ : no matching overloaded function found
ERROR: 0:173: ‘textureSize’ : no matching overloaded function found

relating to these lines:

165: return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
166: g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
167: }
168: vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
169: vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
170: vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
171: vec2 fLodSizeInv = 1.0 / fLodSize;

1 Like

This issue should be fixed by using 0.150.1, see Shaders: Move bicubic texture filtering to transmission chunk. by Mugen87 · Pull Request #25563 · mrdoob/three.js · GitHub.

3 Likes

Yes, that fixes the problem. See, e.g., this example.
Thanks for the quick fix and for all your efforts at making three.js a truly versatile program.

1 Like