-
Notifications
You must be signed in to change notification settings - Fork 19
Adding Shaders
Adding shaders is fairly easy and modular.
Make a shader! Make sure to take note of the name you give it, eg Waterfall/MyAwesomeShader
Do this via the usual Unity way - tag it as an asset in a new bundle, and build the bundle. I won't get into this as the method is nothing special.
You should rename the file generated. The target name should be myShaderBundleOfDoom-platform.waterfall
, where platform
is one of windows
, linux
, macos
. The platform allows control over what shader versions might be loaded on different platforms, if you need to compile different versions.
Put the bundle in GameData\Waterfall\Shaders\
. It will be loaded up when KSP starts.
Use the shader in an effect by specifying the name you gave it when authoring the MATERIAL
block of a MODEL
node appropriately.
Create an empty configuration file anywhere in GameData, say GameData/MyModName/WaterfallShaders.cfg
.
Add entries for each shader you want to use in the UI. name
is the name of the shader as defined in the shader code, description
is a short bit of text to show. workflow
is which workflow you should use it with, values are Dynamic
, Deforming
, Billboards
.
WATERFALL_TEXTURE
{
name = Cloud Noise
path = Waterfall/FX/fx-noise-4
description = fx-noise-4
}