normal_bf3 Material Type - PrismaticFlower/shaderpatch GitHub Wiki

A material type that is based on normal_ext but with added features for mods seeking to replicate the cancelled BF3's look. As such while features will not be removed from this material type it's exact look may evolve to better meet the needs of these mods.

Material Properties

DiffuseColor

Type: vec3

Set the diffuse color to be multiplied with the diffuse map.

SpecularColor

Type: vec3

Set the specular color for the material. Has the same effect as the game's specular color parameter.

SpecularExponent

Type: float

Set the specular exponent for the material. The game's default specular exponent is roughly `64.0, so when in doubt use that.

UseSpecularMap

Type: bool

Enable or disable the use of a specular map. It'll be added blended with SpecularColor and replaces the gloss map. See the texture SpecularMap.

GlossMapWeight

Type: float

Set the weight of the gloss map to a value between 0.0 and 1.0. A value of 1.0 indicates to use the gloss map while a value of 0.0 indicates to not use the gloss map and have the specular be at full intensity across the surface. Any other value mixes between full intensity and the intensity specified by the gloss map. When in doubt set this to 1.0.

UseAOMap

Type: bool

Enable or disable the use of an AO map. See the texture AOMap.

UseEmissiveMap

Type: bool

Enable or disable the use of an emissive map. It'll be added overtop of the underlying material, letting you easily and selectively add glow to a surface. See the texture EmissiveMap.

EmissiveTextureScale

Type: float

Same as DetailTextureScale but for the emissive texture.

EmissivePower

Type: float

Value determining how much to increase or decrease the brightness of emissive textures. 0.0 is no change.

UseEnvMap

Type: bool

Enable or disable the use of an environment map. Like stock environment maps it'll be affected by the gloss map and specular color. See the texture EnvMap.

EnvMapVisibility

Type: float

An additional factor to affect the envrioment map's visibility. In the range [0.0001, 1.0], 1.0 is no change and lower numbers make the reflections less visible.

IsDynamic

Type: bool

When true marks the material as being for Dynamic Geoemtry.

DynamicNormalSign

Type: float

The sign of normals of dynamic materials. (Only affects dynamic materials.) Foliage billboards can have their normals incorrectly flipped when used with custom materials, setting this to -1.0 puts them around the right way. You should only use values of -1.0 or 1.0 here, although material_munge will take enforce so it isn't something to worry about in practice.

UseOutlineLight

Type: bool

Enables an outlining light effect intended to help mimic BF3's character lighting.

OutlineLightWidth

Type: float

Width of the lighting outline.

OutlineLightFade

Type: float

Strength of the effect.

OutlineLightColor

Type: vec3

Set the color for effect.

Texture Properties

  • DiffuseMap - Set the diffuse map, same as the game's normal diffuse texture. Should use BC7 or BC7_ALPHA format. (See here.) The alpha channel is never the gloss map, instead it is (if transparency is enabled in the material flags) transparency If the texture is being used in a transparent material or Interior Mapping then PremultiplyAlpha should be true. If the material will be used with HDR rendering then sRGB should be true, otherwise it should be false.

  • SpecularMap - Set the specular map. Should use BC7 format. (See here.) If the material will be used with HDR rendering then sRGB should be true but does not strictly need to be, otherwise it should be false.

  • NormalMap - Set the normal map. Unlike pc_TextureMunge sp_texture_munge can not convert height maps to normal maps so the input must be a normal map already. If UseSpecularLighting is true then the format for the texture should be set to BC7_ALPHA and the gloss map for the material should be in the alpha channel. If the material is diffuse only then the format should be BC5.

  • AOMap - The AO map. Format Should be BC4.

  • EmissiveMap - The emissive map. Format Should be BC7 or BC6H_UF16. If the material will be used with HDR rendering then sRGB should be true if the format is BC7, otherwise it should always be false.

  • EnvMap - The environment map. Format Should be BC7 or BC6H_UF16. If the material will be used with HDR rendering then sRGB should be set to yes if the format is BC7.

Dynamic Geoemtry Support

See here.