1
0
Fork 0
fgdata/Effects/ws30.eff

1977 lines
64 KiB
Text
Raw Normal View History

<?xml version='1.0' encoding='UTF-8'?>
<!-- World Scenery 3.0 Effect -->
<PropertyList>
<name>Effects/ws30</name>
<parameters>
<material>
<ambient type="vec4d">
0.2 .2 0.2 1.0
</ambient>
<diffuse type="vec4d">
.8 .8 .8 1.0
</diffuse>
<specular type="vec4d">
0.0 0.0 0.0 1.0
</specular>
<emissive type="vec4d">
0.0 0.0 0.0 1.0
</emissive>
<shininess>1.2</shininess>
</material>
<texture n="6">
<image>Textures/perlin.png</image>
<type>2d</type>
<filter>nearest</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="7">
<image>Textures/Globe/ocean_depth_1.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="8">
<image>Textures/Terrain/sand6.png</image>
<type>2d</type>
<filter>nearest</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="10">
<image>Textures/Terrain/snow3.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="11">
<image>Textures/Terrain/void.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="12">
<image>Textures/Terrain/void.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="13">
<image>Textures/Terrain/rock_alt.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="14">
<image>Textures/Terrain/grain_texture.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="15">
<image>Textures/Terrain/void.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<transparent>false</transparent>
<render-bin>
<bin-number>0</bin-number>
<bin-name>RenderBin</bin-name>
</render-bin>
<material-id>0</material-id>
<raise_vertex type="bool">false</raise_vertex>
2021-01-23 17:15:12 +00:00
<visibility><use>/environment/ground-visibility-m</use></visibility>
<avisibility><use>/environment/visibility-m</use></avisibility>
<lthickness><use>/environment/ground-haze-thickness-m</use></lthickness>
<scattering><use>/rendering/scene/scattering</use></scattering>
<ground_scattering><use>/environment/surface/scattering</use></ground_scattering>
<terminator><use>/environment/terminator-relative-position-m</use></terminator>
<terrain_alt><use>/environment/mean-terrain-elevation-m</use></terrain_alt>
<overcast><use>/rendering/scene/overcast</use></overcast>
<eye_alt><use>/sim/rendering/eye-altitude-m</use></eye_alt>
<snow_level><use>/environment/snow-level-m</use></snow_level>
<snow_thickness_factor><use>/environment/surface/snow-thickness-factor</use></snow_thickness_factor>
<dust_cover_factor><use>/environment/surface/dust-cover-factor</use></dust_cover_factor>
<lichen_cover_factor><use>/environment/surface/lichen-cover-factor</use></lichen_cover_factor>
<wetness><use>/environment/surface/wetness</use></wetness>
<fogtype><use>/sim/rendering/shaders/skydome</use></fogtype>
<fogstructure><use>/environment/fog-structure</use></fogstructure>
<cloud_self_shading><use>/environment/cloud-self-shading</use></cloud_self_shading>
<moonlight><use>/environment/moonlight</use></moonlight>
<season><use>/environment/season</use></season>
<air_pollution><use>/environment/air-pollution-norm</use></air_pollution>
<delta_T><use>/environment/surface/delta-T-soil</use></delta_T>
<wind_effects><use>/sim/rendering/shaders/wind-effects</use></wind_effects>
<windE><use>/environment/sea/surface/wind-from-east-fps</use></windE>
<windN><use>/environment/sea/surface/wind-from-north-fps</use></windN>
<WaveFreq><use>/environment/wave/freq</use></WaveFreq>
<WaveAmp><use>/environment/wave/amp</use></WaveAmp>
<WaveSharp><use>/environment/wave/sharp</use></WaveSharp>
<WaveAngle><use>/environment/wave/angle</use></WaveAngle>
<WaveFactor><use>/environment/wave/factor</use></WaveFactor>
<sea_r><use>/environment/sea/color_r</use></sea_r>
<sea_g><use>/environment/sea/color_g</use></sea_g>
<sea_b><use>/environment/sea/color_b</use></sea_b>
<saturation><use>/rendering/scene/saturation</use></saturation>
2021-01-23 17:15:12 +00:00
<display_xsize><use>/sim/startup/xsize</use></display_xsize>
<display_ysize><use>/sim/startup/ysize</use></display_ysize>
<!--
2021-01-23 17:15:12 +00:00
<tile_width><use>/sim/rendering/texture-factor</use></tile_width>
-->
2021-01-23 17:15:12 +00:00
<view_pitch_offset><use>/sim/current-view/pitch-offset-deg</use></view_pitch_offset>
<view_heading_offset><use>/sim/current-view/heading-offset-deg</use></view_heading_offset>
<view_fov><use>/sim/current-view/field-of-view</use></view_fov>
<use_searchlight><use>/sim/rendering/als-secondary-lights/use-searchlight</use></use_searchlight>
<use_landing_light><use>/sim/rendering/als-secondary-lights/use-landing-light</use></use_landing_light>
<use_alt_landing_light><use>/sim/rendering/als-secondary-lights/use-alt-landing-light</use></use_alt_landing_light>
<landing_light1_offset><use>/sim/rendering/als-secondary-lights/landing-light1-offset-deg</use></landing_light1_offset>
<landing_light2_offset><use>/sim/rendering/als-secondary-lights/landing-light2-offset-deg</use></landing_light2_offset>
<landing_light3_offset><use>/sim/rendering/als-secondary-lights/landing-light3-offset-deg</use></landing_light3_offset>
<quality_level><use>/sim/rendering/shaders/landmass</use></quality_level>
<tquality_level><use>/sim/rendering/shaders/transition</use></tquality_level>
<use_filtering><use>/sim/rendering/als-filters/use-filtering</use></use_filtering>
<gamma><use>/sim/rendering/als-filters/gamma</use></gamma>
<brightness><use>/sim/rendering/als-filters/brightness</use></brightness>
<fact_grey><use>/sim/rendering/als-filters/grey-factor</use></fact_grey>
<fact_black><use>/sim/rendering/als-filters/black-factor</use></fact_black>
<use_night_vision><use>/sim/rendering/als-filters/use-night-vision</use></use_night_vision>
<use_IR_vision><use>/sim/rendering/als-filters/use-IR-vision</use></use_IR_vision>
<cloudpos1_x><use>/local-weather/cloud-shadows/cloudpos-x[0]</use></cloudpos1_x>
<cloudpos1_y><use>/local-weather/cloud-shadows/cloudpos-y[0]</use></cloudpos1_y>
<cloudpos2_x><use>/local-weather/cloud-shadows/cloudpos-x[1]</use></cloudpos2_x>
<cloudpos2_y><use>/local-weather/cloud-shadows/cloudpos-y[1]</use></cloudpos2_y>
<cloudpos3_x><use>/local-weather/cloud-shadows/cloudpos-x[2]</use></cloudpos3_x>
<cloudpos3_y><use>/local-weather/cloud-shadows/cloudpos-y[2]</use></cloudpos3_y>
<cloudpos4_x><use>/local-weather/cloud-shadows/cloudpos-x[3]</use></cloudpos4_x>
<cloudpos4_y><use>/local-weather/cloud-shadows/cloudpos-y[3]</use></cloudpos4_y>
<cloudpos5_x><use>/local-weather/cloud-shadows/cloudpos-x[4]</use></cloudpos5_x>
<cloudpos5_y><use>/local-weather/cloud-shadows/cloudpos-y[4]</use></cloudpos5_y>
<cloudpos6_x><use>/local-weather/cloud-shadows/cloudpos-x[5]</use></cloudpos6_x>
<cloudpos6_y><use>/local-weather/cloud-shadows/cloudpos-y[5]</use></cloudpos6_y>
<cloudpos7_x><use>/local-weather/cloud-shadows/cloudpos-x[6]</use></cloudpos7_x>
<cloudpos7_y><use>/local-weather/cloud-shadows/cloudpos-y[6]</use></cloudpos7_y>
<cloudpos8_x><use>/local-weather/cloud-shadows/cloudpos-x[7]</use></cloudpos8_x>
<cloudpos8_y><use>/local-weather/cloud-shadows/cloudpos-y[7]</use></cloudpos8_y>
<cloudpos9_x><use>/local-weather/cloud-shadows/cloudpos-x[8]</use></cloudpos9_x>
<cloudpos9_y><use>/local-weather/cloud-shadows/cloudpos-y[8]</use></cloudpos9_y>
<cloudpos10_x><use>/local-weather/cloud-shadows/cloudpos-x[9]</use></cloudpos10_x>
<cloudpos10_y><use>/local-weather/cloud-shadows/cloudpos-y[9]</use></cloudpos10_y>
<cloudpos11_x><use>/local-weather/cloud-shadows/cloudpos-x[10]</use></cloudpos11_x>
<cloudpos11_y><use>/local-weather/cloud-shadows/cloudpos-y[10]</use></cloudpos11_y>
<cloudpos12_x><use>/local-weather/cloud-shadows/cloudpos-x[11]</use></cloudpos12_x>
<cloudpos12_y><use>/local-weather/cloud-shadows/cloudpos-y[11]</use></cloudpos12_y>
<cloudpos13_x><use>/local-weather/cloud-shadows/cloudpos-x[12]</use></cloudpos13_x>
<cloudpos13_y><use>/local-weather/cloud-shadows/cloudpos-y[12]</use></cloudpos13_y>
<cloudpos14_x><use>/local-weather/cloud-shadows/cloudpos-x[13]</use></cloudpos14_x>
<cloudpos14_y><use>/local-weather/cloud-shadows/cloudpos-y[13]</use></cloudpos14_y>
<cloudpos15_x><use>/local-weather/cloud-shadows/cloudpos-x[14]</use></cloudpos15_x>
<cloudpos15_y><use>/local-weather/cloud-shadows/cloudpos-y[14]</use></cloudpos15_y>
<cloudpos16_x><use>/local-weather/cloud-shadows/cloudpos-x[15]</use></cloudpos16_x>
<cloudpos16_y><use>/local-weather/cloud-shadows/cloudpos-y[15]</use></cloudpos16_y>
<cloudpos17_x><use>/local-weather/cloud-shadows/cloudpos-x[16]</use></cloudpos17_x>
<cloudpos17_y><use>/local-weather/cloud-shadows/cloudpos-y[16]</use></cloudpos17_y>
<cloudpos18_x><use>/local-weather/cloud-shadows/cloudpos-x[17]</use></cloudpos18_x>
<cloudpos18_y><use>/local-weather/cloud-shadows/cloudpos-y[17]</use></cloudpos18_y>
<cloudpos19_x><use>/local-weather/cloud-shadows/cloudpos-x[18]</use></cloudpos19_x>
<cloudpos19_y><use>/local-weather/cloud-shadows/cloudpos-y[18]</use></cloudpos19_y>
<cloudpos20_x><use>/local-weather/cloud-shadows/cloudpos-x[19]</use></cloudpos20_x>
<cloudpos20_y><use>/local-weather/cloud-shadows/cloudpos-y[19]</use></cloudpos20_y>
<cloudpos_n_x><use>/local-weather/cloud-shadows/nearest-cloudpos-x</use></cloudpos_n_x>
<cloudpos_n_y><use>/local-weather/cloud-shadows/nearest-cloudpos-y</use></cloudpos_n_y>
<cloud_shadow_flag><use>/local-weather/cloud-shadows/cloud-shadow-flag</use></cloud_shadow_flag>
<!-- BEGIN shadows include -->
2021-01-23 17:15:12 +00:00
<shadows_enabled><use>/sim/rendering/als/shadows/enabled</use></shadows_enabled>
<sun_atlas_size><use>/sim/rendering/als/shadows/sun-atlas-size</use></sun_atlas_size>
<!-- END shadows include -->
</parameters>
<!-- put techniques at a "high" index to allow derived effects to
insert their own techniques first. -->
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
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
<!--
ALS ultra shaders. The 1st pass of ws30-overlay.eff is a copy of
this pass, and changes should be made there as well.
-->
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<technique n="5">
<predicate>
<and>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<property>/sim/rendering/shaders/skydome</property>
2021-11-06 16:21:58 +00:00
<and>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<less-equal>
<value type="float">6.0</value>
<float-property>/sim/rendering/shaders/landmass</float-property>
</less-equal>
<less-equal>
<value type="float">6.0</value>
<float-property>/sim/rendering/shaders/transition</float-property>
</less-equal>
2021-11-06 16:21:58 +00:00
</and>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
<pass>
<lighting>true</lighting>
<material>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<!-- texture unit 0 direct from VPBBuilder.cxx -->
<texture-unit>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<unit>1</unit>
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<texture-unit>
<unit>2</unit>
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image><use>texture[6]/image</use></image>
<filter><use>texture[6]/filter</use></filter>
<wrap-s><use>texture[6]/wrap-s</use></wrap-s>
<wrap-t><use>texture[6]/wrap-t</use></wrap-t>
<internal-format><use>texture[6]/internal-format</use></internal-format>
</texture-unit>
2022-11-20 19:51:12 +00:00
<!-- texture unit 7 direct from VPBBuilder.cxx -->
<texture-unit>
<unit>8</unit>
<image><use>texture[8]/image</use></image>
<filter><use>texture[8]/filter</use></filter>
<wrap-s><use>texture[8]/wrap-s</use></wrap-s>
<wrap-t><use>texture[8]/wrap-t</use></wrap-t>
<internal-format><use>texture[8]/internal-format</use></internal-format>
</texture-unit>
2021-11-06 16:21:58 +00:00
<program>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<vertex-shader>Shaders/ws30-ALS-ultra.vert</vertex-shader>
<vertex-shader>Shaders/filters-ALS.vert</vertex-shader>
2021-11-06 16:21:58 +00:00
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<fragment-shader>Shaders/ws30-ALS-ultra.frag</fragment-shader>
<fragment-shader>Shaders/ws30-ALS-landclass-search-functions.frag</fragment-shader>
<fragment-shader>Shaders/ws30-water.frag</fragment-shader>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/cloud-shadowfunc.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
2021-11-06 16:21:58 +00:00
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<fragment-shader>Shaders/clustered-include.frag</fragment-shader>
</program>
<uniform>
<name>quality_level</name>
<type>int</type>
<value><use>quality_level</use></value>
</uniform>
2021-11-06 16:21:58 +00:00
<uniform>
<name>visibility</name>
<type>float</type>
<value><use>visibility</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>avisibility</name>
<type>float</type>
<value><use>avisibility</use></value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value><use>lthickness</use></value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value><use>scattering</use></value>
</uniform>
<uniform>
<name>ground_scattering</name>
<type>float</type>
<value><use>ground_scattering</use></value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value><use>terminator</use></value>
</uniform>
<uniform>
<name>terrain_alt</name>
<type>float</type>
<value><use>terrain_alt</use></value>
</uniform>
<uniform>
<name>overcast</name>
<type>float</type>
<value><use>overcast</use></value>
</uniform>
<uniform>
<name>eye_alt</name>
<type>float</type>
<value><use>eye_alt</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>eye_lat</name>
<type>float</type>
<value><use>eye_lat</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>eye_lon</name>
<type>float</type>
<value><use>eye_lon</use></value>
</uniform>
<uniform>
<name>snowlevel</name>
<type>float</type>
<value><use>snow_level</use></value>
</uniform>
<uniform>
<name>snow_thickness_factor</name>
<type>float</type>
<value><use>snow_thickness_factor</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>dust_cover_factor</name>
<type>float</type>
<value><use>dust_cover_factor</use></value>
</uniform>
<uniform>
<name>lichen_cover_factor</name>
<type>float</type>
<value> <use>lichen_cover_factor</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>wetness</name>
<type>float</type>
<value><use>wetness</use></value>
</uniform>
<uniform>
<name>fogstructure</name>
<type>float</type>
<value><use>fogstructure</use></value>
</uniform>
<uniform>
<name>cloud_self_shading</name>
<type>float</type>
<value><use>cloud_self_shading</use></value>
</uniform>
<uniform>
<name>moonlight</name>
<type>float</type>
<value><use>moonlight</use></value>
</uniform>
<uniform>
<name>season</name>
<type>float</type>
<value><use>season</use></value>
</uniform>
<uniform>
<name>air_pollution</name>
<type>float</type>
<value><use>air_pollution</use></value>
</uniform>
<!-- secondary lights -->
<uniform>
<name>view_pitch_offset</name>
<type>float</type>
<value><use>view_pitch_offset</use></value>
</uniform>
<uniform>
<name>view_heading_offset</name>
<type>float</type>
<value><use>view_heading_offset</use></value>
</uniform>
<uniform>
<name>field_of_view</name>
<type>float</type>
<value><use>view_fov</use></value>
</uniform>
<uniform>
<name>landing_light1_offset</name>
<type>float</type>
<value><use>landing_light1_offset</use></value>
</uniform>
<uniform>
<name>landing_light2_offset</name>
<type>float</type>
<value><use>landing_light2_offset</use></value>
</uniform>
<uniform>
<name>landing_light3_offset</name>
<type>float</type>
<value><use>landing_light3_offset</use></value>
</uniform>
<!-- filtering -->
<uniform>
<name>gamma</name>
<type>float</type>
<value><use>gamma</use></value>
</uniform>
<uniform>
<name>brightness</name>
<type>float</type>
<value><use>brightness</use></value>
</uniform>
<uniform>
<name>use_night_vision</name>
<type>bool</type>
<value><use>use_night_vision</use></value>
</uniform>
<uniform>
<name>use_IR_vision</name>
<type>bool</type>
<value><use>use_IR_vision</use></value>
</uniform>
<uniform>
<name>use_filtering</name>
<type>bool</type>
<value><use>use_filtering</use></value>
</uniform>
<uniform>
<name>delta_T</name>
<type>float</type>
<value><use>delta_T</use></value>
</uniform>
<uniform>
<name>fact_grey</name>
<type>float</type>
<value><use>fact_grey</use></value>
</uniform>
<uniform>
<name>fact_black</name>
<type>float</type>
<value><use>fact_black</use></value>
</uniform>
<!-- cloud shadows -->
<uniform>
<name>cloudpos1_x</name>
<type>float</type>
<value><use>cloudpos1_x</use></value>
</uniform>
<uniform>
<name>cloudpos1_y</name>
<type>float</type>
<value><use>cloudpos1_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos2_x</name>
<type>float</type>
<value><use>cloudpos2_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos2_y</name>
<type>float</type>
<value><use>cloudpos2_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos3_x</name>
<type>float</type>
<value><use>cloudpos3_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos3_y</name>
<type>float</type>
<value><use>cloudpos3_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos4_x</name>
<type>float</type>
<value><use>cloudpos4_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos4_y</name>
<type>float</type>
<value><use>cloudpos4_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos5_x</name>
<type>float</type>
<value><use>cloudpos5_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos5_y</name>
<type>float</type>
<value><use>cloudpos5_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos6_x</name>
<type>float</type>
<value><use>cloudpos6_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos6_y</name>
<type>float</type>
<value><use>cloudpos6_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos7_x</name>
<type>float</type>
<value><use>cloudpos7_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos7_y</name>
<type>float</type>
<value><use>cloudpos7_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos8_x</name>
<type>float</type>
<value><use>cloudpos8_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos8_y</name>
<type>float</type>
<value><use>cloudpos8_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos9_x</name>
<type>float</type>
<value><use>cloudpos9_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos9_y</name>
<type>float</type>
<value><use>cloudpos9_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos10_x</name>
<type>float</type>
<value><use>cloudpos10_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos10_y</name>
<type>float</type>
<value><use>cloudpos10_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos11_x</name>
<type>float</type>
<value><use>cloudpos11_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos11_y</name>
<type>float</type>
<value><use>cloudpos11_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos12_x</name>
<type>float</type>
<value><use>cloudpos12_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos12_y</name>
<type>float</type>
<value><use>cloudpos12_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos13_x</name>
<type>float</type>
<value><use>cloudpos13_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos13_y</name>
<type>float</type>
<value><use>cloudpos13_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos14_x</name>
<type>float</type>
<value><use>cloudpos14_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos14_y</name>
<type>float</type>
<value><use>cloudpos14_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos15_x</name>
<type>float</type>
<value><use>cloudpos15_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos15_y</name>
<type>float</type>
<value><use>cloudpos15_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos16_x</name>
<type>float</type>
<value><use>cloudpos16_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos16_y</name>
<type>float</type>
<value><use>cloudpos16_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos17_x</name>
<type>float</type>
<value><use>cloudpos17_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos17_y</name>
<type>float</type>
<value><use>cloudpos17_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos18_x</name>
<type>float</type>
<value><use>cloudpos18_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos18_y</name>
<type>float</type>
<value><use>cloudpos18_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos19_x</name>
<type>float</type>
<value><use>cloudpos19_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos19_y</name>
<type>float</type>
<value><use>cloudpos19_y</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos20_x</name>
<type>float</type>
<value><use>cloudpos20_x</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>cloudpos20_y</name>
<type>float</type>
<value><use>cloudpos20_y</use></value>
</uniform>
<uniform>
<name>saturation</name>
<type>float</type>
<value><use>saturation</use></value>
</uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<uniform>
<name>WindE</name>
<type>float</type>
<value><use>windE</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>WindN</name>
<type>float</type>
<value><use>windN</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>WaveFreq</name>
<type>float</type>
<value>
<use>WaveFreq</use>
</value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>WaveAmp</name>
<type>float</type>
<value>
<use>WaveAmp</use>
</value>
2021-11-06 16:21:58 +00:00
</uniform>
<uniform>
<name>WaveSharp</name>
<type>float</type>
<value>
<use>WaveSharp</use>
</value>
</uniform>
<uniform>
<name>WaveAngle</name>
<type>float</type>
<value>
<use>WaveAngle</use>
</value>
</uniform>
<uniform>
<name>WaveFactor</name>
<type>float</type>
<value>
<use>WaveFactor</use>
</value>
</uniform>
<uniform>
<name>WaveDAngle</name>
<type>float</type>
<value>
<use>WaveDAngle</use>
</value>
</uniform>
<!-- sea colors -->
<uniform>
<name>sea_r</name>
<type>float</type>
<value>
<use>sea_r</use>
</value>
</uniform>
<uniform>
<name>sea_g</name>
<type>float</type>
<value>
<use>sea_g</use>
</value>
</uniform>
<uniform>
<name>sea_b</name>
<type>float</type>
<value>
<use>sea_b</use>
</value>
</uniform>
<uniform>
<name>ocean_flag</name>
<type>int</type>
<value><use>ocean_flag</use></value>
</uniform>
<uniform>
<name>use_searchlight</name>
<type>int</type>
<value> <use>use_searchlight</use></value>
</uniform>
<uniform>
<name>use_landing_light</name>
<type>int</type>
<value> <use>use_landing_light</use></value>
</uniform>
<uniform>
<name>use_alt_landing_light</name>
<type>int</type>
<value> <use>use_alt_landing_light</use></value>
2021-11-06 16:21:58 +00:00
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>display_xsize</name>
<type>int</type>
<value><use>display_xsize</use></value>
2021-11-06 16:21:58 +00:00
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>display_ysize</name>
<type>int</type>
<value><use>display_ysize</use></value>
</uniform>
<uniform>
<name>wind_effects</name>
<type>int</type>
<value><use>wind_effects</use></value>
</uniform>
<uniform>
<name>cloud_shadow_flag</name>
<type>int</type>
<value><use>cloud_shadow_flag</use></value>
2021-11-06 16:21:58 +00:00
</uniform>
<uniform>
<name>raise_vertex</name>
<type>bool</type>
<value> <use>raise_vertex</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>landclass</name>
2021-11-06 16:21:58 +00:00
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<uniform>
<name>textureArray</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>perlin</name>
<type>sampler-2d</type>
<value type="int">6</value>
</uniform>
<uniform>
<name>coastline</name>
<type>sampler-2d</type>
<value type="int">7</value>
</uniform>
<uniform>
<name>sand</name>
<type>sampler-2d</type>
<value type="int">8</value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>swatch_size</name>
<type>int</type>
<!--
Testing: hardcoded placeholder to allow noise to be calculated while looking up textures
<value><use>xsize</use></value>
-->
<value>2000</value>
</uniform>
2021-11-06 16:21:58 +00:00
<uniform>
<name>colorMode</name>
<type>int</type>
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
</pass>
</technique>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<!-- ALS High and Medium settings technique.
Uses quality_level and tquality_level uniforms to change quality in fragment shader.
-->
<technique n="6">
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<predicate>
<and>
<property>/sim/rendering/shaders/skydome</property>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<or>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<less-equal>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<value type="float">4.0</value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<float-property>/sim/rendering/shaders/landmass</float-property>
</less-equal>
<less-equal>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<value type="float">3.0</value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<float-property>/sim/rendering/shaders/transition</float-property>
</less-equal>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</or>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
<pass>
<lighting>true</lighting>
<material>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
<!-- texture unit 0 direct from VPBBuilder.cxx -->
<texture-unit>
<unit>1</unit>
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image><use>texture[6]/image</use></image>
<filter><use>texture[6]/filter</use></filter>
<wrap-s><use>texture[6]/wrap-s</use></wrap-s>
<wrap-t><use>texture[6]/wrap-t</use></wrap-t>
<internal-format><use>texture[6]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>8</unit>
<image><use>texture[8]/image</use></image>
<filter><use>texture[8]/filter</use></filter>
<wrap-s><use>texture[8]/wrap-s</use></wrap-s>
<wrap-t><use>texture[8]/wrap-t</use></wrap-t>
<internal-format><use>texture[8]/internal-format</use></internal-format>
</texture-unit>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<program>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<vertex-shader>Shaders/ws30-ALS-detailed.vert</vertex-shader>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<vertex-shader>Shaders/filters-ALS.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<fragment-shader>Shaders/ws30-ALS-detailed.frag</fragment-shader>
<fragment-shader>Shaders/ws30-ALS-landclass-search-functions.frag</fragment-shader>
<fragment-shader>Shaders/ws30-water.frag</fragment-shader>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<fragment-shader>Shaders/clustered-include.frag</fragment-shader>
</program>
<uniform>
<name>visibility</name>
<type>float</type>
<value><use>visibility</use></value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value><use>avisibility</use></value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value><use>lthickness</use></value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value><use>scattering</use></value>
</uniform>
<uniform>
<name>ground_scattering</name>
<type>float</type>
<value><use>ground_scattering</use></value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value><use>terminator</use></value>
</uniform>
<uniform>
<name>terrain_alt</name>
<type>float</type>
<value><use>terrain_alt</use></value>
</uniform>
<uniform>
<name>overcast</name>
<type>float</type>
<value><use>overcast</use></value>
</uniform>
<uniform>
<name>eye_alt</name>
<type>float</type>
<value><use>eye_alt</use></value>
</uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<uniform>
<name>snowlevel</name>
<type>float</type>
<value><use>snow_level</use></value>
</uniform>
<uniform>
<name>snow_thickness_factor</name>
<type>float</type>
<value><use>snow_thickness_factor</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>dust_cover_factor</name>
<type>float</type>
<value><use>dust_cover_factor</use></value>
</uniform>
<uniform>
<name>lichen_cover_factor</name>
<type>float</type>
<value> <use>lichen_cover_factor</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>wetness</name>
<type>float</type>
<value><use>wetness</use></value>
</uniform>
<uniform>
<name>fogstructure</name>
<type>float</type>
<value><use>fogstructure</use></value>
</uniform>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<uniform>
<name>cloud_self_shading</name>
<type>float</type>
<value><use>cloud_self_shading</use></value>
</uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<uniform>
<name>air_pollution</name>
<type>float</type>
<value><use>air_pollution</use></value>
</uniform>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<uniform>
<name>moonlight</name>
<type>float</type>
<value><use>moonlight</use></value>
</uniform>
<uniform>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<name>season</name>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<type>float</type>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<value><use>season</use></value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
</uniform>
<uniform>
<name>saturation</name>
<type>float</type>
<value><use>saturation</use></value>
</uniform>
<uniform>
<name>WindE</name>
<type>float</type>
<value>
<use>windE</use>
</value>
</uniform>
<uniform>
<name>WindN</name>
<type>float</type>
<value>
<use>windN</use>
</value>
</uniform>
<uniform>
<name>WaveFreq</name>
<type>float</type>
<value>
<use>WaveFreq</use>
</value>
</uniform>
<uniform>
<name>WaveAmp</name>
<type>float</type>
<value>
<use>WaveAmp</use>
</value>
</uniform>
<uniform>
<name>WaveSharp</name>
<type>float</type>
<value>
<use>WaveSharp</use>
</value>
</uniform>
<uniform>
<name>WaveAngle</name>
<type>float</type>
<value>
<use>WaveAngle</use>
</value>
</uniform>
<uniform>
<name>WaveFactor</name>
<type>float</type>
<value>
<use>WaveFactor</use>
</value>
</uniform>
<uniform>
<name>WaveDAngle</name>
<type>float</type>
<value>
<use>WaveDAngle</use>
</value>
</uniform>
<!-- sea colors -->
<uniform>
<name>sea_r</name>
<type>float</type>
<value>
<use>sea_r</use>
</value>
</uniform>
<uniform>
<name>sea_g</name>
<type>float</type>
<value>
<use>sea_g</use>
</value>
</uniform>
<uniform>
<name>sea_b</name>
<type>float</type>
<value>
<use>sea_b</use>
</value>
</uniform>
<uniform>
<name>ocean_flag</name>
<type>int</type>
<value><use>ocean_flag</use></value>
</uniform> <!-- filtering -->
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<uniform>
<name>gamma</name>
<type>float</type>
<value><use>gamma</use></value>
</uniform>
<uniform>
<name>brightness</name>
<type>float</type>
<value><use>brightness</use></value>
</uniform>
<uniform>
<name>use_night_vision</name>
<type>bool</type>
<value><use>use_night_vision</use></value>
</uniform>
<uniform>
<name>use_IR_vision</name>
<type>bool</type>
<value><use>use_IR_vision</use></value>
</uniform>
<uniform>
<name>use_filtering</name>
<type>bool</type>
<value><use>use_filtering</use></value>
</uniform>
<uniform>
<name>delta_T</name>
<type>float</type>
<value><use>delta_T</use></value>
</uniform>
<uniform>
<name>fact_grey</name>
<type>float</type>
<value><use>fact_grey</use></value>
</uniform>
<uniform>
<name>fact_black</name>
<type>float</type>
<value><use>fact_black</use></value>
</uniform>
<uniform>
<name>display_xsize</name>
<type>int</type>
<value><use>display_xsize</use></value>
</uniform>
<uniform>
<name>display_ysize</name>
<type>int</type>
<value><use>display_ysize</use></value>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
</uniform>
<uniform>
<name>quality_level</name>
<type>int</type>
<value><use>quality_level</use></value>
</uniform>
<uniform>
<name>tquality_level</name>
<type>int</type>
<value><use>tquality_level</use></value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
</uniform>
<uniform>
<name>landclass</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>textureArray</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>perlin</name>
<type>sampler-2d</type>
<value type="int">6</value>
2022-11-20 19:51:12 +00:00
</uniform>
<uniform>
<name>coastline</name>
<type>sampler-2d</type>
<value type="int">7</value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
</uniform>
<uniform>
<name>sand</name>
<type>sampler-2d</type>
<value type="int">8</value>
</uniform>
<uniform>
<name>swatch_size</name>
<type>int</type>
<value><use>xsize</use></value>
</uniform>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<value>
<use>shadows_enabled</use>
</value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<value>
<use>sun_atlas_size</use>
</value>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
</uniform>
<!-- END shadows include -->
</pass>
</technique>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<!-- ALS low settings technique -->
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<technique n="7">
<predicate>
<and>
<property>/sim/rendering/shaders/skydome</property>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
2021-01-23 17:15:12 +00:00
<pass>
<lighting>true</lighting>
<material>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
2021-01-23 17:15:12 +00:00
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
2021-01-23 17:15:12 +00:00
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
2021-01-23 17:15:12 +00:00
<!-- texture unit 0 direct from VPBBuilder.cxx -->
<texture-unit>
<unit>1</unit>
2021-01-23 17:15:12 +00:00
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
2021-01-23 17:15:12 +00:00
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
2021-01-23 17:15:12 +00:00
<texture-unit>
<unit>2</unit>
2021-01-23 17:15:12 +00:00
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
2021-01-23 17:15:12 +00:00
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
2021-01-23 17:15:12 +00:00
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image><use>texture[6]/image</use></image>
<filter><use>texture[6]/filter</use></filter>
<wrap-s><use>texture[6]/wrap-s</use></wrap-s>
<wrap-t><use>texture[6]/wrap-t</use></wrap-t>
<internal-format><use>texture[6]/internal-format</use></internal-format>
</texture-unit>
<program>
2021-01-23 17:15:12 +00:00
<vertex-shader>Shaders/ws30-ALS.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
2021-01-23 17:15:12 +00:00
<fragment-shader>Shaders/ws30-ALS.frag</fragment-shader>
WS30 shaders: Add WS3 detailed technique using the "6" slot. Port the ALS haze, lighting, and math parts of the detailed and ultra shaders. The texture lookups are left out. Shader selection based on terrain quality setting: - Ultra - ws30-ALS-ultra frag/vert. - High and Medium - ws30-ALS-detailed frag/vert. The shaders switch code paths based on quality level uniform. - Low - ws30-ALS frag/vert. Changelog: ws30-ALS vertex shaders: - Ambient colour material colour doesn't seem to be used in the vertex shader, and isn't sent to fragment shaders currently. Regional materials only define non-default ambient colour of vec4(0.0) for water, ocean etc. Otherwise the default value of vec4(0.2, 0.2, 0.2, 1.0) is used. ws30-ALS.frag: - Set alpha of color to diffuse_term.a, to be consistent with WS2 implementation. ws30-ALS-ultra.frag and ws30-ALS-detailed.frag - World pos is assigned a value to allow noise functions to compile. - Swatch_size is temporarily set to 2000m instead of the xsize texture dimension to allow noise math to run while landclass search and texture arrays are being looked up. Swatch_size is used to adjust the wavelength of multiple overlay mixing noise wavelengths based on how far the textures are stretched (WiP WS2 feature). There are some noise calculations that could run while the first landclass lookup happens. If this is not enough, the selection of calculated noise wavelengths to add could change based on how far the textures are stretched, instead of changing the wavelengths at calculation time. - Move photoscenery technique no "4" after technique no "7" without changing the index (in case the low index is needed for photoscenery). This makes viewing a diff with the WS2 effect easier. Performance: Currently there's only 1 ground texture lookup and landclass transitions for that texture. The ultra shader looks up 5 more textures. Probably transitions for 1 more texture need to be supported, as often a base and overlay texture are mixed contributing heavily to visible colour. The math overhead is mostly present, except for noise math being better hidden than in the eventual version. Some of the texture array lookups in the full version may be hidden by the math - depending on GPU memory handling compared to calculation speed.
2021-11-09 14:25:09 +00:00
<fragment-shader>Shaders/ws30-ALS-landclass-search-functions.frag</fragment-shader>
<fragment-shader>Shaders/ws30-water.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
2021-08-21 16:15:15 +00:00
<fragment-shader>Shaders/clustered-include.frag</fragment-shader>
</program>
<uniform>
<name>tquality_level</name>
<type>int</type>
<value><use>tquality_level</use></value>
</uniform>
<uniform>
<name>cloud_self_shading</name>
<type>float</type>
<value><use>cloud_self_shading</use></value>
</uniform>
<uniform>
<name>visibility</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>visibility</use></value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>avisibility</use></value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>lthickness</use></value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>scattering</use></value>
</uniform>
<uniform>
<name>ground_scattering</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>ground_scattering</use></value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>terminator</use></value>
</uniform>
<uniform>
<name>terrain_alt</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>terrain_alt</use></value>
</uniform>
<uniform>
<name>overcast</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>overcast</use></value>
</uniform>
<uniform>
<name>eye_alt</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>eye_alt</use></value>
</uniform>
<uniform>
<name>cloud_self_shading</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>cloud_self_shading</use></value>
</uniform>
<uniform>
<name>moonlight</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>moonlight</use></value>
</uniform>
<uniform>
<name>air_pollution</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>air_pollution</use></value>
</uniform>
<uniform>
<name>saturation</name>
<type>float</type>
<value><use>saturation</use></value>
</uniform>
<uniform>
<name>WindE</name>
<type>float</type>
<value>
<use>windE</use>
</value>
</uniform>
<uniform>
<name>WindN</name>
<type>float</type>
<value>
<use>windN</use>
</value>
</uniform>
<uniform>
<name>WaveFreq</name>
<type>float</type>
<value>
<use>WaveFreq</use>
</value>
</uniform>
<uniform>
<name>WaveAmp</name>
<type>float</type>
<value>
<use>WaveAmp</use>
</value>
</uniform>
<uniform>
<name>WaveSharp</name>
<type>float</type>
<value>
<use>WaveSharp</use>
</value>
</uniform>
<uniform>
<name>WaveAngle</name>
<type>float</type>
<value>
<use>WaveAngle</use>
</value>
</uniform>
<uniform>
<name>WaveFactor</name>
<type>float</type>
<value>
<use>WaveFactor</use>
</value>
</uniform>
<uniform>
<name>WaveDAngle</name>
<type>float</type>
<value>
<use>WaveDAngle</use>
</value>
</uniform>
<!-- sea colors -->
<uniform>
<name>sea_r</name>
<type>float</type>
<value>
<use>sea_r</use>
</value>
</uniform>
<uniform>
<name>sea_g</name>
<type>float</type>
<value>
<use>sea_g</use>
</value>
</uniform>
<uniform>
<name>sea_b</name>
<type>float</type>
<value>
<use>sea_b</use>
</value>
</uniform>
<uniform>
<name>ocean_flag</name>
<type>int</type>
<value><use>ocean_flag</use></value>
</uniform>
<!-- filtering -->
<uniform>
<name>gamma</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>gamma</use></value>
</uniform>
<uniform>
<name>brightness</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>brightness</use></value>
</uniform>
<uniform>
<name>use_night_vision</name>
<type>bool</type>
2021-01-23 17:15:12 +00:00
<value><use>use_night_vision</use></value>
</uniform>
<uniform>
<name>use_IR_vision</name>
<type>bool</type>
2021-01-23 17:15:12 +00:00
<value><use>use_IR_vision</use></value>
</uniform>
<uniform>
<name>use_filtering</name>
<type>bool</type>
2021-01-23 17:15:12 +00:00
<value><use>use_filtering</use></value>
</uniform>
<uniform>
<name>delta_T</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>delta_T</use></value>
</uniform>
<uniform>
<name>fact_grey</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>fact_grey</use></value>
</uniform>
<uniform>
<name>fact_black</name>
<type>float</type>
2021-01-23 17:15:12 +00:00
<value><use>fact_black</use></value>
</uniform>
<uniform>
<name>display_xsize</name>
<type>int</type>
2021-01-23 17:15:12 +00:00
<value><use>display_xsize</use></value>
</uniform>
<uniform>
<name>display_ysize</name>
<type>int</type>
2021-01-23 17:15:12 +00:00
<value><use>display_ysize</use></value>
</uniform>
<uniform>
<name>landclass</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
WS30: landclass and texture lookups in fragment shader commit e131ffaca7b2c934474f0e447b5852cb4c7c8d4a Author: vs <vs2009@mail.com> Date: Fri Oct 15 22:19:42 2021 +1000 WS30: landclass and texture lookups in fragment shader: Changelog: - Testing: Procedural random landclass function, get_random_landclass(). 1). Avoids a texture lookup for profiling. 2). Creates squares of configurable size with controllable random landclass ranges - to test landclass transition algorithms and quickly profile lots of landclasses in view. It's also possible to put pressure on GPU memory even with 1 lookup of ground textures per fragment, by reducing size to <20m and viewing from altitude. - Add ALS ultra technique as no 5, move existing ALS technique to no. 6. Add WS30-ALS-ultra frag & vert in preparation for eventual ALS ultra port. Change comments/variables to match using a texture array instead of atlas. Sampler name: atlas -> textureArray. - Testing/optimisation of de-tiling: WS30-ALS.frag: reorder perlin detiling to make noise source easier to switch. WS30-ALS-ultra.frag: Create alternative to perlin noise used for reducing tiling that avoids a texture lookup - to profile and optimise. This is commented out. The performance difference in the final version depends on memory pressure versus arithmetic load of the full shader. It varies by GPU and what's in view. In future, once a full ALS port is done, maybe it'll be more efficient to run a higher quality de-tiling algorithm all the time to avoid branching overhead due to effects like agriculture which need more de-tiling. De-tiling code in shaders should /eventually/ match CPU-side de-tiling of texture masks used for object and vegetation placement. De-tiling code in GPUs might be subject to precision and numerical artifacts, and if so maybe the texture lookup version would work better. The same applies to noise used for rendering WS3 water waves and collision queries. One option is to use exactly the same glsl code, with a C++ header to convert glsl syntax e.g. https://github.com/g-truc/glm .
2021-10-21 20:31:03 +00:00
<name>textureArray</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
2021-01-23 17:15:12 +00:00
<value><use>shadows_enabled</use></value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
2021-01-23 17:15:12 +00:00
<value><use>sun_atlas_size</use></value>
</uniform>
<!-- END shadows include -->
</pass>
</technique>
2021-01-23 17:15:12 +00:00
<!-- Non-ALS technique with texture rotation -->
<technique n="11">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
<pass>
<lighting>true</lighting>
<material>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
<!-- texture unit 0 direct from VPBBuilder.cxx -->
<texture-unit>
<unit>1</unit>
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image><use>texture[6]/image</use></image>
<filter><use>texture[6]/filter</use></filter>
<wrap-s><use>texture[6]/wrap-s</use></wrap-s>
<wrap-t><use>texture[6]/wrap-t</use></wrap-t>
<internal-format><use>texture[6]/internal-format</use></internal-format>
</texture-unit>
<program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
<vertex-shader>Shaders/ws30.vert</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/ws30-q1.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<fragment-shader>Shaders/clustered-include.frag</fragment-shader>
</program>
<uniform>
<name>landclass</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>atlas</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>perlin</name>
<type>sampler-2d</type>
<value type="int">6</value>
</uniform>
<uniform>
<name>colorMode</name>
<type>int</type>
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
</pass>
</technique>
2021-01-23 17:15:12 +00:00
<!-- Minimal technique -->
<technique n="12">
<pass>
<lighting>true</lighting>
<material>
<ambient><use>material/ambient</use></ambient>
<diffuse><use>material/diffuse</use></diffuse>
<specular><use>material/specular</use></specular>
<emissive><use>material/emissive</use></emissive>
<shininess><use>material/shininess</use></shininess>
<color-mode>ambient-and-diffuse</color-mode>
</material>
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
<!-- texture unit 0 direct from VPBBuilder.cxx -->
2021-01-23 17:15:12 +00:00
<texture-unit>
<unit>1</unit>
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
2021-01-23 17:15:12 +00:00
<vertex-shader>Shaders/ws30.vert</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
2021-01-23 17:15:12 +00:00
<fragment-shader n="1">Shaders/ws30.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<fragment-shader>Shaders/clustered-include.frag</fragment-shader>
2021-01-23 17:15:12 +00:00
</program>
<uniform>
<name>landclass</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>atlas</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>colorMode</name>
<type>int</type>
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
2021-01-23 17:15:12 +00:00
</uniform>
</pass>
</technique>
2023-04-12 17:11:41 +00:00
<technique n="109">
<scheme>hdr-geometry</scheme>
<pass>
<!-- Reverse floating point depth buffer -->
<depth>
<function>gequal</function>
<near>1.0</near>
<far>0.0</far>
</depth>
<stencil>
<function>always</function>
<value>9</value>
<pass>replace</pass>
</stencil>
<blend><use>transparent</use></blend>
<alpha-test><use>transparent</use></alpha-test>
<shade-model>smooth</shade-model>
<cull-face>back</cull-face>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
<!-- texture unit 0 direct from VPBBuilder.cxx -->
<texture-unit>
<unit>1</unit>
<image><use>texture[1]/image</use></image>
<filter>nearest-mipmap-nearest</filter>
<mag-filter>nearest-mipmap-nearest</mag-filter>
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
<internal-format><use>texture[0]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image><use>texture[2]/image</use></image>
<filter><use>texture[2]/filter</use></filter>
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
<internal-format><use>texture[2]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>3</unit>
<image><use>texture[3]/image</use></image>
<filter><use>texture[3]/filter</use></filter>
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
<wrap-t><use>texture[3]/wrap-t</use></wrap-t>
<internal-format><use>texture[3]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>4</unit>
<image><use>texture[4]/image</use></image>
<filter><use>texture[4]/filter</use></filter>
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
<internal-format><use>texture[4]/internal-format</use></internal-format>
</texture-unit>
<texture-unit>
<unit>6</unit>
<image><use>texture[6]/image</use></image>
<filter><use>texture[6]/filter</use></filter>
<wrap-s><use>texture[6]/wrap-s</use></wrap-s>
<wrap-t><use>texture[6]/wrap-t</use></wrap-t>
<internal-format><use>texture[6]/internal-format</use></internal-format>
</texture-unit>
<cull-face>back</cull-face>
<program>
<vertex-shader>Shaders/HDR/terrain_default.vert</vertex-shader>
<fragment-shader>Shaders/HDR/ws30.frag</fragment-shader>
<fragment-shader>Shaders/HDR/gbuffer_pack.glsl</fragment-shader>
<fragment-shader>Shaders/HDR/normal_encoding.glsl</fragment-shader>
<fragment-shader>Shaders/HDR/color.glsl</fragment-shader>
</program>
<uniform>
<name>landclass</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>atlas</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>perlin</name>
<type>sampler-2d</type>
<value type="int">6</value>
</uniform>
</pass>
</technique>
</PropertyList>