1
0
Fork 0
Commit graph

42 commits

Author SHA1 Message Date
Stuart Buchanan
4d3466216a WS30: Improve water line features 2022-10-24 19:53:12 +01:00
Stuart Buchanan
c7b73ff91b WS30: Workaround for ALS Ultra road effect
The terrain-default Ultra (n=3) technique
fails for the WS30 line feature.  This change
simply disables it ahead of re-implementing the
traffic shader.
2022-01-11 21:38:38 +00:00
Stuart Buchanan
3261f4a97c WS30: MR #267: Improved texture lookups from VS
Squashed commit of the following:

commit 115511888c20c53670eba17a82c81c9af99d7302
Author: vs <vs2009@mail.com>
Date:   Mon Dec 6 18:52:06 2021 +1000

    WS30 effects and shaders:

    Changelog:

    ws30-ALS-ultra.frag:

    - Ground textures lookups use their own coordinates separate from the landclass  texture lookup.

    - Partial derivatives dFdx and Dfdy are packed together in a vec4, so simple   multiplication to scale can be done in 1 instruction. dFdx = s and t components. dFdy  = p and q components. These must be scaled properly for ground texture access as ground  texture stretching and detiling of tex coords mean textures are scaled differently.

    - Added calculation of partial derivatives for texture coordinates used by the 5 non- base textures. dFdx() and dFdy() were called for nontrivial texture coordinate manipulation.

    - New control randomise_texture_lookups added at top of ws30-ALS-ultra.frag, in the  development tools section. Setting this to 1 will do a stress test of ground texture  array lookups. A fast random number generation function is used to assign each  landclass 4 random textures from the ground texture array - this is done by .  Performance will not be as bad in the full ALS port as some texture slots will better caching in memory - e.g. have 1 or a few variants.

    - Possible optimisation: use a 2nd or 3rd texture array for some of the non-base  texture slots that typically have 256, 512, or 1024 textures. The resolutions of these  arrays should change based on the largest loaded texture size in the active regional  definitions - this will allow taking full advantage of smaller texture sizes in some  areas. The disadvantage is some texture duplication with more slots.

    - Possible optimisation: offer the option to shrink textures by 50% or 25% - for  texture slots that use large textures like base or mix slots.

    - Very temporary - reduce procedural normal map features with photoscenery active  without breaking profiling, as the inputs to shaders are effect defaults or  placeholder (by request on ML).

    ----

    ws30-ALS-ultra.vert:
    - Start of conversion of geocentic world space xyz into lat/lon coords used for ground  texture lookups. Currently commented out as it's unknown what model space coords are  in (not geocentric it seems).

    ws20-ALS-landclass-search-functions.frag:

    - Add control for changing the ground texture array lookup function for debugging in  case old compilers/GPUs have issues. tex_lookup_type: 0: normal( textureGrad(), 1:  textureLod (manual Lod calculation), 2: texture() with no partial derivative  adjustment.

    - New get6_random_integers() will extract 6 limited random values from the full  precision of a 32 bit random value.

    - Old landclass_texel_size_m references are removed since textureSize() is used. There  are no 'const in float' arguments that may cause issues on AMD compilers.

    ----

    WS30-overlay effect (Inactive):

    - ws30-overlay.eff (derived from terrain-overlay.eff). Technique no "4" is used for two passes. The 1st pass is a copy of the ALS ultra pass (technique no "5") from ws30.eff.  The 2nd pass is the same as terrain-overlay.eff. The 2nd pass uses terrain- overlay.frag from WS2.

    - grass-ALS.vert copied to ws30-ovelay-ALS.vert. To do: needs texture coords that  don't change with tiles.

    - terrain-overlay-ALS.geom copied to ws30-overlay-ALS.geom. To do: uses gl_PositionIn [i].xy for position in the horizontal plane - assumes z is vertical. Tile model space  doesn't seem to match this.

    - WS3 doesn't seem to have a way of switching references to terrain-overlay.eff (which  inherits from terrain-default.eff) to the new ws3-overlay.eff (which needs to inherit  from ws30.eff). The ws3-overlay.eff included /might/ just work without any other changes: the first pass is the WS3 als ultra settings pass, and the second overlay pass is unchanged from WS2 (the same terrain overlay shaders should probably work apart from texcoords and rawpos not being correct).

    - Materials/base/materials-base.xml: ws30Road material: uncomment line declaring terrain-default as the effect. The target effect for ws30 roads is road-*.eff and it's added to ws30Road and ws30Freeway but commented out as it's not working currently.

    - Misc: large scale transitions are turned on in ws30-ALS-landclass-search-functions.frag by default. Grow landclass borders with large scale transitions is now on by default.

    ----

    Changes after the multi-texture support commit:

    ws30-ALS-ultra.vert

    - Added documentation: WS30 model space and z up space - for future people working on WS30, and people looking through shaders to rule out possibilities e.g. when fixing bugs, or interpreting visual bug reports.

    ws30-ALS-landclass-search-functions.frag:

    - For now, lookup_ground_texture_array() also looks up the relevant texture's index  based on an integer.

    - Add get_mixed_texel() - looks up texel for this fragment and any neighbors before mixing. Moves currently shared mixing code out of 3 fragment shaders.

    Misc: changed indentation from mixed tabs/spaces to spaces in ws30-ALS-ultra frag and vert. The indentation can be changed again when the porting is complete.

    ws30-ALS vert/frag and ws30-ALS-detailed vert/frag:

    - Add varying for ground texture coordiante, currently set to gl_TexCoord[0]. Apply texture stretching dimensions in fragment shaders.

    - Misc: varying rawPos is set to vec2 for now, as relPos.z+eye_alt might be faster. Misc: keep WS2 mixing logic for now , including turning off mixing via the alpha channel of the textures

    ----

    Changes after sending material parameters in uniform arrays commit:

    - Materials parameter for rock_strata is cast into an int so rock_strata==1 should work. Misc: Left over uniform for rock strata cleaned up.

    - ws30-ALS-ultra.frag and ws30-ALS-detailed.frag: Add missing mat_shininess for photoscenery case .
2022-01-03 15:43:29 +00:00
Stuart Buchanan
38dc00faf1 WS30 - Set Effects for ws30Roads etc. 2021-10-20 23:22:51 +01:00
Stuart Buchanan
428cbb0abc WS30 - Line feature texturing. 2021-10-01 22:02:44 +01:00
Stuart Buchanan
bdedb1dcc4 Material changes for procedural streetlights 2021-08-29 18:26:16 +01:00
Stuart Buchanan
164112a8c0 WS30: Properties for lit roads 2021-08-21 17:16:28 +01:00
Stuart Buchanan
8a94ffa7e1 WS30 Use proper inheritance for ws30water 2021-05-08 20:41:58 +01:00
Stuart Buchanan
c87798c610 WS30i: Initial coastlines 2021-05-03 15:47:13 +01:00
Stuart Buchanan
88209b1eb9 WS30: Add missing materials and landclass mapping 2021-03-22 15:27:41 +00:00
Erik Hofman
f346b1ebf0 Add a Foursquare horse farm 2021-02-12 10:14:50 +01:00
Erik Hofman
51741cde8b Add a Foursquare farm 2021-02-12 10:02:57 +01:00
Erik Hofman
207ba922bd Add a traditional stone farm with a straw rooftop 2021-02-11 14:01:02 +01:00
Erik Hofman
796693d68f Add African farm buildings and assign them in the materials files 2021-02-10 15:03:35 +01:00
Erik Hofman
39ea9d9605 Add a set of US farm buildings, for inclusion in a materials file 2021-02-09 14:50:44 +01:00
Erik Hofman
6d5d00f5b9 Add some buildings for an old-fashioned all brick farmhouse 2021-02-09 11:44:29 +01:00
Erik Hofman
74a790c116 Add a farm for small livestock. Move agriculture buildings to the Agriculture directory 2021-02-07 14:09:00 +01:00
Erik Hofman
ba5f7b2b4f group farm buildings in three distinctive farms: crop, cattle and horse farms 2021-02-07 11:53:19 +01:00
Stuart Buchanan
3e3593119c WS30: Shader change to use texture atlas
These changes use the generated Texture2DArray for
texture lookup, supporting arbritary sets of material
textures.
2020-12-05 13:11:59 +00:00
Stuart Buchanan
78f72a5ec3 WS30: Landclass to material map in materials.xml
Initial mapping of landclass to material names based
on CORINE.
2020-11-29 19:31:31 +00:00
Stuart Buchanan
4aff635cdb WS3.0: Initial commit of WS3.0 rendering 2020-11-08 22:44:34 +00:00
Delta Echo
24553feb57 Fix duplicate material name as pointed out by Scott 2019-08-30 09:45:53 +02:00
Delta Echo
b305eae6f8 Add support for more linear airport features 2019-07-29 15:46:57 +02:00
Stuart Buchanan
d5b8ae9ccf osm2city building, road, railway materials. 2017-05-09 14:16:44 +01:00
Stuart Buchanan
97d54bf17f Make LOD for trees/buildings/objects/STG configurable.
Now based on /sim/rendering/static-lod/rough.

This commit removes a large number of range
settings that should in general be set by the user.
2016-04-08 22:39:29 +01:00
Clément de l'Hamaide
405b0577b1 Revert "Add materials definition for textured lines"
This reverts commit ce7358a23ca305f51fad983ba282e78798c9d0bd.
2013-10-01 00:52:33 +02:00
Clément de l'Hamaide
af47809f1b Add materials definition for textured lines 2013-09-30 23:17:05 +02:00
Stuart Buchanan
266313486d Add dynamic selection of tree texture based on season and snow level.
All tree texture sheets now contain 4 different texture sets for
different conditions.  See Docs/README.materials for details.

Also retire the -summer and -winter variants of tree textures, which
are now redundant.
2013-04-20 21:09:03 +01:00
Thorsten Renk
f0b4466a68 Overlay texture definitions for procedural texturing 2012-12-11 13:29:58 +02:00
Christian Schmitt
d95a979b97 Use capitals for newly added materials, as it's done for the other landcover names 2012-12-10 00:12:44 +01:00
Christian Schmitt
ef813cca94 Add synonym material definitions for future diversification (needed by TG) 2012-12-09 22:32:08 +01:00
Christian Schmitt
702eff7c32 Add runway guard lights as a separate material type 2012-11-22 16:46:24 +01:00
Martin Spott
3636ec33ac Transport material was lost during materials re-organization,
this one is worth cherry-picking into the release (I hope it's the only
one which got lost ....).
2012-08-06 18:49:20 +02:00
Emilian Huminiuc
b1b263b483 Rmove stray .dds references in terrain-default.eff and non-dds materials file
This should hopefuly prevent any dds files from being loaded when using the default/regional materials file
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
2012-07-13 13:35:19 +03:00
Emilian Huminiuc
6ef4f5eca0 Make water efect use png textures by default, and rely on their dds counterparts only when using the dds materials file.
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
2012-06-16 18:57:14 +03:00
Emilian Huminiuc
acb83d7916 New red and yellow signs textures with missing glyphs definitions.
Add shading to the special.png texture.
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
2012-06-13 15:35:41 +02:00
Christian Schmitt
06da90b993 Add special taxiway signs and remove old unlighted signs materials 2012-06-13 15:27:17 +02:00
Flightgear Development
3f259693e6 Hawaii regional textures 2012-06-09 20:15:34 +01:00
Emilian Huminiuc
626d758f30 Add texture and material definition for casing on 3d Taxiway signs.
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
2012-05-11 11:51:34 +03:00
Flightgear Development
4a735b4b47 Regional textures 1.0 2012-05-07 20:04:16 +01:00
Stuart Buchanan
15dc296a0a Manual merge from data/materials.xml of
532c93cfa06c3be2d5b47cbffe33a89c04433b8a
c32204a079ea204ff10c2961e75e5cea9ae98afc
d66d417dea5dc0cf06222627ba3ccf9de6506630

into the new Materials definitions.
2012-04-24 22:33:32 +01:00
Stuart Buchanan
9c901780ac Split out common materials and settings from materials files, create file structure
to support more materials definitions in future. Also make a couple of fixes:
- Runway effect now works for both dds and non-dds
- PNG definitions for pa_shoulder and pc_shoulder
- Defined Industrial area (previously this was common with Urban)
2012-02-24 21:17:44 +00:00