1
0
Fork 0
Commit graph

204 commits

Author SHA1 Message Date
Rick Gruber-Riemer
db6f223e55 Materials plus new texture for osm2city trees 2023-01-15 17:06:55 +00:00
Stuart Buchanan
4d3466216a WS30: Improve water line features 2022-10-24 19:53:12 +01:00
Stuart Buchanan
fc8342887a WS30: Coastline beaches and cliffs
Landclass information is typically not high enough resolution
to render small beaches and coastline features.

This commit uses the steepness of the elevation mesh
to procedurally generate:
a) sea-cliffs (poorly - just a texture at present)
b) beaches, which mix into translucent shallow water
c) breaking waves (poorly - uses the wind direction rather than the
slope normal)
2022-04-09 16:26:00 +01:00
Stuart Buchanan
49b1b83be2 WS30: Better edge-hardness implementation 2022-01-22 15:48:02 +00:00
Stuart Buchanan
68df0191c0 WS30: add edge-hardness parameter for landclass transitions
Also new use_edge_hardness_with_large_scale_transition const
for testing
2022-01-15 15:04:54 +00: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
Erik Hofman
a1dab5709f Add a frozen-lake texture based in the packice textures 2021-12-20 15:00:22 +01:00
Erik Hofman
1bbe5a952b Set inland water bodies icing when the icing slider >= 0.05 2021-12-20 10:00:57 +01: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
Erik Hofman
edc810ea13 Final update: Add more procedural texturing, less greenery, more variation. 2021-03-26 16:11:25 +01:00
Erik Hofman
d919e47ea6 A number of small updates to the material definitions and use the new /sim/rendering/desert propery to adjust the amount of sand/gravel at a particula latitude. 2021-03-25 11:15:17 +01:00
Erik Hofman
c3e8c724b4 Add tree effects where required for autumnt coloring 2021-03-23 21:37:51 +01:00
Stuart Buchanan
88209b1eb9 WS30: Add missing materials and landclass mapping 2021-03-22 15:27:41 +00:00
Erik Hofman
09ed8d2554 Tweak the african mediteranian airport keep, grasslands, schrub cover, crop areas and grasslands 2021-03-21 14:09:04 +01:00
Erik Hofman
48685a5ada Activate the california regional texturing 2021-03-16 11:07:07 +01:00
Erik Hofman
f8711a67cb A massive renovation project: Tear down old industry and create shoe-boxes 2021-02-17 22:07:46 +01:00
Erik Hofman
ee6a5490fa Add a second industrial (resynthesized) texture 2021-02-16 14:06:45 +01:00
Erik Hofman
a8b278005b Add an European industrial definition 2021-02-16 11:29:11 +01:00
Erik Hofman
fbab222994 use the new, less whashed out version of the tree textures 2021-02-15 12:42:21 +01:00
Erik Hofman
3c619d382f Use the new and better mixed crop texture 2021-02-15 12:36:24 +01:00
Erik Hofman
5b9188db2a use the high resuloution tree textures 2021-02-14 15:52:17 +01: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
65fea87637 Set the default to US agriculture buildings since all the other regions are defined individually. 2021-02-10 11:42:36 +01:00
Erik Hofman
58944c3aa8 Reference the new is-farm-buildings 2021-02-09 15:01:05 +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
Erik Hofman
0ffcc94da5 Improved vegitation (masks) 2021-02-06 13:40:24 +01:00
Erik Hofman
95f959cdda Change the scale of the irregular crop texture 2021-02-03 10:00:59 +01:00
Erik Hofman
1f647a3861 Better use of available textures 2021-02-01 13:31:08 +01:00
Erik Hofman
1339654a25 Finetune the crop settings 2021-01-31 11:58:17 +01:00
Erik Hofman
881948bdbc Improved europe region 2021-01-30 15:30:50 +01:00
Erik Hofman
e70f096654 Remove any reference to the winter textures which are relaced with a snow shader now 2021-01-19 13:10:06 +01:00
Erik Hofman
40e871a911 Implement a simple snow shader for the low quality levels 2021-01-19 11:10:44 +01:00
Fernando García Liñán
5e3131d384 Add material definitions for Oceania by IskenderWang 2021-01-05 14:20:41 +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
Erik Hofman
99ecc9a563 Some final tweaks to the iceland scenery 2020-10-30 12:32:52 +01:00
Erik Hofman
b82963c540 Complete overhaul of the Iceland materials file 2020-10-29 23:55:36 +01:00