17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 06:49:18 +02:00

Commit Graph

  • bc4df5567f Cull and draw the sleepers of tracks on the GPU with the instances build-feat-gl46-migration feat/gl46-migration Hirek193 2026-10-18 03:18:26 +02:00
  • f4b516eeb8 Cull shadow and reflection passes on the GPU Hirek193 2026-10-18 01:46:45 +02:00
  • 494304903f Draw the instances from the GPU with multi draws, the model block of each draw read by its number Hirek193 2026-10-18 00:47:05 +02:00
  • 7221c153dd Let eu07.ini scale how much the moon lights the scenery at night (gfx.moonlight) Hirek193 2026-10-17 23:10:01 +02:00
  • 41cc966103 Show the moon by day as bright as its sunlit surface, and where the sun and the moon are in the sky window Hirek193 2026-10-17 22:59:23 +02:00
  • 435110cef9 Place the sun and the moon where they are and light the night by the phase of the moon Hirek193 2026-10-17 22:47:24 +02:00
  • 5a5c67aaaf Let the instances drawn from the GPU hide one another, in two phases Hirek193 2026-10-17 21:50:23 +02:00
  • 918c056b83 Merge branch 'master' into feat/gl46-migration Hirek193 2026-10-17 20:57:15 +02:00
  • 802e356c91 Curve the bases of the clouds up towards their edges and start every billow at a height of its own Hirek193 2026-10-17 20:03:26 +02:00
  • 0dae1f0b9f Give the fog volume a slice of the fog without its clouds for the sky Hirek193 2026-10-17 19:56:35 +02:00
  • 1730f400ad Let the base and the top of every cloud stand a little off those of its layer Hirek193 2026-10-17 19:43:18 +02:00
  • df48637718 Switch the fog over the sky to the fog without the clouds as soon as the volume holds any cloud Hirek193 2026-10-17 19:31:45 +02:00
  • 56889679d9 Keep the clouds of the fog volume off the sky, where the ray march draws them already Hirek193 2026-10-17 19:24:36 +02:00
  • 1eeb5013cb Light the volumetric clouds by the sun three times as brightly Hirek193 2026-10-17 19:03:46 +02:00
  • 1152791e8c Space the steps towards the sun of the clouds geometrically and follow more orders of scattering Hirek193 2026-10-17 19:01:39 +02:00
  • e1900a9cd3 Leave the finest octaves out of the cloud coverage noise so the sides of the clouds get no upright grooves Hirek193 2026-10-17 18:41:15 +02:00
  • dd89aa5396 Fray the edges of the volumetric clouds with a finer noise and let their billows shade one another Hirek193 2026-10-17 17:57:25 +02:00
  • 22bf015939 Shade the volumetric clouds by the cloud over each point, not by the density at it Hirek193 2026-10-17 17:24:51 +02:00
  • db220a1a98 fix: automatic coupler crashes, horns, compressor start delay, radio and cab lever sounds build-fix-automatic-coupler-crash fix/automatic-coupler-crash jerrrrycho 2026-10-17 14:41:59 +02:00
  • 00934a17ed fix(physics): automatic couplers don't catch above the safe collision speed (#86) build-fix-tracker-batch jerrrrycho 2026-10-17 13:49:05 +02:00
  • b07e28adcb fix: single horn lever tones, skid of a stopped vehicle, destination signs after the timetable fix/tracker-batch jerrrrycho 2026-10-17 13:27:08 +02:00
  • 27e5c07837 Add screen-space contact shadows for the sun, lamps and headlights Hirek193 2026-10-17 03:11:47 +02:00
  • c4da5c9867 Give the prefiltered environment map a texture unit of its own Hirek193 2026-10-17 02:16:58 +02:00
  • 97112b143b Draw the depth of the whole scene before its colour Hirek193 2026-10-17 02:15:50 +02:00
  • f352718e4a Stream model data through persistently mapped buffers Hirek193 2026-10-17 01:24:33 +02:00
  • 8dd80c4d2e Even out the fog cells with their neighbours and stagger the points next to lamps Hirek193 2026-10-17 00:37:58 +02:00
  • d07204db5c Take the light of a lamp in the fog along four rays in the cells next to it Hirek193 2026-10-17 00:31:59 +02:00
  • f1c12ca651 Spread the light of a lamp in the fog over the size of a cell next to the lamp Hirek193 2026-10-17 00:27:28 +02:00
  • e31a49f917 Sample the fog cells across their whole size and take their lamps from fixed clusters Hirek193 2026-10-17 00:22:29 +02:00
  • e8dbaf70a9 Sample the fog cells in their middle across the view and dither the output Hirek193 2026-10-17 00:11:27 +02:00
  • aa522d7376 Integrate the light of lamps across the fog cells instead of one point sample Hirek193 2026-10-16 23:52:17 +02:00
  • 0662df23a7 Copy the Python runtime next to the executable only when the Python install has changed Hirek193 2026-10-16 23:37:27 +02:00
  • 6ee628aaa5 Steady the volumetric fog and add a switch for the old headlight beams Hirek193 2026-10-16 23:23:51 +02:00
  • 8b929fc1da Give the volumetric clouds lumps, sky and ground light and a fog colour by the angle from the sun Hirek193 2026-10-16 22:25:11 +02:00
  • 2be85410ce Draw volumetric clouds, their shadows, a volumetric fog and catalogue stars from a new weather system in the GL 4.6 renderer Hirek193 2026-10-16 21:44:47 +02:00
  • c7f9796387 fix(ai): release horn when human driver takes over from AI (#210) master build-master jerrrrycho 2026-10-16 14:44:30 +02:00
  • d509775269 Cast shadows of vehicle headlights from the scene in their beam in the GL 4.6 renderer Hirek193 2026-10-16 14:13:36 +02:00
  • 7727748b76 fix(ai): keep the light selector lookup within its table, Sonar findings of the handover build-fix-ai-horn-takeover fix/ai-horn-takeover jerrrrycho 2026-10-15 21:28:20 +02:00
  • 466cb5339e Draw instances from the GPU culling with indirect draws, occlusion culling and a depth prepass Hirek193 2026-10-16 12:54:52 +02:00
  • 2f0a06b98e Cast shadows of scenery lamps from the scenery, nearby vehicles and the cab in the GL 4.6 renderer Hirek193 2026-10-16 11:32:45 +02:00
  • 06d7b9e9f0 Cast shadows of the cab lamp from the cab in the GL 4.6 renderer Hirek193 2026-10-16 02:43:27 +02:00
  • 4d3a401aae Cull and assign LOD to instances in a compute pass Hirek193 2026-10-16 01:08:44 +02:00
  • 9277c28805 Cull instances by compact records and draw them from a shader storage buffer Hirek193 2026-10-16 00:37:54 +02:00
  • fd98d4eea5 Light the scene with lamps of models, vehicle compartments and the cab lamp in the GL 4.6 renderer Hirek193 2026-10-16 00:07:08 +02:00
  • 5f365a00c5 Fix the screen space ambient occlusion and add ground truth ambient occlusion to the GL 4.6 renderer Hirek193 2026-10-15 23:03:50 +02:00
  • ce725c3d62 Add sky light, physical atmosphere, auto exposure and bloom to the GL 4.6 renderer Hirek193 2026-10-15 22:16:41 +02:00
  • ea0dba6dae Add shader validator CI Hirek193 2026-10-15 20:26:35 +02:00
  • 2e02cf8137 Lay the light cluster tiles over the window when the post processing is skippe; Bind the light cluster buffers when a viewport is created Hirek193 2026-10-15 20:26:23 +02:00
  • 624c7f4f0b Do not cap the reach of a light at 1 km in the cluster culling Hirek193 2026-10-15 20:25:51 +02:00
  • 54990f41a6 fix(ai): release what the AI was holding when the player takes over jerrrrycho 2026-10-15 19:39:35 +02:00
  • f47172f34d Migration cleanup and renderer documentation Hirek193 2026-10-15 19:05:35 +02:00
  • b400255dae Test/physics unit tests (#213) jerrrrycho 2026-10-15 17:56:41 +02:00
  • c77151979a Bind an empty shadow map instead of unbinding the shadow map unit Hirek193 2026-10-15 17:11:31 +02:00
  • 9f2ae071a6 Use clustered light lists in forward shading Hirek193 2026-10-15 16:16:53 +02:00
  • 6aa6e505e8 Cull lights into clusters in a compute pass Hirek193 2026-10-15 15:21:21 +02:00
  • f85cf5fe52 Build view-space light cluster grid in a compute pass Hirek193 2026-10-15 14:16:55 +02:00
  • c0f45184b8 Move light data from UBO to std430 SSBO Hirek193 2026-10-15 13:20:59 +02:00
  • 677a96c293 Add SSBO and compute shader support to gl wrappers Hirek193 2026-10-15 12:13:44 +02:00
  • 39d5df2ef3 Remove unused f_light_pos vertex shader output Hirek193 2026-10-15 10:35:18 +02:00
  • 4f72fd650c Remove glLineWidth probe and wide line calls that never take effect on core contexts Hirek193 2026-10-15 10:35:08 +02:00
  • 533746324b test: SonarCloud issues of the unit tests build-test-physics-unit-tests test/physics-unit-tests jerrrrycho 2026-10-15 06:30:31 +02:00
  • 9186819363 Validate shaders against GLSL 4.60 including compute stage Hirek193 2026-10-15 02:20:22 +02:00
  • 9e64244ebd Require OpenGL 4.6 core context and regenerate glad Hirek193 2026-10-15 01:39:32 +02:00
  • 61bfc6eb1a Move modern OpenGL renderer to rendering/opengl46 and rename classes Hirek193 2026-10-15 01:12:05 +02:00
  • 0e10ce4d0b Remove OpenGL ES / ANGLE render path Hirek193 2026-10-15 00:53:28 +02:00
  • 3d3eef2e1c Remove legacy OpenGL 2.1 renderer Hirek193 2026-10-15 00:06:31 +02:00
  • adf1b1736f fix(tools): metalness is checked on a nearest sample of the B channel instead of a box-averaged one, so thin metal strips with B only 0 or 255 are no longer reported as half metal because downscaling averages their edges with the paint around them build-fix-cab-lighting fix/cab-lighting maj00r 2026-10-14 23:42:43 +02:00
  • 7b77e4cef8 test: test vehicle definitions load with GCC and Clang jerrrrycho 2026-10-14 22:53:22 +02:00
  • a2d5e36d51 Merge remote-tracking branch 'origin/feat/bc7-dds-support' into fix/cab-lighting maj00r 2026-10-14 22:48:11 +02:00
  • e448489853 fix(tools): a skin material without a suffix is reported as unused when its ,1 ,2 versions exist, since the game loads those instead, so the 64 missing textures of the ELF were never missing in the game; param_specular in a shader without a sun highlight changes nothing and is only reported as information maj00r 2026-10-14 22:39:06 +02:00
  • 94c3eacb72 fix(tools): water keeps its large param_specular as the glint of the sun on its fixed mirror and is only reported as information; the norm says which files are checked, that textures without a material go on their diffuse alone, and that diffuse, specgloss and normal maps all become BC7 made from the TGA maj00r 2026-10-14 22:28:52 +02:00
  • a717c8a0c1 docs(tools): the material norm is written for the shaders of the branch it lives on, with ambient occlusion, parallax mapping and the lighting fixes, and names master as the one that still lights the old way maj00r 2026-10-14 22:11:34 +02:00
  • e27e9a3639 docs(tools): a dark metal is reported as one the shaders light as a painted surface, with the choice of a brighter diffuse for a real metal or B = 0 for paint, a metal reflects at least at half strength whatever its normal map alpha, and the source textures are TGA from which BC7 replaces the DDS maj00r 2026-10-14 22:10:55 +02:00
  • 47716b50ff docs(tools): the material norm names the shaders it is written for, fix/cab-lighting from 2ecf589d with the sun highlight weighted by its cosine, headlights with their own highlight and param_glossiness as a Phong exponent, and how master differs; the validator reads both versions from the shader sources, its options, output levels and requirements are documented with the order in which to fix a vehicle maj00r 2026-10-14 21:44:34 +02:00
  • 0436ea2f2b feat(tools): a material norm for the current shaders and a validator that checks .mat files and their textures against it, reading what each shader does with specgloss, glossiness, specular and reflection from the shader sources, so dielectrics with sun highlights far above the 0.06 of a real F0, mirror-like glossiness, half-metal or speckled metalness, metals with a dark albedo or no reflections, headlight-boosting param_specular, noisy maps, unknown shaders and missing textures are reported per material maj00r 2026-10-14 20:57:16 +02:00
  • 101ab5be5f fix(shaders): a surface marked as metal in specgloss but with an albedo darker than any real metal is lit as the painted or dirty dielectric it stands for, with its diffuse back and its highlight held to 0.06, instead of going black without a diffuse term, and a metal reflects its surroundings at least at half strength whatever the alpha of its normal map says, since its reflection is all of its colour; materials without specgloss stay as they were maj00r 2026-10-14 22:09:13 +02:00
  • 8df87d42cf fix(shaders): the highlight of the sun is multiplied by the cosine of its light, so surfaces no longer glare milky white under a low sun; headlights light a surface with 1.35 of its diffuse colour and add a GGX highlight of their own scaled by specgloss and param_specular instead of multiplying the whole light by one plus param_specular; normalmap, parallax, detail, shadowless, sunless and default_detail materials read param_glossiness as a Phong exponent, roughness = (2 / (n + 2))^1/4, instead of 1 - 1/n or a fixed mirror maj00r 2026-10-14 21:42:33 +02:00
  • 806dde70bf feat(render): ambient occlusion with bent normals darkens only the light of the surroundings instead of the whole image, so the sun and headlights keep their full strength; the occlusion and the bent normal of the previous frame are reprojected into the lighting of the scene, with the motion of the camera and of every vehicle and cab taken into account and with depth checks against disocclusion, the ambient light follows how much of the sky the bent normal sees, and reflections of the environment are occluded where the cone of visible directions around the bent normal cuts off the reflected lobe, only where the occlusion is clear enough that open flat panels and windows keep their grazing reflections maj00r 2026-10-14 18:02:35 +02:00
  • a24f9fae3f feat(render): ground truth ambient occlusion darkens creases, recesses and the space under desks and frames, computed at half resolution from the reversed depth buffer with a depth-aware blur and multiplied into the image before motion blur, so it works with the default settings; thin parts in front of a surface, such as a steering wheel, shade it only from close by, and gfx.postfx.gtao.enabled, radius, intensity, directions and steps set it from the ini maj00r 2026-10-14 16:56:38 +02:00
  • 000b8656cc fix(render): dark parts of a cab and of the running gear are no longer crushed to black, as the AgX look raises its contrast power from 1.0 in the shadows up to 1.6 only from the middle tones on, which keeps the bright tones, the outside view and the night as they were but leaves black knobs, levers and lettering visible on a black desk; the light of a cab can be scaled with gfx.cab.ambient, 1.0 by default maj00r 2026-10-14 16:55:43 +02:00
  • 60b0a335b0 test: stub basic_node::radius_() for GCC and Clang jerrrrycho 2026-10-14 21:58:30 +02:00
  • 3365d42c3a test: unit tests of the simulation core, run as part of the build jerrrrycho 2026-10-14 16:36:40 +02:00
  • be3af9a34d Add dds BC7 algorithm build-feat-bc7-dds-support feat/bc7-dds-support Hirek193 2026-10-14 20:15:45 +02:00
  • 6c7aea19c2 build: the simulation core as a library the game links jerrrrycho 2026-10-14 19:22:09 +02:00
  • 02bb352caf refactor(physics): read vehicle definitions from text as well as files jerrrrycho 2026-10-14 16:36:39 +02:00
  • fac4eb0547 build: doctest 2.4.11 in ref/ jerrrrycho 2026-10-14 15:20:46 +02:00
  • 20cf81b362 fix(shaders): parallax mapping reads its depth from a mip about four texels per pixel coarser, filtered bicubically where the hit is refined, so the relief no longer breaks into stalactites and the edges of stones no longer step along the texel grid of the compressed depth; it takes 16 to 64 layers by the angle of view and six steps of refinement, casts the shadows of the relief from the sun over the sun light and darkens the hollows deeper than the mean depth of the texture while lightening the tops, so the mean brightness of a surface stays the same maj00r 2026-10-14 15:02:14 +02:00
  • 3d6a465570 fix(shaders): parallax mapping of the opengl33 materials is shared by the four parallax shaders in parallax.glsl and samples its depth with the gradients of the surface instead of letting a loop of varying length pick the mip level, picks the number of layers by the angle of view alone and refines the hit with a binary search instead of one linear step, so stones near the camera no longer show combs of layer slices; it fades out between 60 and 100 m instead of stopping at a hard line and fades out at grazing angles, and the simple offset without extra effects no longer divides by an unbounded cosine of the view maj00r 2026-10-14 14:23:52 +02:00
  • d93d51894d feat(track): frogs, crossings, guard rails with their castings and spacers, check rails and shared running surfaces for every rail profile again, not only for tracks without a profile, default, s60, uic60 and s39; grooved profiles keep their shared grooves without check rails build-feat-rail-crossings feat/rail-crossings maj00r 2026-10-14 14:01:15 +02:00
  • c4772823b3 feat(track): a check rail is held to its running rail by spacer blocks every 0.5 m along its straight part, laid in the same way as the spacers of a guard rail at a wide crossing, below the head from the web of the running rail to the face of the check rail, so the flangeway stays open above them; a check rail replaced by a wing rail gets none; the spacing of spacers and castings is shared by guard rails and check rails maj00r 2026-10-14 14:01:08 +02:00
  • 55abd24ead fix(track): at a crossing at nearly a right angle the tip of a guard rail under the wheels of the other track takes their rolling surface on its top, bright under a used track and rusty under an unused one, with the sides staying matte, instead of the whole tip going matte because the plain span of the tread was laid as a band between two lines it does not have; plain spans of treads are painted in the debug colour of EU07_EDITOR_TREADS too maj00r 2026-10-14 13:09:44 +02:00
  • 1fa7dee5d6 fix(track): at a crossing at a wide angle the floor of the flangeway between a running rail and its guard rail is laid only where real crossings have it, as the cast floor of each corner up to 0.3 m past the rail of the other track and as separate spacer blocks every 0.5 m along the rest of the guard, and the floor takes its texture across its width at the scale of the head instead of one stretched column; the wheels of the other track roll over a guard rail across their whole tread instead of only over the head of their rail; and when the tracks cross at nearly a right angle the treads of the other track are laid as plain spans along the rail instead of lines running almost straight across it, which left fins standing up at every edge of a tread maj00r 2026-10-14 12:43:36 +02:00
  • c177581d8f fix(track): a point of a rail profile clamped to a cut edge of a lofted span is never moved past its own place nor raised past its own height, and the edges at a station are read from the side of the span being laid, so the rings at a step of an edge or at a bent mitred end no longer stretch points out of the profile and stand them up to 18 mm above the head as thin fins at the corners of wide crossings, and points of other cut rails sit exactly on the profile instead of up to a millimetre off it maj00r 2026-10-14 12:25:57 +02:00
  • 1ef465264c First implementation of graph vehicles build-feat-vhg feat/vhg Hirek193 2026-10-14 12:20:49 +02:00
  • 434923dae6 fix(track): the part of a guard rail under the running rail of the other track at a wide crossing takes the rail material of the other track, whose wheels alone roll there, instead of the brighter of the two, so a guard of a used track under an unused rail stays rusty, and it ends at the head of that rail without a tinted fade, since the guard itself is never rolled on maj00r 2026-10-14 11:41:35 +02:00
  • 2a5dda1509 feat(track): at a crossing at a wide angle the tread of the other track is laid where its wheels roll over the mitred corners: the part of a guard rail under the running rail of the other track becomes a running surface in the shared tread material instead of matte, and running rails of different materials share the tread over the rolled band of the other track instead of over a square span; wide_tread draws the edges of the band from the crossing itself, since the gauge lines meet in one point at right angles, and a tread gives its own fade, widened for bands lying across the rail; treaded keeps the matte parts of a guard rail matte, lay_treads splits guard rails at their treads, and a piece of no triangles is not inserted maj00r 2026-10-14 11:25:34 +02:00
  • 572ee569dc feat(track): at a crossing at a wide angle every head of one track meets every head of the other in a mitre from the corner of their flangeways to the far corner of the heads, the way the corners of a cast diamond look, so the running rails and guard rails of both tracks form closed corners and only the flangeways stay open, instead of the rails of one track going through and the other ones glued to their sides; corner_cut gives the mitres, as bends of the running rails and as miters of the guard rails; the fit of a loft end to the profile of another rail and the field and gauge outlines of the rail profile are gone with the gluing maj00r 2026-10-14 11:08:02 +02:00
  • f27ed682c0 feat(track): the guard rails of a crossing at a wide angle reach a metre past the rails of the other track instead of 0.3 m and open their flangeway over 0.6 m at the ends, the way the guard arms of the corners of a diamond run out on real crossings, the reach and the flare are the constants guard_reach and guard_flare shared by the plan and the layer maj00r 2026-10-14 10:53:28 +02:00
  • 701d82d1bd refactor(track): the cap of a lofted rail end takes its texture from cap_texture and its triangles from ear_clip instead of computing both inside cap_loft maj00r 2026-10-14 09:57:04 +02:00
  • 74ae36e33a refactor(track): the plates, fillers and check rails of a rail drawing are made from one box_profile and one helper for both sides, and the colour of a tread is sampled by sample_dds and sample_image into one colour_mean, a block of a DXT texture decoded by add_dxt_block, instead of one function maj00r 2026-10-14 09:55:24 +02:00