► Shader Graph Baker - Tool for baking a texture from Shader Graph ◄

Tool for baking Shader Graph nodes output into a Texture2D, Texture2DArray and Texture3D files.
Useful for creating procedural, gradient, noise or custom effect textures, generating normal and other types of maps, optimizing shader by replacing a complex set of static nodes with just one texture.

Asset Store Page
Documentation


1 Like

Update v2022.4 features:

Exporting image sequence files separately:
8625906--1158969--Radial.gif

Exporting image sequence files as Texture2DArray asset:
8625906--1158972--Radial_Array.gif

Exporting image sequence files as Atlas:
8625906--1158975--Radial_Atlas.gif

Hello there, I am interested in your asset. Is there a way to call the Bake method at runtime from a script ?

Yes. It is possible.

1 Like

With new update, now it is possible to create Texture3D files using Shader Graph.

8654097--1164855--Reddit-Gif---3D-Clouds-(1000x560).gif

1 Like

With the new update (v2023.1) now it is possible to bake textures in runtime.

Looks really nice to have something “à la substance designer” inside unity. Will probably try it once time is available. Would love to integrate this in my workflow.

I know this was asked before, but just to make triple sure, I can change the shader’s properties during runtime on a built game, then bake those textures and store them so I can use them in the game?

Any properties that can be adjusted with ShaderGraph editor, also can be modified in run-time too and then shader can be baked into a texture.
Check the last chapter inside Manual file.

I am having trouble getting this asset to work. I have created a shader with procedural noise and wanted to bake it as a texture. the output image shows a jagged portion of what it should and is not correct. I also tried to replicate a shader that was shown in the manual and it still has the same output image as the first shader!?

Any help would be greatly appreciated, Thanks!

Unity version?
Render pipeline?
Can you send me your custom shader?

Unity version = 2022.3.4f1
Render Pipeline = URP
Attached is the gradient shader that I recreated from the manual. Is there a setting I’m missing or something? Thanks.

9437273–1323635–shader baker test.zip (3.54 KB)

At my side I can’t find any problems. Tool works as as expected.

Try attached file. Copy it to the Amazing Assets\Shader Graph Baker\Scripts folder.
Lets see if it works for you.

9438014–1323758–MaterialExtensions.cs (1.85 KB)

Hi Arkhivrag!, I think this could be of great use on my current project, before buying I wonder if you could help with some doubts I have

My game is very procedural so my shader graph builds a color atlas each time the player is going to start a new level, so it gets updated quite often on runtime, can I keep updating the material and baking textures on runtime? I read the documentation but think I didn’t fully understand the “bake shader” process and if it comes with any limitations I should be aware of.

After baking the ShaderGraph file inside editor, it can be used for generating textures in run-time. Any property inside this baked shader can be updated and modified from script in run-time, of course.
Note, baked ShaderGraph file can’t be used for mesh rendering, only for texture generating. In this case just keep the source ShaderGraph too for mesh rendering.

1 Like

Thank you!, it works exactly as needed then, I’ll forward this to the team to make the purchase and implement it, It is extremely useful

Hi, I was wondering if the tool also allows baking nodes that output a vector3. I have custom nodes that calculate fbm 3d noise, so I get a single float value that is then “coloured” by going through gradients and other layer of nodes.

In the Shader Graph, they don’t look like 2d textures but the texture is shown in 3d on a sphere. Do you know if it will work in this case? Thank you.

If nods calculate volumetric 3D noise and you want to simplify shader by excluding all those nodes calculation, then this tool can generate Texture3D file too, based on those nodes.

It’s not actually a 3D texture. I have custom nodes that look like this:

The “noise” custom function is calling a function that calculates the fractal brownian motion using 3D simplex noise. The output is a single float, which I then use with like a sample gradient node to colour the map for example.

I was wondering what would happen if you were to bake this kind of node that relies on the 3D object position.