Outline: the inverted-hull width was tuned when the look was heavier and now reads as a thick marker stroke. Cut every call site to roughly a third (characters 0.012 -> 0.004, level geometry 0.015 -> 0.005, Neon Alley's size-scaled clamp 0.02..0.05 -> 0.007..0.018) plus the shader default, so the ink line stays readable without fattening every silhouette. Third-person weapon on HumanoidModel: the gun was parented to root_pivot at a fixed (-0.15, 1.0, 0.4) — floating 40 cm off the chest while both arms posed at it from a distance. Give the rig a real right-hand node at the end of the forearm and hang the weapon there, so it travels with the arm. Its aim is re-derived from the body each frame (hand_r_pivot's global basis is copied from root_pivot), otherwise the barrel would swing around with the arm animation. The hold pose is retuned to match: right elbow tucked at the ribs with a level forearm, left arm crossing to the handguard. _seat_weapon_in_hand() slides each weapon along its own barrel axis so a plausible grip lands in the fist regardless of where the artist left the model origin. It measures with MeshInstance3D.get_aabb(), not mesh.get_aabb() — the FBX gun parts are skinned, so the Mesh resource still carries bind-pose bounds tens of metres across. Co-Authored-By: Claude Opus 4.8 <[email protected]>
18 lines
515 B
Plaintext
18 lines
515 B
Plaintext
shader_type spatial;
|
|
render_mode cull_front, unshaded;
|
|
|
|
// Inverted-hull outline. Assign as material_overlay on a GeometryInstance3D:
|
|
// the mesh renders a second time, grown along its normals with front faces
|
|
// culled, leaving a colored shell visible only at the silhouette.
|
|
|
|
uniform vec4 outline_color : source_color = vec4(0.06, 0.05, 0.09, 1.0);
|
|
uniform float outline_width : hint_range(0.0, 0.1) = 0.006;
|
|
|
|
void vertex() {
|
|
VERTEX += NORMAL * outline_width;
|
|
}
|
|
|
|
void fragment() {
|
|
ALBEDO = outline_color.rgb;
|
|
}
|