SvenFrankson Posted August 18, 2017 Share Posted August 18, 2017 Hi everyone, (note : At first I thought it was a bug, now with a Playground I think it's a feature I don't fully understand...) Here is a case I'm facing, waiting for some nice expert to enlighten me... Use case - A mesh is generated with UVs (for diffuse Texture) and UVs1 (for a default ambient texture). - On a user action, another ambient texture is computed, based on UVs2 channel, and applied. - The new ambient texture fails to use UVs2. (note : I'd like to have all the UVs (UVs, UVs1 and UVs2) generated at the same time, and not on user action) (note : A solution for my specific case would be to exchange UVs1 and UVs2 when assigning the new ambient texture) Playground : https://www.babylonjs-playground.com/#6L74SN#1 Is there a way to use UVs2 for the ambient texture here ? Alternatively, is there a use for all these UV channels in the StandardMaterial (or PBRMaterial ?) ? Some rules like "UVs or UVs1 for diffuse, UVs2 for LightMap, UVs3 for displacement..." ? Thanks a lot and have a nice day ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 18, 2017 Share Posted August 18, 2017 Hello! not a bug per se but more a limitation: StdMaterial and PBRMaterial can only use 2 textures coordinates (uv0 and uv1). Here is the code for your record: https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/default.vertex.fx#L138 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.