Page 1 of 1

How to affect Lightmap in Surface Shader ?

PostPosted: Thu Jun 21, 2018 1:09 am
by Strkl
Hello everyone, I have a simple shader question :

Let's say I have a Static, Lightmapped object in a scene. Is there a way for me to create a shader that will affect the lightmap ?
I tried searching but can't find any leads on this.

My question is not about modifying the lightmap itself ( I don't want to touch the Lightmap/Directional lightmap), but I want to do some shader processing on it (Ex : tinting, Masking, ...), on a surface shader if possible !

Thanks :D

Re: How to affect Lightmap in Surface Shader ?

PostPosted: Mon Jun 25, 2018 3:25 pm
by Amplify_Borba
Hey there, thank you for getting in touch!

Although we offer a specific Lightmap node that is meant to be used with templates / custom shaders, Lightmaps are automatically accessed/decoded under the hood by Surface Shaders.

We can give you access to the unity_Lightmap texture and its texture coordinates, but you wont be able to modify it, or change the way it is applied using only a shader. Remapping lightmap data may be possible but would require more work than only shader related control.

Please let me know if you have any further questions, I'll be happy to help!