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
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
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
468ea1d747
Add shader diffuse multiply
2026-09-19 16:56:39 +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
c88a9b870c
Improved specular and glosiness
2026-06-27 14:41:10 +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
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
4d342d274e
Improved OpenGL lightning shader
2025-11-03 19:45:02 +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
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
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
tmj-fstate
a8b47c3c97
Merge pull request #11 from antonisauren/tmj-master
...
Specular/glossines/metalic mapping added to all fragment shaders
2020-03-01 03:21:03 +01:00
tmj-fstate
642b8fb623
compartment lighting vehicle subsystem, submodel diffuse impact on ambient lighting, minor gfx renderer bug fixes, minor ai logic tweaks
2020-03-01 03:09:55 +01:00
stele
879f3bb360
Specular/glossines/metalic mapping added to all fragment shaders
2020-02-23 10:36:15 +01:00
tmj-fstate
6b1ab6c125
opengl 3.3 renderer shaders
2020-02-21 22:50:52 +01:00
milek7
43fc2899aa
add slight shadow bias (needs futhrer work)
2019-10-08 00:20:45 +02:00
stele
410e1452f6
Cleanup of vertex shader by @tmj.
...
2-channel normalmaps with Z-component reconstruction.
Normal vectors passed from fragment shaders to lightning calculations.
2019-05-03 17:32:46 +02:00
stele
8aca8bffe4
Fog applied to line objects.
2018-12-24 23:50:17 +01:00
stele
b7d6d80225
Added water shader
2018-12-22 17:34:03 +01:00
milek7
c0d824a6bd
tune headlight parameters, refactor config window
2018-12-09 21:14:31 +01:00
milek7
bd8c5ed59a
debug configurable headlight
2018-12-09 19:55:53 +01:00
milek7
455ca1cacf
shader fix
2018-10-17 21:54:03 +02:00
milek7
d16d96f2b2
GLES support
2018-10-16 20:32:45 +02:00
milek7
5dbd1c1772
if/ifdef fix
2018-07-25 12:34:35 +02:00
milek7
da429650ab
configurable renderer
2018-07-25 12:21:47 +02:00
milek7
b69ffd85ea
changes, improved z buffer precision
2018-07-24 16:42:18 +02:00
milek7
d5ce1d57e7
motion blur
2018-07-23 01:22:36 +02:00
milek7
a729c5fa1d
shader changes
2018-07-19 18:13:07 +02:00