In HTML5, why some materials are faulty and some are not - they use the same parameters

Hey,

I have an issue with some materials that are presented in my HTML5 project. I understand that the HTML5 preview (ES2 shader) in the project doesn’t equal to the actual project that is packaged and uploaded to the webpage. In most cases I have managed to surpass the material problems that are caused by HTML low-quality shaders.

I usually put Feature Level Switch between all the nodes that are connected to base material in “Material editor” and use static lighting all over the project. Mostly this has worked properly without errors.

Now I made just a basic material that has only texture - feature level switch - base material (base color input). Picture attached “BasicMaterial.jpg”

This is yellow wallpaper material that works properly in project and in web version.

But the problem is: I created materials for door, grey wallpaper, floor, bedsheets etc. the same way but these aren’t working properly in the browser.

Example:

This picture is taken from the project’ HTML5 preview (ES2 shader preview):

I created the same material settings that worked for one case and aren’t working in the other cases. Here are the main questions that I’d like to ask: What may cause the problem that materials done the same way are working different way? How to fix that?

The project is playable on the address: http://unrealestate.ee/HTML67/ROOSAARE-HTML5-Shipping.html

Works only in 64-bit browser (for me)

Hope You have positive answers for me!

Have a nice day!
Rasmus

Hey, any thoughts guys?

Hey, any thoughts guys?

This is definitely caused by a mismatch in texture wrap modes.

The above picture seems to be using the GL_CLAMP_TO_EDGE texture repeat mode.

The picture below is using GL_REPEAT instead.

See here for a description and images of the GLES2 texturing modes: OpenGL - Textures

I am not intimately familiar with the texture/shader editor - can you find any configuration there that would relate to texture wrapping, repeating or clamping or similar? Does any of that have an effect?

I do notice when running the page that in some of the rooms, the artifacts on the tapestry are exactly like in your screenshot, but in some other rooms, like the one with the two teddy bears on the bed and a clock on the wall, there is a floral texture tapestry that does repeat correctly. I wonder if some of the textures have a mismatching configuration and others wouldn’t? Does the floral tapestry have some kind of special texture mode that is different that makes it work?

Thanks for your answer!

Your point outs and textures objects and parameters page gave me a good knowledge about textures and how they they interact with certain settings. I found few mistakes that may cause the problem and I am 95% sure that I know the solution. I found that few settings were mismatching with the textures that were working correctly and some of the textures were wrong sized (not power of two).

Your answer was super helpful, many thanks!!!

We can close this one!

Oh right, definitely, GLES2 & WebGL 1 have the restriction that repeating textures need to be power of 2 in size. I presume the ES2 shader preview is not able to account for that fact.

GLES3 & WebGL 2 will lift this restriction and allow repeating textures also when they are not power of 2 in size.