--JawZ-- wrote:It's fetched from the "main" file any of the .fxh file is included in.
Still having it all in one file is overwhelmingly much, especially for a new users.
I'm not saying you personally should stick to that default layout, it was never intended to be used as is, but to be merged.
However with the way I have it now, it will make it easier to just enable two code lines for effect activation, to see which effects will be the ones to make the cut. And when that is done import the codes into the main file. It's a simple copy paste from the .fxh files into the .fx files.
Eh. Suit yerself, but I'm sticking to me ol' Monolithic shaders. A bit of smart commenting goes a long way for organization; just add "//begin SomeEffect" at the beginning of a particular bit of shader code, then add "//end SomeEffect" at the end of it. Do the same for the GUI variables, and voila. Ctrl+F Heaven.
On a different note lads, I figured out how you add interior and night-day controls. Fairly simple, once you get your head around the whole lerp business. I'll share it fer posterity.
For example, let's take this bit of code.
Code: Select all
color=lerp(tempgray, color, ECCSaturation);
Lerp interpolates the first variable and the second variable, by using the third variable.
If the 3rd is @ 1, variable 1 is used at 100%.
If the 3rd is @ 0.5, variable 1 is at 50% and variable 2 is at 50%.
If the 3rd is @ 0, variable 2 is used @ 100%
So if we want to add interior-exterior separation, we just add an interior GUI control, and make the code into a nested lerp.
Code: Select all
color=lerp(tempgray, color, lerp(ECCSaturation, ECCSaturationInterior, EInteriorFactor));
Same idea for adding day-night separation. But if you want to add interior, exterior & night and day, ya will want to split it up.
Code: Select all
ECCSaturation=lerp(ECCSaturation, ECCSaturationNight, ENightDayFactor);
color=lerp(tempgray, color, lerp(ECCSaturation, ECCSaturationInt, EInteriorFactor));