mirror of
https://github.com/bevyengine/bevy.git
synced 2026-05-06 06:06:42 -04:00
185712fbef
This commit expands the number of textures associated with each clustered decal from 1 to 4. The additional 3 textures apply normal maps, metallic-roughness maps, and emissive maps respectively to the surfaces onto which decals are projected. Normal maps are combined using the [*Whiteout* blending method] from SIGGRAPH 2007. This approach was chosen because, subjectively, it appeared better than the more complex [*reoriented normal mapping* (RNM)] approach. Additionally, *Whiteout* normal map blending is commutative and associative, unlike RNM, which is a useful property for our decals, which are currently applied in an unspecified order. (The fact that the order in which our decals are applied is unspecified is unfortunate, but is a long-standing issue and should probably be fixed in a followup.) In particular, commutativity is desirable because otherwise one must specify which normal map is the *base* normal map and which normal map is the *detail* normal map, but that's not a policy decision that Bevy can unconditionally make, as decals aren't necessary more detailed than the base normal map. (For instance, consider a bullet hole decal embedded in a wall with a subtle rough texture; one might reasonably argue that the base material's normal map is the detail map and the bullet hole is the base map, even though the bullet hole's normal map comes from a decal.) Note that, with a custom material shader, it's possible for application code to use the decal images for arbitrary other purposes. For example, with a custom shader an application might use the metallic-roughness map as a clearcoat map instead if it has no need for a metallic-roughness map on a decal. And, of course, a custom material shader could adopt RNM blending for decals if it wishes. A new example, `clustered_decal_maps`, has been added. This example demonstrates the new maps by spawning clustered decals with maps randomly over time and projecting them onto a wall. <img width="2564" height="1500" alt="Screenshot 2025-12-05 095953" src="https://github.com/user-attachments/assets/255fca64-2b42-4794-a367-14336d023310" />
44 lines
1.5 KiB
TOML
44 lines
1.5 KiB
TOML
[files]
|
|
extend-exclude = [
|
|
"*.pbxproj", # metadata file
|
|
"*.patch", # Automatically generated files that should not be manually modified.
|
|
"*.bin", # Binary files
|
|
".git/", # Version control files
|
|
]
|
|
ignore-hidden = false
|
|
|
|
# Match Inside a Word - Case Insensitive
|
|
[default.extend-words]
|
|
LOD = "LOD" # Level of detail
|
|
reparametrization = "reparametrization" # Mathematical term in curve context (reparameterize)
|
|
reparametrize = "reparametrize"
|
|
reparametrized = "reparametrized"
|
|
mis = "mis" # mis - multiple importance sampling
|
|
caf = "caf" # CAF - Core Audio Format
|
|
|
|
# Match a Whole Word - Case Sensitive
|
|
[default.extend-identifiers]
|
|
Ba = "Ba" # Bitangent for Anisotropy
|
|
ba = "ba" # Part of an accessor in WGSL - weights.ba
|
|
fLenOt = "fLenOt"
|
|
iFO_a = "iFO_a"
|
|
iFO_b = "iFO_b"
|
|
Nd = "Nd" # Normal of Decal
|
|
ser = "ser" # ron::ser - Serializer
|
|
toi = "toi" # Time of impact
|
|
vOt = "vOt"
|
|
vOt2 = "vOt2"
|
|
|
|
[default]
|
|
locale = "en-us"
|
|
# Ignored typos regexes
|
|
extend-ignore-re = [
|
|
"\\bBelen Masia\\b", # The surname of one of the authors of SMAA
|
|
"\\bBig Sur\\b", # macOS Big Sur
|
|
"\\bgeneric-rpg-ui-inventario", # Inventory in Portuguese
|
|
"\\bmetalness\\b", # Rendering term (metallicity)
|
|
"\\bNDKs\\b", # NDK - Native Development Kit
|
|
"\\bPNGs\\b", # PNG - Portable Network Graphics file format
|
|
"b\"wdth\"", # OpenType feature identifier for "width"
|
|
]
|