Shaders and textures optimization

HELLO!,my friends have made on your engine a couple of cool sites but are faced with the problem of productivity , mobile devices, peak load is generally switched off.what could you suggest with sequential Shader loading and texture optimization without losing text quality


Off-Topic to your question - how did you create the texture fade on abir holdings? This looks amazing!

1 Like

simple shader + world position) we create 2 textrue channels and change they alpha by mask

1 Like

So you are using a ShaderMaterial on all Meshes, not a standard PBR Material right?

that’s right, we used a custom Shader on all meshes that change textures

Great work and really nice idea :slight_smile:

To answer a part of your question

I don’t use the .babylon format for my projects. I always create a custom loader. First I load the environment and models - sometimes the textures are already included in the glb files, sometimes not.

After finishing the initial loading I can display the basic scene (most of the time the client wants a camera movement, revealing the scene with scene.fogDensity or something like that) and async load the rest of the textures/models/files.

I think this would be a good solution for projects like abir holdings since this takes really a long time to load.

For progressive loading, you can use the MSFT_load extension if using gltf/glb files: Progressively Load glTF Assets - Babylon.js Documentation

For texture optimization you can try to use compressed textures through .basis files: Multi-Platform Compressed Textures - Babylon.js Documentation

There are also .ktx2 files: we are currently reworking the ktx2 loader but you can still use them with the current preview release (the reworking will lower the memory footprint of the loader). You will need to use the KHR_texture_basisu extension to use them with gltf files. Note however that ktx2 support in gltf is still a work in progress at Khronos, the proposal is still in draft mode.

…and very nice projects!

thank you very much)

thank you very much)we will try the proposed solutions