mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-28 00:59:29 +01:00
Curvature, Ambient Occlusion, Position and the new World Space Normals take the reference app's section controls under the global ones: invert, blur (occlusion and normals), balance (a power curve on position and normals, linear on occlusion), contrast and brightness, and for position and normals three axes, each inverted, blended over the others with its own mode and weighted. Position reads the baked position map, else the mesh's bounds; World Space Normals the baked world space normal, else the mesh's normal; both can read an image input instead. Generators saved before keep their level, softness and noise and render as before; a section control moves one onto the new controls, and level, softness, noise or direction move it back. The curvature section names its detail sizes Sharp to Huge and its modes Dual and Unprocessed; the global invert is a False/True button.
15 lines
473 B
Rust
15 lines
473 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use super::axis_blend::AxisBlend;
|
|
|
|
/// One axis of a World Space Normals or Position generator: its channel, inverted or not, blended over the axes before it
|
|
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct AxisLayer {
|
|
/// The axis read from its far side
|
|
pub invert: bool,
|
|
pub blend: AxisBlend,
|
|
/// How much of the blend shows (0..1)
|
|
pub weight: f32,
|
|
}
|