Commit Graph

44 Commits

Author SHA1 Message Date
sfan5 9fcd7f2dc0 Fix clang-tidy type promotion errors 2024-02-26 20:47:47 +01:00
Gregor Parzefall 6f0d36c41a Fixes and improvements 2023-07-20 22:15:47 +02:00
Gregor Parzefall 7473e4cafd Expose all OpenGL filtering modes, use OpenGL names for them
Because of a review comment on the Irrlicht PR by numberZero.
2023-07-20 22:15:47 +02:00
Gregor Parzefall 6bf63d4b41 Rename SMaterial::TextureLayer -> SMaterial::TextureLayers
It's not the "texture layer" of the material, but an array of texture layers.
2023-07-20 22:15:47 +02:00
Gregor Parzefall 9bef3c136a Split up texture filtering properties of SMaterialLayer into MinFilter and MagFilter
You can	now set	the filter used	when scaling textures down and the filter used when scaling textures up separately.
2023-07-20 22:15:47 +02:00
Gregor Parzefall 307e380f30 Refactor the way you set material properties
Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
2023-07-20 22:15:47 +02:00
lhofhansl 0ade097e99
Allow the server to control fog_distance and fog_start via the sky-api (#13448) 2023-06-30 19:11:17 -07:00
x2048 f3b198e490
Return shadow_sky_body_orbit_tilt setting
Used as a default value when the game does not change the value via API (e.g. legacy server)
2023-03-24 12:34:21 +01:00
sofar 2083252c05
Sky: transmit body_orbit_tilt to client. (#13193)
This obsoletes the current client-side setting entirely. The server can
transmit the tilt to the client directly and will send 0.0f as default
value.

Co-authored-by: x2048 <codeforsmile@gmail.com>
Co-authored-by: sfan5 <sfan5@live.de>
2023-02-26 01:08:33 +01:00
sfan5 3bafbaac49 Remove dead code behind Irrlicht version checks 2023-02-18 16:46:51 +01:00
Abdou-31 d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
x2048 260de1c2b5
Enable negative values for sun/moon orbit tilt (Northern hemisphere) (#12904) 2022-10-30 16:54:06 +01:00
DS 643971c948
Add documentation of sun/moon orientation/scale differences (#12145) 2022-09-06 11:21:55 +01:00
x2048 8c29c4f620
Use Sky class to obtain directional light source position for shadows (#12662)
* Also remove unused Sky::getSkyBodyOrbitTilt method

Fixes misalignment of sun position and shadow direction at high tilt values.
2022-08-17 16:30:05 +02:00
Wuzzy 142928e944
Allow to set maximum star opacity at daytime (#11663) 2022-07-02 19:57:48 +01:00
rubenwardy c61998bd20
Revert "Disable dynamic shadows for the 5.5.0 release" (#12032) 2022-01-31 21:48:14 +00:00
SmallJoker a27362de6a Disable dynamic shadows for the 5.5.0 release
The dynamic shadows are yet not in the desired state to justify the
inclusion into version 5.5.0. A stable release is long overdue, hence
this allows fixes to continue in 5.6.0-dev to finally release an
acceptable version of the dynamic shadows feature.

Reverting this commit is highly recommended to proceed in development.
2022-01-29 18:42:55 -05:00
sfan5 f8cef52ea0 Fix consistency of sky sun/moon texture behaviour
Also cleans up related code somewhat.
2022-01-22 11:18:34 -05:00
Liso c47313db65
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00
Loic Blot 1bc855646e refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls
* rename Game::sky to Game::m_sky
2021-05-03 19:49:19 +02:00
Wuzzy e89e6c8380 Don't reseed stars when changing star count 2021-04-09 22:33:45 +02:00
sfan5 f0bad0e2ba
Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
sfan5 3579dd2186 Restore Irrlicht 1.9 support 2021-03-09 21:53:17 +01:00
Vitaliy ccbf8029ea
Cleanup shader generation code (#10663)
Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
2020-12-19 20:57:10 +01:00
sfan5 868749b4f8 Return star color calculation to what it previously was 2020-11-26 22:17:11 +01:00
numzero 8689e00fca Fix style 2020-11-26 12:49:10 -08:00
numzero c158e20e5b Provide fallback star color for GLES 2 with MT shaders disabled 2020-11-26 12:49:10 -08:00
numzero cdcf7dca7c Sky: support GLES2
IrrLicht built-in shader is broken, have to write my own
2020-11-26 12:49:10 -08:00
numzero d7cf40a0ce Replace TriangleFan as poorly supported 2020-11-26 12:49:10 -08:00
numzero 560627eef8 Reuse seed when updating stars
The only currently relevant parameter is scale which can now be changed
without resetting stars position
2020-11-26 12:49:10 -08:00
numzero 3077afc0a2 Store stars in a single static mesh buffer 2020-11-26 12:49:10 -08:00
sfan5 471e567657 Value copy / allocation optimizations mostly in server, SAO and serialize code 2020-05-27 21:58:40 +02:00
TheTermos 7cb53791c3
Color gradient for default and 'regular' type sky (#9502)
* add regular sky gradient

* add regular sky gradient

* Update sky.cpp

* change default day sky colors
2020-05-09 17:14:56 +02:00
SmallJoker cad5b987ad Sky API: Rename *_tint to fog_*_tint for consistency 2020-05-05 08:37:04 +02:00
Jordan Snelling b9a0626d88
Fix star visilibity and documentation (since 946c03c6)
Fix memory leak (unused allocation)
Fix star rendering
Rename sky color struct
Fix stars on android
Remove extraneous .data() from android star draw
2020-03-08 16:13:36 +01:00
Jordach 946c03c69b set_sky improvements, set_sun, set_moon and set_stars 2020-03-05 20:12:19 +01:00
lhofhansl cea4fd2b27 Increase star count to 1000 and decrease radius slightly (#9307)
* Increase star count to 1000 and decrease radius slightly.
* Adjust star width.
2020-01-16 17:12:34 +01:00
sfan5 ca363d3ef8 Unify OpenGL ES support 2019-08-04 16:12:52 +02:00
Methacrylon cdc7eb2d4c Sky: Refactor of moon and sun drawing (#8683)
Split sun and moon render parts from the main render function.
2019-07-30 20:25:47 +02:00
Paramat 08884d258b
Draw all horizons and sky base, in front of stars (#7932)
Move star draw to before sun glow texture draw and before sun draw,
not currently essential but the logical order. Will be necessary if
a 'no far ground' option is added, to draw stars behind the sun.
2018-12-06 03:56:35 +00:00
Paramat ff12630bc9
Draw stars behind the moon (#7928)
This time correctly, by resetting the 'material' to '1' after moon draw.
2018-12-02 07:25:43 +00:00
Paramat 5dd542401a
Slightly alter star appearence time and full brightness time (#7921)
At sunset:
Stars first appear slightly later, at the time the sun disappears over the horizon,
this fixes seeing dark stars in front of the sun horizon glow texture.
Stars reach full brightness slightly earlier at time 20000, not so excessively long
after sunset.

The above behaviour is also applied at sunrise, but of course, time-inverted.
2018-12-02 04:17:05 +00:00
Paramat dcf58a3ad0
Fix sky bugs when using sun or moon textures (#7918)
Reverts the render order change of commit
ce2d33eb97
2018-12-01 05:04:13 +00:00
Quentin Bazin 5f1cd555cd Move client-specific files to 'src/client' (#7902)
Update Android.mk
Remove 'src/client' from include_directories
2018-11-28 20:01:49 +01:00