A .cfg file, is a configuration file. It's used in the Engine for adding and setting up several features to materials and textures. It's just a text file including simple pieces of code that allows us to activate and change that features. They are almost always placed near to the textures with the same name.
There are mainly two types of .cfg files: material and reflections. Let's take a look at each one of them and how to use them.
These files allow us to setup texture's parameters. Mainly they're used to use transparent textures. Here is the content of a standard .cfg file:
[TextureConfiguration] Blend= 1 BlendOp0= BLEND_SRC_ALPHA BlendOp1= BLEND_ONE_MINUS_SRC_ALPHA AlphaTest= 0 AlphaFunc= LOWER AlphaRefValue= 1.0
These lines define how the texture blends with other textures behind it, and how the alpha channel is being drawn in the Engine. Let's take it by parts, and explain the effect these parameter have.
First, the blending options:
[TextureConfiguration] Blend= 1 BlendOp0= BLEND_SRC_ALPHA BlendOp1= BLEND_ONE_MINUS_SRC_ALPHA