17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 18:09:04 +01:00
Commit Graph

3822 Commits

Author SHA1 Message Date
0bc29af650 Merge remote-tracking branch 'origin/feat/switch-fastenings' into feat/renderers-cleanup build-feat-gl46-migration 2026-10-31 17:13:45 +01:00
75cb88f275 Map BC7 (BPTC) dds textures to native VK_FORMAT_BC7 in the Vulkan renderer 2026-10-31 16:46:35 +01:00
7078edf138 fix(vulkan): read back the editor cursor depth and correct the depth pass bias 2026-10-30 01:33:41 +01:00
765153ad91 Merge remote-tracking branch 'origin/feat/switch-blades' into feat/renderers-cleanup 2026-10-29 23:55:04 +01:00
maj00r
80379b991c feat(editor): the work of the editor sessions not committed yet, as it stands: a curve traced on from the end of the diverging track of a switch goes on at its radius with no transition in, or from a straight right at the switch (alignment start_held, fit_going_on), the plan taking an end adjoining R 10 km or more for a straight; the switches and slips laid into curves, slid along them and laid alone on one straight (frame_path, switch slide); the route plan reading curves going on from the tracks adjoining, the kept designs taken or forgotten; the orthophoto and terrain model settings, downloads and layers, the tracks onto the terrain; the curvature of a path in the plan (bezier::plan_curvature); the Polish texts of all of it. Not built as committed 2026-10-29 22:19:06 +01:00
maj00r
2eda26b94c feat(editor): a warning of the sudden change of the cant deficiency right behind a switch, as ST-T1-A6 sees it (9.11): a track laid on from the end of the diverging track of a switch, or into it, is checked by switch_curve::check_exit from the end of the curve of the switch, a straight frog's length before its end, to the first sudden change of the curvature of the track laid. Two of them nearer than the intermediate element of table 9.16 (6 m in track connections up to 60 km/h) are taken together, else each one alone, against table 9.15 (130 mm up to 60 km/h), at the speed of the laying or of the diverging track of the switch, the lower one. The view tells of it by the cursor while the track is extended or laid, the status once it's laid; a transition out of the frog straight makes no sudden change. Selftest: from a Rz S42-190-1:7,5 with a frog straight of 1.66 m a curve the other way of R 200 m warned of 194 mm together, the same way none; from a Rz 60E1-190-1:9 with 6.09 m a curve the other way of R 200 m none, of R 120 m warned of 157 mm 2026-10-29 22:16:19 +01:00
a99882278a Fix the build after merging master: drop the GLES check from bptc_supported() 2026-10-29 20:46:11 +01:00
55372571b3 Merge branch 'master' into feat/renderers-cleanup 2026-10-29 20:42:39 +01:00
96100f1155 Draw the cab probe with all the lights of the cab 2026-10-29 20:05:03 +01:00
8bd41f431d Keep the slices of the ring caches within the window the shaders index from 2026-10-29 19:21:14 +01:00
975fc1b4ea Look 4 GiB lower for the buffer of a fault address that holds nothing 2026-10-29 19:15:44 +01:00
9bc9168230 Keep the contact shadow march and the traced reflections off NaN normals 2026-10-29 19:04:57 +01:00
bcf2c14b20 Place the images of the allocator blocks in the device-lost report exactly 2026-10-29 18:57:53 +01:00
325be54b2c Name the buffer or image a Vulkan device fault hit in the device-lost report 2026-10-29 18:04:38 +01:00
91c6324965 Add the optional LightOnly of FreeSpotLight 2026-10-28 21:50:08 +01:00
8c6a47f42c Light the occupied cab with the light points of its model 2026-10-28 21:16:22 +01:00
65e104f813 Light the occupied cab with the light points of its model 2026-10-28 21:06:02 +01:00
9904eddd0d Light the cab with cablight/dashboardlight light points of the cab model 2026-10-28 20:55:45 +01:00
8f891fdc14 Report where the GPU got to when the Vulkan device is lost 2026-10-28 20:21:00 +01:00
c4e23932bf Add the optional Radius, ShadeSelf, CastShadows and SoftFalloff of FreeSpotLight and make FalloffAngle 360 a point light 2026-10-28 16:18:03 +01:00
413cebed9c Hold the sky back only around tunnels and keep the cab lit by day 2026-10-28 14:01:37 +01:00
e8a90507f0 Light the cab with the sun coming in through its windows 2026-10-28 12:19:43 +01:00
1447dcf075 Walk the shadow passes and the culled model groups on worker threads in the Vulkan renderer 2026-10-27 20:56:11 +01:00
maj00r
b0918628b4 fix(editor): a curve traced from the end of the diverging track of a switch with one point clicked goes on with the curve of the switch as far as abreast of the point, seen from its centre, and ends on it there, instead of turning into a straight where the straight to the point left it: the curve is held to where it was clicked, a point inside it as well. Selftest: one point after P4 of a Rz 60E1-300-1:9 laid R 300 m on to 238.36 13.31 for a point at 240 8, to 243.31 14.88 for one at 240 25, the curvature at P4 going on within 0.5 % 2026-10-27 19:41:50 +01:00
maj00r
667e433af9 feat(editor): a slip is selected, slid and deleted whole: any track of it picked shows all of it selected, editor_mode::slip_of finding its switches by its record, the tracks between them and its four ends. Dragged along, the slip moves along its first track with the straights out to the joints of its template and its crossing track, as far as that one goes on into tracks with their ends free, the straights of its first track before it and past it lengthened and shortened, a metre of them kept; one bent into a curve isn't slid, nor one whose crossing track is joined on beyond it. Deleted, it leaves its two tracks crossing from end to end in its place, kept in the scenery as a crossing Skrz, as a switch leaves its main track; Shift+Del takes all of it, Ctrl+Z brings it back. Selftest: a Rkp laid with its crossing track slid 5 m on and 3 m back, the joints of its template with it, walked through; deleted into a crossing Skrz 1:9 walked through, back with Ctrl+Z; a Rkpd at a crossing of straights with free ends slid 2 m, deleted into a crossing 2026-10-27 19:40:56 +01:00
maj00r
7b11db566e feat(editor): a slip Rkp or Rkpd bent into a curve of a side track: dragged on a curve with a slip armed it's laid out on the tangent to the curve where it was pressed and bent onto the curve as a switch laid into one is, editor_mode::frame_path laying a path of a template into the curve for both, its crossing track coming along with its ends free, ahead to the side of the drag, the slip curve of a single slip on that side, the straights of both tracks out to the joints of its template. A crossing goes only where two straights cross, a curve as sharp as the slip curves is refused. As it's dragged the view tells the radii of its tracks and slip curves, its cant and what switch_curve::check_slip says, the 11.4 pkt 4b of ST-T1-A6 among it; laid, the status the same. A slip bent into a curve isn't replaced by one laid out of straights. Selftests switchcurve, bladetips: a Rkpd 49E1-190-1:9 in R 800 m with its slip curves of R 154 and 249 m and the warnings of 11.4 pkt 4b and table 9.2, one of R 300 m in R 800 m with no warning of table 9.2, a Rkp in R 4000 m, the blades from 1.248 m on all of them; refused in R 150 m, a Skrz refused 2026-10-27 19:39:38 +01:00
maj00r
7f6a8736ca feat(editor): a slip goes only where the straights cross at the skos of its template: a Rkpd 1:9 was laid at a crossing of 1:7 or 1:14 as well, shaped for the angle of the tracks there into no slip of the catalogue. The straights crossing at a skos more than 0.14 deg off it, half of what keeps 1:9.51 and 1:10 apart, are refused with the skos they cross at and the slip of the same kind made for it, of the same rail and radius first, or none; a double slip replaced by one of another skos likewise. The panel and the hints say the slip goes at its skos. Selftest: a Rkpd 49E1-190-1:9 laid at 1:9 and 1:9.08, refused at 1:7 with no template for it and at 1:9.51 with Rkpd S42-230-1:9,51 fitting 2026-10-27 19:35:01 +01:00
maj00r
f8a12107a0 feat(editor): a switch laid with no track there, and no switch laid by a click: a press on the ground with a switch armed lays the switch there, its start where it was pressed, the direction of its main track taken from the drag once it's 4 m long and held, the drag sideways then giving the side of the diverging track, back by the start the direction free again; pressed by a free end within 5 m it goes on from that end in its direction and grade, joined to it. Its ends are left free to lay on from, styled after the track it goes on from or as the lay tool lays its tracks (editor_track::create_switch with a path_style). A press let go within 10 pixels places no switch, a slip at a crossing included, which was laid at once on the press: it's laid once dragged, its straights shown meanwhile. The hints and the panel tell of both. Selftest switchfree: Rz 60E1-300-1:9 on the ground with its four ends free, from the free end of a straight joined and walked through; a click on a straight laid none, a drag laid z1 2026-10-27 19:33:23 +01:00
maj00r
1340017be3 feat(editor): a slip keeps in the scenery the radius of the main track it's bent with, as a switch does, the lists of the switches telling it as Rg: switch_store::main_radius_of gives it from the first path of a switch, classify takes it from there too; a slip laid on straights keeps 0 2026-10-27 19:23:31 +01:00
maj00r
89b6ca07af feat(editor): the norms of a slip switch bent into a curve, as ST-T1-A6 sees it: switch_curve::check_slip tells that a slip is bent in a side track only, never in the running nor the main tracks (11.4 pkt 4b), that a track through it is to keep its curvature of one sign (9.7 pkt 12), that a slip curve bent the way the curve turns gets sharper and no sharper than the 180 m of a side track (table 9.2), and the cant as over a bent switch, with none recommended in a side track (9.3 pkt 5). The cant over a switch is checked by one function for both. Unit tests: a Rkpd of R 190 m bent into R 800 m has its slip curves of R 154 m, below the side track, and 249 m; into R 4000 m of R 181 m, within it; on a straight it's no bent one 2026-10-27 19:23:24 +01:00
maj00r
c353435cc1 fix(track): a path with its radius given is a curve however gently it bends, it isn't straightened as it's loaded: a path whose control vectors lay within 2 cm of where a straight has them was laid as a straight, a short one bent with a gentle curve too, as the 9.44 m of the main track of a switch of a slip bent into a curve of R 800 m, whose diverging track kept its curve: the two tracks of the switch 14 mm apart where they're one, the blades of a side of the slip shaped from 0.354 m, of the other side not at all. Plain tracks, switches and the pieces of their paths alike; one with no radius, as a straight given its control vectors along it, is straightened as before. Selftest bladetips: a Rkpd 49E1-190-1:9 bent into R 800 m and R 4000 m with the blades of all four switches from 1.248 m, as on straights 2026-10-27 19:21:50 +01:00
maj00r
6533914024 fix(track): the blades of a slip laid in the editor are shaped from their templates as the ones of a switch are, from the tip where their planed nose ends, so they start where the view marks the tips of the blades and the drive stands, not at the joint before them: the crossings of the diamond the blades end short of were looked for only among the tracks with their rails cut, which the simulator never cuts, so the slips kept the blades laid from the start of the switch. They're found now among the tracks with their rails whole too, for the blades of a slip only. Selftest bladetips: the blades of the four switches of an Rkpd 49E1-190-1:9 from 1.248 m to 7.55 m, as the drives; Rz 60E1-300-1:9 unchanged, 1.5 to 12.69 m 2026-10-27 19:21:40 +01:00
c44b243698 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 17:11:06 +01:00
2961ce1445 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 16:08:35 +01:00
2a876befb0 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 16:02:36 +01:00
9dde5b0e5e Take the ambient occlusion into the lighting and add a probe of the cab 2026-10-27 13:23:52 +01:00
ac0b4e5f15 Add a white balance to the tonemapping 2026-10-27 01:40:19 +01:00
82d3842495 Load catenary node entries from included scenery files reliably 2026-10-27 01:04:22 +01:00
maj00r
476909581f fix(track): two switches laid right after one another, with no plain track between them, are joined, the vehicles no longer derail there: only the plain tracks looked for their neighbours, so the end of the main track of one switch at the start of the next one was joined to nothing, and an axle getting to it ran onto a track made to derail it. TTrack::join_switches joins the free ends of a switch to the ends of other switches in the same points, on both sides, with the codes of the ends the axles go on by: the end of either path of one at the start of the other, two facing at their starts, two meeting at their ends; done once the plain tracks are joined as the scenery is loaded, the old sceneries too, and as the editor joins a switch laid. Selftest pathwalk walks the tracks as an axle does: P2 to P1, P4 to P1, start to start and end to end go through either way 2026-10-26 20:40:51 +01:00
maj00r
bfb045f2ad fix(editor): traced in the mode of a curve from the end of the diverging track of a switch, the line goes on with the curve of the switch: with a single point clicked the ghost was a straight right from P4, laid so with Enter, and points clicked on the photo a little off the curve gave way to the line from a straight there. One point after P4 lays the curve of the switch going on as far as the straight from it heads for the point; a curve going on from P4 which turns its way stays however loosely the points keep to it, the line from a straight taken only where they turn the other way. Selftest: one point after P4 laid R 300.9 going on, the curvature unbroken at the joint, where it was a straight before 2026-10-26 20:40:44 +01:00
maj00r
ef592e6479 feat(editor): the drive of a switch stands by the tips of its blades, not at the joint before them, and goes with the switch deleted. A drive placed, changed or carried along with its switch is set where the blades begin, as they're shaped or where the diverging track is broken at the tip of a planed blade, along the main track there, its heading and its tilt taken there; the drives the earlier versions of the editor set at the joints are moved there once, as the scenery is opened and the templates are known, with no step of the undo history, to be saved with it. Deleting a switch, a double switch or a set of tracks takes the drives of the switches along in the same step, Ctrl+Z brings them back. The joint before the blades and the tips of the blades of the switch being placed or the one selected are marked across the track in the view, so the tips seen on the photo aren't taken for the start of the switch. Selftests bladetips, drivetips; on a copy of test42 the drive of z1 went from the joint to 1.248 m, deleted with z1, back with Ctrl+Z 2026-10-26 20:40:37 +01:00
maj00r
3b43c71dbb feat(track): the blades of the switches laid in the editor shaped from their templates with the frogs still whole: the blades alone are on (track_features::blades), the rails cut at the frogs, the wing and the check rails stay off. A switch with the key frogs draws its blades from the tip where their planed nose ends to the heel, bent as they're thrown, the rail behind them from the heel on, where they were laid from the start of the switch before; on a switch of the catalogue they start at the cut tip of the tables, 1.248 m from the joint at R 190, 1.5 m at R 300. The plain track a blade of a double switch runs on into starts its rail behind the heel. The switches without the key, laid by other tools, and the ones of a double slip, whose blades end short of crossings found only with the rails cut, keep the blades they had. The paths the vehicles run on don't change 2026-10-26 20:40:28 +01:00
e19c788f30 Catenary as plain node entries in scenery files 2026-10-26 20:23:26 +01:00
d794b1e736 Catenary editor: keep catenary parts out of node editing, pick and drag anchor poles 2026-10-26 19:51:15 +01:00
maj00r
aed2cfad2c feat(editor): a track deleted cuts the design kept for its line down to the tracks left along it, in the same step of the undo history: a design keeps the stretch of its line it stands for (//$h kept <from> <to>), a track deleted in the middle parts it in two, one at an end shortens it, a design with no track left is forgotten. The geometry stays as designed, only its reach changes. A design cut down isn't taken whole by the route plan nor merged with a new one nor carried along by a switch slid, and gives no designed curve to the tracks left of a curve it cut, which are recognized as they lie: a track laid by hand into the gap is never pulled back to the old shape. The status tells of it. The //$h click lines are the editor's own now: read back with their design, and written once on save instead of staying behind and piling up. Selftests on a copy of wgr.scn: a track of a compound curve deleted in the middle, undone and redone, one at an end, all of a piece, saved and read back 2026-10-26 19:50:35 +01:00
maj00r
eb3d3eb1e0 feat(editor): in the mode of the straights the line from the end of the diverging track of a switch begins with a straight right at P4, the curvature jumping as at the start of the switch, a bend clicked getting its own curve where it was clicked; only a curve traced from P4 goes on with the curve of the switch. Dragged from a free end the shape follows the mode of laying: a straight in the one of the straights, from P4 right from its end, an arc and a straight in the one of a curve (Tab), from P4 the curve of the switch going on; the four shapes to pick under More settings and with Shift+wheel are gone, which only muddled the two ways of laying. Shift+wheel picks the way of joining over another free end. The hints, the readout by the cursor and the table of the keys say so. Selftests of P4: a straight of 100 m and of 15 m laid right from P4, bends of 8 degrees either way after a straight, dragged straight; traced and joined from P4 the curve of the switch goes on 2026-10-26 19:50:28 +01:00
maj00r
ed3d6551d8 fix(editor): a straight between two curves turning the same way, traced in the mode of a curve, is laid as a straight: points along a curve, about 200 m of straight and a curve the same way (wgr.scn) were fitted as one compound curve of eight arcs, its straight two arcs run up to R 50000 and laid at R 10360 once the curve was scaled between its tangents. The two curves with a straight between them, fitted about as closely, weren't taken over it, and were refused anyway: the last curve rounded to the metre no longer fitted up to the last point. A compound curve with an arc more than 4 times flatter than its sharpest one gives way to curves with straights between them which keep to the points about as closely, where straights between curves may be laid; the curves fitted are settled to the metre, or as laid a hair under where that gives a warning, as the chain of a reverse curve was; the chain of curves takes curves turning the same way with straights between them too, three of them, and wins over the two curves where it keeps closer. Unit tests of the points of wgr.scn and of two and three curves turning one way with straights between them 2026-10-26 19:50:00 +01:00
maj00r
d6df785b78 feat(editor): the download area drawn on the topo map: a polygon is the boundary of what the editor downloads, the orthophoto and the terrain model alike. Drawn from the settings of the orthophoto (Download area, Draw on the map, the top view on): a click puts a point, a point dragged moves, Shift+click removes it, Backspace takes the last one back, Enter closes the area, Esc gives up; it's kept in the scenery as //$a lines in PUWG 1992, so it stays on the ground when the origin moves. Inside it everything the settings ask for, the standard imagery, the 4K one where it's ticked and covers the place, the squares of the terrain model where the scenery has its terrain, goes to the disk cache in the background, nothing decoded nor uploaded, only while no tile around the camera waits and not while the scenery is driven, with its progress, Pause and Retry under it; outside it nothing is asked for, around the camera, along the tracks or ahead of the laying, nor shown. The workers of the orthophoto are 8, at most 3 of them on the tiles around the camera, each holding an image decoded, the rest downloading the area. The 4K tiles: an image the tile no longer wants once it comes, as a 4K one asked for before the camera moved on, isn't uploaded (the 64 MB and the mipmaps of it), nor decoded where a newer job of the tile waits; no two jobs of one tile run at once; a standard tile coming blank twice is remembered by a .blank file, not downloaded again on each return; a 4K tile is uploaded only in a frame with no other upload. Selftests orthoarea, orthostats, orthohires, orthoareapause; unit tests of the tiles a triangle, a concave polygon, a thin band and a polygon about a corner touch (geometry::squares_in, square_touches) 2026-10-26 18:58:09 +01:00
5f93c7c20d Catenary editor: save the catenary by the active layer 2026-10-26 18:56:28 +01:00
2321180051 Catenary editor: Iet-107 zigzag, span counter and step, cantilever swaps, movable anchors 2026-10-26 18:37:02 +01:00