Surface Pro Go2 Errors

Using a SUrface GO 2 and seemingly as soon as the user touches the sccreen (I think) I get the error:

Failed to Link shader program. Error:
FRAGMENT shader texture image units count exceeds
MAX_TEXTURE_IMAGE_UNITS(16)

And then the app because almost unresponsive, laggy and basically completely messed up. This problem doesn’t happen on a regular WIndows PC .

Any ideas? The GO2 is my clients target platform and so far we’ve been doing everything on PC expecting it to work the same on the GO2.

Hi @Grimmy,

Are you using a material that references a lot of texture maps? Or maybe using a custom shader?

That max texture image units error indicates that a shader tried to use more than 16 texture samplers, and that device doesn’t support more than 16 (this a quite common limit).

No custom shaders. My materials just use 1 diffuse, 1 specular and 1 normal map for each. 1 material for each object.

That’s quite strange, even with PBR image based lighting and realtime shadows rendering it should be less than 16.

@mvaligursky do you have any idea?

I still have some 8th wall xrcontroller scripts in thre project (although are never called). Could they be breaking something?

I also removed all the 8th Wall external scripts and this still happens

My suggestion - put a breakpoint in the code that prints that error (this line:

console.error("Failed to link shader program. Error: " + gl.getProgramInfoLog(glProgram));

and inspect shader variable - it should have both vertex and fragment shader source code. Perhaps post them here.

1 Like

Aaargh. That’s easier said than done because I actually don’t have the surface here and I’m relying on an external tester in the US to test it on a Surface. He can provide me with basic console errors but that’s about it.
Do you guys at Playcanvas have a surface? If so, I can share the project.

I should add, that I’m in Argentina and I’ve been waiting for my Surface to arrive through customs from the US for over a month, so that’s why I don’t have access to one.

Also, how do I put a breakpoint in that line. Isn’t that engine code that I don’t have?

I don’t think we have a surface.
Your project runs the engine. You just need to find the file in the Chrome debugger, search for that line and put a breakpoint.

How many live lights do you have in your scene/what does the touch event do?

1 Like

I have 2. They were set to 2048 resolution and had 32 and 16 bit variance shadowmaps. My guess is this is the issue but Im finding it hard to get the scene to look adequate without this.

Is it possible to use baked lights, or are the shadows dynamic?

Go to be dynamic on this because its got moving parts

Hmmmmm… Out of curiosity, how many objects share the same material in the scene?

I’m pretty sure its none. Just 1 template instance made up of 6 objects. Each object has a different material.

It could be worth testing this with an older version of the engine to confirm this is not some recently introduced issue.

Also try a non 8th Wall project to see if that’s part of the issue?

Also, try an 8th Wall project that doesn’t use PlayCanvas to test.

None of the 8th wall scripts are ever used. They are still in the project but they will never run because they aren’t attached to anything , so shouldn’t affect anything.

I reduced the lights to 1 and set it to as basic as i can and there are improvements but still issues. Im hoping to receive the Surface later today so I can do some proper in depth testing.

2 Likes

There’s nothing specs wise that I can see that would cause issues: https://www.microsoft.com/en-gb/d/surface-go-2/8pt3s2vjmdr6?activetab=pivot:techspecstab

That’s what I thought, even my phone runs it without issues.