v0.8.0: map roads/sidewalks, per-vertex depth bias, retail camera controls
- ra3.map: capture the object RoadType; ra3.models pairs the map's Start/End road objects and drapes a flat textured ribbon along each segment (tessellated to the relief). - Ground decals (roads/sidewalks) get a per-vertex screen-space depth offset (scene::vertex.bias) applied in the object shader and the software rasteriser, so they no longer z-fight or clip into the terrain at top-down angles. - Tactical view aligned with retail (SAGE LookAtTranslator): middle-drag orbits yaw/pitch, a middle click resets angle/pitch/zoom, arrow keys pan, wheel zooms within the retail zoom range; WASD pan removed and left-drag no longer rotates. - ui_event gains middle/right/released buttons; Vulkan + SDL map them. - docs: roads, depth bias and camera controls.
This commit is contained in:
+2
-1
@@ -13,6 +13,7 @@ layout(location = 0) in vec3 in_pos;
|
||||
layout(location = 1) in vec3 in_normal;
|
||||
layout(location = 2) in vec2 in_uv;
|
||||
layout(location = 3) in float in_layer;
|
||||
layout(location = 4) in float in_bias;
|
||||
|
||||
layout(push_constant) uniform Push {
|
||||
vec4 cam_pos; // xyz = eye position
|
||||
@@ -36,7 +37,7 @@ void main() {
|
||||
float c = dot(r, pc.up.xyz);
|
||||
float th = pc.right.w;
|
||||
float th_aspect = pc.up.w;
|
||||
float depth = clamp((a - NEAR) / (FAR - NEAR), 0.0, 1.0);
|
||||
float depth = clamp((a - in_bias - NEAR) / (FAR - NEAR), 0.0, 1.0);
|
||||
gl_Position = vec4(b / th_aspect, -c / th, depth * a, a);
|
||||
out_uv = in_uv;
|
||||
out_normal = in_normal;
|
||||
|
||||
Reference in New Issue
Block a user