Skip to content

Triplanar mapping for the Bevy game engine

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

DiSaber/bevy_triplanar_mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_triplanar_mapping

Triplanar mapping for the Bevy game engine. Takes inspiration from bevy_triplanar_splatting. Note: Only supports triplanar mapping for the base_color_texture at the moment

Usage

Simply add the TriplanarMappingPlugin to your app and create triplanar materials using TriplanarMaterial (or ExtendedMaterial<StandardMaterial, TriplanarExtension> directly).

TriplanarExtension can be configured with various options that change the mapping:

TriplanarExtension { 
    blending: Some(15.0),
    local_space: false,
    ..Default::default() 
}

You can change the scale of the mapping by using the uv_transform property on the base StandardMaterial:

triplanar_material.base.uv_transform = Affine2::from_scale(Vec2::splat(uv_scale));

About

Triplanar mapping for the Bevy game engine

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published