Hi there!,
I’m working on a project that requires the use of lightmaps generated from unreal engine and exported to glb. Taking some inspiration from https://github.com/ue4plugins/GLTFWebViewer I’ve got my own version of that working quite nicely however it depends on uvs sets above uv1 which doesn’t seem to be supported and as a result there are a number of broken materials. I did a local hackfix to make the shader generate the code to access the additional uvs sets which seems to work.
My question is, is there an official way to either
- get access to the uv2,uv3 uv4 etc
- enhance the original shader to get access to them so i can fix it without needing to modify playcanvas itself?
Thanks for your time
Ηι @Adriaaaaan and welcome,
You may be able to create a custom vertex format to support additional UV channels. I think there was discussion about this before.
@mvaligursky may be able to help here.
I don’t believe standard material has a way to use more than 2 uv channels at the moment.
Custom shaders should be ok to use it though.
I assume you’re after the standard shader path? Perhaps create an engine issue … there’s a bigger refactoring of the standard shader taking place for the node graph implementation, perhaps this can be done during that work as well.
1 Like
By custom shader I’m guessing you mean totally replacing the shader in its entirety? Since its a large glb with a lot of materials that probably isn’t viable since i presume there will be differences between each one.
I’ll add an issue on the engine, any ideas on how long the refactoring might take? I can probably patch it in again (I’m already having to do that for an unrelated breaking bug)
Yes I meant totally replacing shader, which is a good way for some things, but not for PBR rendering.
Refactor will take a while, and this might not be part of the initial work on it. If you have some generic code, perhaps share that so we can investigate some easier path?
its a PBR shader yes. In my monkey patch I just upped the max number and went through copying all of the uv init code to do the others. Frustratingly a lot of the basics are already there
2 Likes