Do you get any messages regarding shaders or materials or rendering in the message log on the page or in the web browser’s page console? Can you verify the page is running as WebGL 2? (there should be a printed line in the console that states WebGL 2 or WebGL 1)
Iirc UE 4.16 with WebGL 2 should lift the restriction of only having 4 texture samplers available. Though just for testing, are you able to reduce to three or fewer blended textures? I wonder if that is the root cause here, i.e. whether blending only two or three textures together works?
I have built my game on both WebGL 2 and 1. WebGL2 gives no error message but WebGL1 states “Your browser or graphics card does not support the WebGL extension EXT_sRGB. This can impact UE4 graphics performance and quality.”
Not sure what that means and why it doesn’t say it on WebGL2 though. I have tried setting a material with a single texture node as my landscape material and tried only blending 3 materials but still didn’t seem to render anything.
Edit: Confirmed again blending 2 landscape textures still doesnt render the landscape and I have a GTX 1060 6GB.
Edit2: these happen & my packaging settings(had to enable compress and cook everything in order for the game to work, changing these has no consequence)
WebGL 2 has the features of the WebGL 1 extension EXT_sRGB subsumed to the core WebGL 2 specification, so that extension is no longer needed. The problem not occurring with blending fewer textures suggests the issue is not about the number of texture units then.
Try navigating to page about:config in Firefox, and setting webgl.max-warnings-per-context to something higher than the default 32. That will up the limit at “No further warnings will be reported for this WebGL context. (already reported 32 warnings)”. Perhaps that might uncover an issue that drowned in the clearBuffer() messages, which I think are unrelated and due to something else here.
Apologies for double post but I’ve found something out. I’ve created a test project with 4 different textures all 1024x1024 and exported it out to HTML. The landscape renders but the blue texture is being rendered incorrectly. So it seems to be something wrong with my project itself, if any detail it was made in 4.12 and upgraded to 4.16. But the images below seem to indicate a bug in 4.16 possibly.
The WebGL message “Error: WebGL warning: uniform4uiv: Function used is incompatible with uniform type: 35669” is certainly an indication of a bug in UE4 WebGL backend. I would recommend making a minimal project (like you seem to have been doing already above?) to reproduce this and posting to the bug report section of this forum (Einen Fehler melden - Unreal Engine). A zip bundle + steps here might also help others to reproduce, and the UE4 devs to reach a bugfix.
The other WebGL messages like
Error: WebGL warning: drawElements: Framebuffer not complete. (status: 0x8cd7)
Error: WebGL warning: drawElements: Framebuffer must be complete.
can be ignored, they are present in all exports at the moment I think.
Also the CORS related message comes from the telemetry option, which you can disable in the project settings by choosing “End users do not send telemetry” (or something similar, I forget the exact UI option), though the warning message is harmless as well.
Any chance you could zip up and link your web export of the minimum problem repro somewhere? There is one JavaScript side trick I could try to see if this might be able to be worked around outside the UE4 engine.
I made that new project to test if the landscape would render when exported and it did and in the process I found the layer blend bug shown above. So the issue must exist in my project somewhere but not sure what might be causing it, my map is very big if thats anything to go off and I haven’t optimized it massively well but it still runs fine. I’ve uploaded both projects just incase:
Modified the .js file in OUAC_HTML.zip to work around the “Error: WebGL warning: uniform4uiv: Function used is incompatible with uniform type: 35669” error, but unfortunately that does not seem to be the root source of the blending issue, and the terrain stays white even with that error removed, so the problem must be somewhere else.
It’s curious that in the game build, the terrain is completely white but in the layer blend example, it does show up at least partially, so it looks like multiple separate issues in play somehow.
Apologies for the long reply. Thank you for all of your help but I have decided to abandon this project, like you say its something to do with my project which could be anything. I decided its most beneficial to remake this game from the ground up now to ensure there are no errors at start
I do hear from UE4 developers that the root cause for issue “Error: WebGL warning: uniform4uiv: Function used is incompatible with uniform type: 35669” was located. Hopefully next UE4 patch version might have a fix incorporated, so worth keeping an eye out for the next version.