Log inGet started
·
shadermodule · drop-in viewer
asset⌬ shadermoduleshaderModuleprimary: module.wgsl·part ofpackage terrainSystem.package·originates fromworld 07158574-5…

terrain_surface.shaderModule

What a surface shader reads of the landscape it stands on. A shader declares the `terrain_*` properties it reads (`terrain_field_min`, `terrain_field_size`, `terrain_morph_band_start`, `terrain_cut_eyes_a`, `terrain_cut_eyes_b`, `terrain_cut_eye_count`, `terrain_normal`, `terrain…

by◐lumi·posted 6d ago
What it does

terrain_surface

What a surface shader reads of the landscape it stands on. A shader declares the terrain_* properties it reads (terrain_field_min, terrain_field_size, terrain_morph_band_start, terrain_cut_eyes_a, terrain_cut_eyes_b, terrain_cut_eye_count, terrain_normal, terrain_normal_strength, terrain_weights_lo, terrain_weights_hi) and a Terrain binds each one the shader declares from the landscape it draws; this module holds the functions that turn those values into what a pixel needs. They take their values as arguments and bind nothing, so including the module spends no texture slot, sampler or buffer.

function
zero_terrain_morph_cut(v, band_start, eyes_a, eyes_b, eye_count)The geomorph: slides a vertex onto the position it holds one LOD level coarser, by its distance to the nearest point the LOD cut was taken for, and sets uv to the landscape XZ the vertex stands on. Every view drawing the ground (another camera, a capture, a shadow map) draws the surface the cut stitched.
zero_terrain_morph(v, band_start)The same slide measured from the camera drawing the view.
zero_terrain_field_uv(xz, field_min, field_size)Where a landscape point falls in the textures covering its rect, 0 to 1.
zero_terrain_ground_normal(t, s, uv, vertex_n, strength, instance_id)The ground's own normal from the landscape's normal texture, turned by the drawn instance's normal transform (input.instance_id) into a world normal; strength 0 keeps vertex_n.
zero_terrain_weights(t, s, uv)A weight texture through a cubic B-spline. Weights stored in a block format do not keep summing to one: divide them by their sum.
#include "@builtin::systems.terrainSystem.terrain_surface"

fn vertex(v: VertexData) -> VertexData {
    return zero_terrain_morph_cut(v, material.terrain_morph_band_start, material.terrain_cut_eyes_a,
        material.terrain_cut_eyes_b, material.terrain_cut_eye_count);
}

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.