I am getting hardcore into scene optimizations and was wondering if its possible to request a lightmap channel mapping to one of the channels of the PBR texture set, exactly like we currently have material.useAmbientOcclusionFromMetallicTextureRed, but material.useLightMapFromMetallicTextureRed.
Not sure how easy it is to implement, just throwing it out there,
So I understand you’re using lightmaps not as shadowmap?
If so - sorry this will be a little off topic… - can you explain a bit about what is your lightmap workflow? (on my side, until now, I always used lightmaps - direct & indirect lighting combined - using useLightmapAsShadowmap on, and I don’t really see how to render lightmaps with this mode off, hence my question )
Pretty much the same thing, except I don’t always bake indirect.
Since AO is already a part of the lightmap/shadowmap material.useAmbientOcclusionFromMetallicTextureRed feature is wasted and it’d be nice to have fewer textures in the project with material.useLightMapFromMetallicTextureRed
As we are trying to only do a single fetch (packing perf reason) we won t be able to use different uv sets here else we would anyway fetch twice.
Nevertheless it would reduce memory usage which is on its own a good thing even with two fetches.
Could you use a custom PBR material to do that ? @nasimiasl and others added some special code to customize parts of the shader. I am trying to limit adding to many configuration as the material is already huge and I would prefer to allow external extensibility than supporting every single use case behind flags.