Repository navigation
raea/wear: a recipe per material class (WR5) - #198
Merged
Merged
Conversation
wearBake bakes a model's causes once (the native call, now typed), and wearShader draws them as wear by material class: one WESL function per class (plaster, brick, sandstone, granite, wood, iron, zinc, copper, slate, felt, glass, enamel, brass, ground), the stains, rising damp and splash they share, and WR9's season and weather over them, from uniforms (age: years, soot, upkeep; weather: day, wet, snow, storm, ice). A debug mode draws any of 14 causes in false colour from a lit hook. A mesh without the bake's second UV set is left as it was. The bake (raea-sys-weathering 6) writes each texel's class into causes2's spare alpha, read by textureLoad, so one shader serves every material; dilation copies class and element into the gutters instead of averaging two into a third; a primitive with no UV set gets the atlas's as TEXCOORD_0 too, since Bevy's standard surface reads the first wherever there's a second. Proof: bun test in sdk/wear (12), cargo test -p raea-sys-weathering (11), and a street front of all 14 classes baked and rendered by day, in rain, snow and autumn, and cause by cause.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/wear.feature WR5, for 0.1.8.
raea/wear):wearBake(the native call, now typed in native-calls.ts) andwearShader({ baked, classes?, age, weather, up?, debug? }), which returns{ wesl, uniforms, textures }for a<ShaderExtension>,<MeshStandardMaterial shader>or<SurfaceShader>.lithook.Proof:
bun testin sdk/wear: 12 pass.cargo test -p raea-sys-weathering: 11 pass, one of them new.🤖 Generated with Claude Code