Bakery's Vertex Lit Lightmaps and ASE shaders

Node-based Shader Editor

Bakery's Vertex Lit Lightmaps and ASE shaders

Postby mehran » Fri Jan 18, 2019 11:54 am

Hi,
I am using bakery, which is a lightmapping plugin for unity. One of it's features is to provide vertex-color Lightmaps.
But those need to be supported inside of shaders.
I wanted to ask how I can have those supported in my ASE shaders.
here is the reply I got from the author of bakery
you can take a look at ftSimpleVertexLM.shader included in Bakery. This is a simplest unlit shader using vertex lightmaps, so should be easy to understand how it works.
Basically you just read vertex color and decode using this formula:

// Decode baked HDR vertex color (RGBM)
o.color = v.color.rgb * v.color.a * 8.0;
o.color *= o.color;

o.color can be now used as final lighting value.


any chance you guys can support this inside of ase as well?
thanks
mehran
 
Posts: 6
Joined: Wed Oct 17, 2018 11:02 am

Re: Bakery's Vertex Lit Lightmaps and ASE shaders

Postby CaptainHexagon » Sat Jan 19, 2019 8:18 am

If it modifies the vertex color of the mesh, Then I believe all you need to do is to reroute that value through your shader. to do so you can just add a "Vertex Color" node and multiply that over your texture sampler or whatever you have.

I noticed that he is using simple math to convert the HDR to normal values. this is simple here is an example https://imgur.com/a/JkyuRmi

Just do the same.

Let me know if this helped.
CaptainHexagon
 
Posts: 3
Joined: Sat Jan 19, 2019 7:58 am

Re: Bakery's Vertex Lit Lightmaps and ASE shaders

Postby mehran » Mon Jan 21, 2019 8:05 am

thanks man,
I will try that.
but I want to be able to use this as a regular light map, on pbr shaders with realtime lighting and all, is that possible?
mehran
 
Posts: 6
Joined: Wed Oct 17, 2018 11:02 am

Re: Bakery's Vertex Lit Lightmaps and ASE shaders

Postby Amplify_Borba » Thu Jan 24, 2019 3:49 pm

Hello! I'm not at all familiar with Bakery myself, you might be able to integrate it as in this example, in order to access its specific functions.

We can't officially support 3rd party shaders or assets, but we've worked with other developers in order to assist them with adding ASE-built shaders or custom nodes, which are included in their packages and maintained by them.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron