18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 05:02:45 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
pwarszawski 2dd53bc97b Make the glare of a FreeSpotLight as bright as the part of its point seen
The glare was drawn whole or not at all, depending on whether any sample
of the light point passed the depth test. The point is a few pixels
wide, so where it sits at the edge of something in front of it (the
hood of the lamp, a mast, a wire) the large glare switched on and off
as the camera moved and the signal seemed to flash.

The opengl renderer now counts the samples of the point which are seen
and, drawing the point once more without the depth test and without
colour, all of its samples. The gpu writes both counts into a small
storage buffer (GLARE_SSBO_BINDING) and billboard.frag scales the glare
by their ratio, so a partly hidden lamp gets a fainter glare instead
of a flashing one. The conditional render still leaves out the glare
of a point not seen at all. The vulkan renderer is unchanged.
2026-11-14 17:46:40 +01:00
pwarszawski ba44b0c0d5 Draw the glare of a FreeSpotLight after its point
The glare of a light point is drawn without the depth test, conditioned
on the occlusion query of the point. That query was issued only after
the glare and is kept on the TSubModel, which every instance of a model
shares, so the glare of one lamp used what the query saw for whichever
instance drew that submodel last (earlier in the frame or in the last
frame): glares showed through walls and blinked while the camera moved.

The point (with its query) is now drawn first and the glare after it,
so the conditional render of the opengl renderer uses the query of this
very point of this instance in this frame. The glare is drawn only when
the point was, which already held, as both need the viewer inside the
visibility cone. The vulkan renderer keeps using the results of the
last frame.
2026-11-14 14:30:51 +01:00
Hirek ff2ff308ed Some optimalisations 2026-11-09 20:58:02 +01:00
Hirek 0bc29af650 Merge remote-tracking branch 'origin/feat/switch-fastenings' into feat/renderers-cleanup 2026-10-31 17:13:45 +01:00
Hirek 765153ad91 Merge remote-tracking branch 'origin/feat/switch-blades' into feat/renderers-cleanup 2026-10-29 23:55:04 +01:00
Hirek 91c6324965 Add the optional LightOnly of FreeSpotLight 2026-10-28 21:50:08 +01:00
Hirek 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
Hirek e8a90507f0 Light the cab with the sun coming in through its windows 2026-10-28 12:19:43 +01:00
Hirek 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
Hirek 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
Hirek 9dde5b0e5e Take the ambient occlusion into the lighting and add a probe of the cab 2026-10-27 13:23:52 +01:00
Hirek 550d47e97c Merge remote-tracking branch 'jano211/siec-radio' into feat/renderers-cleanup 2026-10-26 16:36:36 +01:00
Hirek 08f4f6ed60 Vulkan ray tracing: include tracks and roads, build triangle strips and fans 2026-10-25 15:35:26 +01:00
Hirek f20b1a3071 Replace cubemap scenery reflections with SSR, add Vulkan ray traced reflections 2026-10-25 13:54:49 +01:00
Hirek 252b9373ea Add gfx.antialiasing (off, msaax2/x4/x8, taa) with temporal anti-aliasing in the GL 4.6 and Vulkan renderers 2026-10-25 05:17:41 +01:00
Hirek 9b7d02e5fb Vulkan: scene rendering (D1–D7) on a scene walk shared with GL (N6a, N6b) 2026-10-24 20:10:24 +02:00