- Home /
What is the capability of ShaderLab's LightmapMode tag?
Is there anything that stops you from using LightmapMode on non-lightmap textures, such that you could use, for example, many different diffuse textures with one material? I don't see how that restriction could exist, considering a lightmap is just a texture that gets multiplied in, but I would have thought this would be a more popular solution, considering the batching capabilities of Unity iPhone; I see very few forum posts that use LightmapMode at present.
Can the LightmapMode tag be used on more than one texture?
I don't think so, but LightmapMode is a handy feature that could be expanded upon. If it's already more robust than the documentation would lead me to believe, please let me know, if you know!
I'd also love to see some more information or an example or two with this! currently fumbling my way through implementing Lucas's lightmap asset pipeline from the unite08 talk
Answer by Aras · Jan 19, 2010 at 02:17 PM
Starting with Unity 3.0, this tag doesn't do anything.
In Unity pre-3.0, Marking texture as LightmapMode in the shader would do exactly this:
- It would take the actual texture from LightmapSettings, based on current lightmap index value of Renderer. That is, texture is not taken from the material.
- It would use scale&offset values from Renderer, and not from the material.
That's the only things it does. And it does not have to do anything with batching or iPhone.
I tried investigating the first bullet point last month, but found Lightmap Settings to be either broken, or its proper usage just undocumented. Some sort of example would be excellent.
Your answer
Follow this Question
Related Questions
Building a Custom Shader 1 Answer
Toon Shader for the iPhone 1 Answer
RimLight Shader 0 Answers
Shader to ignore post processing effects 0 Answers
What is the Dot3 texture combiner supposed to do with the alpha channel? 1 Answer