maj00r
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
2026-10-14 22:11:06 +02:00
maj00r
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
2026-10-14 22:11:06 +02:00
maj00r
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
2026-10-14 22:10:55 +02:00
maj00r
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
2026-10-14 22:10:55 +02:00
maj00r
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
2026-10-14 22:10:55 +02:00
maj00r
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
2026-10-14 15:02:14 +02:00
maj00r
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
2026-10-14 14:23:52 +02:00
7b9eaf1ccb
Editor terrain: area fill with blurred or sharp edge, texture rotation
2026-10-10 17:35:52 +02:00
35bda3778c
Heightmap terrain: .tch chunk packs, streaming with LOD, terrain painting, water and modifiers - terrain/<name>/terrain.yaml + <px>_<pz>.tch packs of 16x16 chunks (250 m, 0.5/1/2/5 m spacing), slices with crc-32 and optional zstd (vendored zstd 1.5.6 in ref/zstd) - heightmap_terrain [name] endheightmap_terrain directive replaces editorterrain - streamer: worker threads, camera + look-ahead loading, geomipmap LOD with skirts, pooled geometry - mat_terrain shader: up to 8 painted layer materials per chunk via texture arrays (opengl33); other renderers fall back to the dominant material - water bodies (outline + level), terrain modifiers (vertical profile shaping kept non-destructive) - F11 Terrain work mode rebuilt: chunks, sculpt, smooth, paint, point spacing, water tools
2026-10-09 21:02:25 +02:00
1d9c608396
light_common: add normal offset to shadow lookups
2026-09-19 21:56:02 +02:00
cb6b97b904
light_common: weight textureGather shadow PCF by sub-texel position
2026-09-19 21:15:49 +02:00
306c7eaf26
Adjust param values
2026-09-19 17:09:58 +02:00
468ea1d747
Add shader diffuse multiply
2026-09-19 16:56:39 +02:00
8df81eb46d
Improve skybox
2026-09-14 21:11:08 +02:00
766a957527
Fix relfections on default shader and tonemapping
2026-09-01 20:41:06 +02:00
3b4df9bb6d
Fix default shader reflection
2026-08-17 18:51:36 +02:00
Sebastian Krzyszkowiak
b323d78c34
light_common: Adjust ambient and sun diffuse scale
...
Sun needs some oomph.
2026-06-30 01:37:47 +02:00
Sebastian Krzyszkowiak
473eae53d2
tonemapping: Reduce saturation boost in AgX
...
1.4 is quite extreme with our textures. Boost it up, but not as much.
2026-06-30 00:21:40 +02:00
Sebastian Krzyszkowiak
321edfcf10
tonemapping: Fix up AgX application
...
We're supposed to output linear values there, as sRGB transfer function
gets applied either by GL framebuffer or FBOUT later on.
min_ev and max_ev also need to be adjusted, as they're tweaked for
a pipeline with exposure compensation. The current values lead to a very
washed-out image, which was "hidden" by subsequently applying gamma twice.
It may make sense to revisit these values in the future to better match
the rendering pipeline.
2026-06-30 00:20:38 +02:00
c88a9b870c
Improved specular and glosiness
2026-06-27 14:41:10 +02:00
d21cd54f89
AGX tonemapping
2026-06-27 14:39:33 +02:00
426ee0baac
use textureGather for shadow PCF
2026-05-26 22:08:06 +02:00
ee8ee0dafc
Switch normalization from Blinn-Phong to GGX
2026-05-14 15:35:52 +02:00
587077629f
Enable instancing
2026-05-09 23:29:20 +02:00
ff258e3d3c
Sanitize NaN/Inf in env cubemap and tonemap to stop one-frame black flashes
2026-05-01 17:20:43 +02:00
7923f7d857
improve shaders once more
2026-04-26 00:49:45 +02:00
76effe72df
shaders correction for burnt colors
2026-04-26 00:18:02 +02:00
bc0e4a9e62
Specgloss shaders improvements + experimental SSAO (debug only)
2026-04-21 00:25:29 +02:00
323b04f542
Wiper shader improvements
2025-12-23 21:01:29 +01:00
7a2bfcb34a
improve chromatic abberation shader
2025-12-05 22:42:17 +01:00
f68c7bc927
improve rain shader for opengl renderer
2025-12-05 22:41:37 +01:00
Wls50
ac62f23f0f
apply lighting to droplets
2025-11-22 18:53:31 +01:00
Wls50
d090b62669
improve random behaviour; dropled size scaled by grid
2025-11-22 13:10:37 +01:00
Wls50
b4737712de
support cabview rain effect
2025-11-21 22:43:24 +01:00
4d342d274e
Improved OpenGL lightning shader
2025-11-03 19:45:02 +01:00
Milek7
9339c1b8ae
Merge pull request #63 from wls50/master
...
update vertex structure to add user data for custom shader use
2024-09-05 01:32:53 +02:00
Ryba04
a63273d470
fix color.frag
...
Fixed an error found by Michausto and JAN21
2024-07-10 22:59:03 +02:00
Wls50
dba0a035fd
add user data vector to basic_vertex
...
update t3d, e3d & sbt specs accordingly
update node model to shape conversion to support indexed meshes
2024-06-30 16:13:19 +02:00
milek7
30da449423
assume skydome data is in sRGB in shader renderer
2021-01-30 23:14:24 +01:00
milek7
42cd390bc5
Add mat_default_detail.frag shader
2021-01-30 17:05:08 +01:00
antonisauren
d1ecbdc8ff
Sim ( #11 )
...
* Wheels animation distance changed to 200*D*LODbias
* Fixed spelling error in event syntax; old one remains for compatibility.
* Spelling error left in log text
* Zamiana metalic na floata z wazonym efektem.
# Conflicts:
# shaders/light_common.glsl
* Detail normalmap shaders @Jan21
* Explicit type conversion
* Leftover metalic as bool
* Syntax error
* Normalmap sampling inside ParallaxMapping function
2021-01-23 22:24:14 +01:00
milek7
f0b364bafe
basic GLES working again
2021-01-20 19:29:50 +01:00
milek7
ee5551a424
try to improve motion blur
2020-12-01 01:45:48 +01:00
milek7
30dec00c35
vr: draw main window tex on nice quad
2020-11-18 23:46:24 +01:00
milek7
79b0216b55
use vr hiddenarea mask
2020-11-18 22:18:28 +01:00
milek7
29f8f91ad8
Merge remote-tracking branch 'tmj/master' into sim
2020-10-18 23:35:14 +02:00
tmj-fstate
54b648fb5b
shader reflection color calculation tweak
2020-08-12 20:57:57 +02:00
stele
c4945d3f32
Fixed "param_glossiness" missing from final gloss formula in materials utilising gloss maps.
2020-07-16 18:05:37 +02:00
stele
758b3bfe78
Merge branch 'master' of https://github.com/tmj-fstate/maszyna into tmj-master
2020-03-09 19:15:01 +01:00
stele
3e7537d88c
Fragment color multiplied by ambient color instead of luminosity.
2020-03-09 19:05:23 +01:00