Previously the vertices directly underneath an airport were
displaced downwards. In general this worked OK, but for airports
surrounded by higher terrain, this could cause "ridges" from
edges from vertices just outside the airport boundary.
This commit modifies the algorithm to also reduce the elevation
of vertices immediately outside the airport boundary as well.
All FlighGear specific patches applied to ShivaVG are also applied to
ShaderVG, if appropriate.
For testing only for now, it is not yet fully functional.
Required to address reported in-the-wild CVEs in older Expats.
This may need a tweak for Linux / BSDs to set appropriate values in
our custom expat_config.h : only macOS and Windows tested so far.
Previously 3D cloud re-position code did not re-orientate
the sprites, leading to the sprites being at an angle for
long flights.
Fix from Michael DANILOV to address this.
This gives knowledge of how to resolve relative paths, to makeEffects
invocation of findDataFile, and hence gives a more familiar lookup
ordering, for Aircraft-supplied effects.
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2678/
Throwing an exception causes normal error-collecting to trigger for
the XML model load, so this is sufficient to avoid the crash and
also report back to the aircraft developer & user.
Thanks to Michael Danilov for catching this.
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2702/
Previously a separate mesh was created for parts of the
terrain identified as being water.
This adds a property (/scenery/elevation-mesh/separate-water-mesh)
which controls whether this separate mesh is generated.
From Chris RINGEVAL
Squashed commit of the following:
commit ee2ec625ef10ab372a99397a82d1272670d767ec
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Mon Jan 31 00:01:39 2022 +0100
Replace galaxy texture by our own and update galactic coordinates
commit 26f3d80df6385913668635013912f1c4fef50e60
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Tue Dec 7 22:02:10 2021 +0100
Cleanup white lines and comments
commit 55e9f9b4bcbe21a34be7be874b120bda73c49cb8
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Sun Dec 5 15:53:15 2021 +0100
Cleanup cxx parts to the minimal required, moving all rendering to the shaders
commit 0cff2827bb3c18f85780cce5c0178ee37c590fe5
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Wed Dec 1 22:55:41 2021 +0100
Adding moon direction uniform vector used in the Milky Way shader
commit 24485079673c299bad95fc1f800542a6d73e8e95
Author: Chris Ringeval <eatdirt@protonmail.com>
Date: Wed Dec 1 22:54:54 2021 +0100
Adding Milky Way texturing and dark sky brightness effects
The random lights placement algorithm was using the incorrect channel
from the object mask image, (red instead of blue as mentioned in
Docs/README.materials). This commit rectifies the mismatch.
Random objects like lights and trees are not placed on airport terrain
anymore. This commit also refactors some of the existing code for clarity.
Discussion can be found here [1] and detailed history here [2].
[1] https://sourceforge.net/p/flightgear/simgear/merge-requests/102/
[2] https://sourceforge.net/u/fahimdalvi/simgear/ci/bugfix/ws30_random_objects_avoid_airports/~/tree/
Squashed commit of the following:
commit 643198f8d52da8d65a674b052c508f03d7f83ac0
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date: Tue Jan 4 09:57:34 2022 +0300
Implemented corrected airport intersection logic
We now convert the point into the correct coordinate system before
checking for intersections with the airport geometry.
commit 7e0819e4f88992658301a2c15d890fc489cfe3b6
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date: Wed Nov 10 19:59:04 2021 +0300
Added airport terrain check code for random objects
This commit does not work as expected. The light-coverage check is disabled
to amplify the bug.
commit eb21e8fd256dcf124857ac51afc0d7c3c90ae1c6
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date: Wed Nov 10 19:53:44 2021 +0300
Refactored elevation constraint checking code
This commit provides a separate elevation constraint function that does not
displace the given point. The current function has been renamed to indicate
the displacement side effect.
The Random objects check now happens in the scanline read in VPBTechnique,
rather in the VBPMaterialHandler objects. These checks are not specific
to any handler, and are thus better suited to be outside of specific
material handling logic.
The texture cache interacts badly with the code creating the WS30
texture atlas, resulting in a bad atlas. This change adds a new
SGReaderWriterOptions::LoadOriginHint::ORIGIN_MATERIAL_ATLAS
which causes the material cache not to cache the texture.
Add defaultValue arg to get*Value() methods that previously took no args. We
do this for getBoolValue(), getIntValue(), getLongValue(), getFloatValue() and
getDoubleValue(). The default value is returned if the node's string is not
convertible to the requested type.
This can enable some calling code to be optimised where it previously checked
for getStringValue() (which is slow now that it returns a std::string)
returning an empty string, before calling getDoubleValue().
This is by Lars Toenning <dev@ltoenning.de>, Roman Ludwicki <romek21@op.pl> and
SDeAstis <salvatore.deastis@gmail.com>, in 2021 Hackathon.
SGPropertyNode::getStringValue() now returns std::string by value instead of
const char* pointer into SGPropertyNode's internal data.
Patched up various call sites to use new API.
Remove SGPropertyNode::getName() and use SGPropertyNode::getNameString()
everywhere.
Uses ffmpeg libraries to provide video encoding of an osg::GraphicsContext
(which could be for Flightgear's main window) to file.
The video codec is specified as a string at runtime. Success depends on what is
supported by the system's ffmpeg installation.
Handling of resize doesn't always work. We finish current stream and create a
new encoder and continue. Works ok with mpeg2, but with more modern codecs vlc
usually fails to handle the change.
We call the encoder on a separate thread to avoid latency.
If SG_FFMPEG is not defined, we don't make calls to ffmpeg libraries and
VideoEncoder class's constructor always throws an exception.
- Prefix all WS30 Uniforms with "fg_"
- fix modelOffset (needs to be passed in as a float)
- Create a true atlas with indexes for relevant material textures
MCST E2K (Elbrus 2000) - this is VLIW/EPIC architecture, like Intel Itanium (IA-64) architecture.
e2k architecture has half native / half software support of most Intel/AMD SIMD
e.g. MMX/SSE/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2/AES/AVX/AVX2 & 3DNow!/SSE4a/XOP/FMA4
Ref: https://en.wikipedia.org/wiki/Elbrus_2000
To simplify various rounding / truncation operations, especially when
dealing with frequency values, give floor() the same precision control
already present in math.round(), and add math.trunc() which always
truncates towards zero.