Shader Builder - How to Decouple Ambient from Diffuse
A special thanks to ReDave and many others who contributed to this information. The original and full forum post can be viewed here: Shader Builder - How to Decouple Ambient from Diffuse
Here's a mini tutorial on how to decouple ambient from diffuse. You will loose tiling, AFAICT, and the shader doesn't seem to load in Shader Mixer for further shader play, so all of that will have to be redone in Shader Builder. :?
Shader Builder can be overwhelming with lots of windows with plenty of confusing stuff, but the procedure to decouple ambient is not painful at all.
The first pic shows the familiar state of affairs, of ambient slaved to diffuse.
Bring up Shader Builder (View->Tabs->Shader Builder). The active tab should say Catalog, below it is a panel labeled Shader Categories, and several shader categories are listed below it. Click on the one named Surface, if it isn't the default. In the panel on the right you'll see four icons, one of which is named DzPower. Right-click on it and select Duplicate Shader, and give it a name. I named it DzPower Ambient. Double click (or right click and select Edit Shader) on the newly created DzPower Ambient shader. A new window will appear with a number of squiggly lines going to and fro. Roughly in the middle of those lines will be a largish block named Plastic. Again either double click anywhere inside the block, or right click on it and select Edit Macro Instance. This will pop up yet another window. In the bottom part of this window are three tabs, named Global Code, Initialization Code and Evaluation Code. Click on the latter: you'll see a short line that probably says (probably, because I edited it :lol: ):
Cut the §6§+% part and paste it outside of the parentheses that are multiplied by §2§, such that it looks for example like this:
Ok, we're done, click Accept. I clicked on Save Network just under the Atmosphere Code tab on the window with all the squiggly lines, then closed that window. Now we're back at the Shader Builder main window, right click on your new shader and click on Apply to selected surface(s).
Final picture shows the result.