Cloud shadows for water shader effect
This commit is contained in:
parent
a05863e541
commit
572a720388
3 changed files with 531 additions and 121 deletions
|
@ -138,6 +138,48 @@
|
|||
<fogtype>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<!-- cloud shadows -->
|
||||
<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>
|
||||
<cloud_shadow_flag><use>/local-weather/cloud-shadows/cloud-shadow-flag</use></cloud_shadow_flag>
|
||||
<!-- sea colors -->
|
||||
<sea_r>
|
||||
<use>/environment/sea/color_r</use>
|
||||
|
@ -273,27 +315,6 @@
|
|||
<use>texture[3]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<!--<texture-unit>
|
||||
<unit>4</unit>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<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>5</unit>
|
||||
<image>
|
||||
|
@ -340,6 +361,7 @@
|
|||
<program>
|
||||
<vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/water_lightfield.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/cloud-shadowfunc.frag</fragment-shader>
|
||||
</program>
|
||||
<!--<uniform>
|
||||
<name>water_reflection</name>
|
||||
|
@ -510,6 +532,211 @@
|
|||
<type>float</type>
|
||||
<value><use>cloud_self_shading</use></value>
|
||||
</uniform>
|
||||
<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>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos2_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos2_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos3_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos3_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos4_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos4_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos5_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos5_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos6_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos6_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos7_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos7_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos8_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos8_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos9_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos9_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos10_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos10_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos11_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos11_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos12_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos12_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos13_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos13_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos14_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos14_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos15_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos15_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos16_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos16_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos17_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos17_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos18_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos18_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos19_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos19_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos20_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos20_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value><use>cloud_shadow_flag</use></value>
|
||||
</uniform>
|
||||
<!-- sea colors -->
|
||||
<uniform>
|
||||
<name>sea_r</name>
|
||||
|
|
|
@ -118,61 +118,67 @@
|
|||
</WaveDAngle>
|
||||
|
||||
<!-- fog include -->
|
||||
<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>
|
||||
<cloud_self_shading>
|
||||
<use>/environment/cloud-self-shading</use>
|
||||
</cloud_self_shading>
|
||||
<moonlight>
|
||||
<use>/environment/moonlight</use>
|
||||
</moonlight>
|
||||
<fogtype>
|
||||
<use>/sim/rendering/shaders/skydome</use>
|
||||
</fogtype>
|
||||
<fogstructure>
|
||||
<use>/environment/fog-structure</use>
|
||||
</fogstructure>
|
||||
<ice_cover>
|
||||
<use>/environment/sea/surface/ice-cover</use>
|
||||
</ice_cover>
|
||||
<quality_level>
|
||||
<use>/sim/rendering/shaders/landmass</use>
|
||||
</quality_level>
|
||||
<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>
|
||||
<cloud_self_shading><use>/environment/cloud-self-shading</use></cloud_self_shading>
|
||||
<moonlight><use>/environment/moonlight</use></moonlight>
|
||||
<fogtype><use>/sim/rendering/shaders/skydome</use></fogtype>
|
||||
<fogstructure><use>/environment/fog-structure</use></fogstructure>
|
||||
<ice_cover><use>/environment/sea/surface/ice-cover</use></ice_cover>
|
||||
<quality_level><use>/sim/rendering/shaders/landmass</use></quality_level>
|
||||
<!-- sea colors -->
|
||||
<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>
|
||||
<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>
|
||||
<!-- cloud shadows -->
|
||||
<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>
|
||||
<cloud_shadow_flag><use>/local-weather/cloud-shadows/cloud-shadow-flag</use></cloud_shadow_flag>
|
||||
<!-- END fog include -->
|
||||
</parameters>
|
||||
|
||||
|
@ -235,27 +241,7 @@
|
|||
<use>render-bin/bin-name</use>
|
||||
</bin-name>
|
||||
</render-bin>
|
||||
<!--<texture-unit>
|
||||
<unit>0</unit>
|
||||
<image>
|
||||
<use>texture[0]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[0]/type</use>
|
||||
</type>
|
||||
<filter>
|
||||
<use>texture[0]/filter</use>
|
||||
</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>
|
||||
|
@ -319,27 +305,6 @@
|
|||
<use>texture[7]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<!--<texture-unit>
|
||||
<unit>4</unit>
|
||||
<image>
|
||||
<use>texture[4]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[4]/type</use>
|
||||
</type>
|
||||
<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>5</unit>
|
||||
<image>
|
||||
|
@ -407,6 +372,7 @@
|
|||
<program>
|
||||
<vertex-shader>Shaders/water_lightfield.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/water_lightfield.frag</fragment-shader>
|
||||
<fragment-shader>Shaders/cloud-shadowfunc.frag</fragment-shader>
|
||||
</program>
|
||||
<!--<uniform>
|
||||
<name>water_reflection</name>
|
||||
|
@ -595,8 +561,213 @@
|
|||
<uniform>
|
||||
<name>ice_cover</name>
|
||||
<type>float</type>
|
||||
<value><use>ice_cover</use></value>
|
||||
</uniform>
|
||||
<value><use>ice_cover</use></value>
|
||||
</uniform>
|
||||
<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>
|
||||
<name>cloudpos2_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos2_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos2_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos2_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos3_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos3_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos3_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos4_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos4_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos4_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos5_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos5_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos5_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos6_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos6_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos6_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos7_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos7_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos7_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos8_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos8_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos8_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos9_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos9_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos9_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos10_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos10_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos10_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos11_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos11_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos11_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos12_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos12_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos12_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos13_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos13_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos13_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos14_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos14_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos14_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos15_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos15_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos15_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos16_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos16_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos16_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos17_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos17_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos17_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos18_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos18_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos18_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos19_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos19_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos19_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_x</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos20_x</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloudpos20_y</name>
|
||||
<type>float</type>
|
||||
<value><use>cloudpos20_y</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_shadow_flag</name>
|
||||
<type>int</type>
|
||||
<value><use>cloud_shadow_flag</use></value>
|
||||
</uniform>
|
||||
<!-- sea colors -->
|
||||
<uniform>
|
||||
<name>sea_r</name>
|
||||
|
|
|
@ -62,6 +62,7 @@ uniform float sea_b;
|
|||
|
||||
uniform int quality_level;
|
||||
uniform int ocean_flag;
|
||||
uniform int cloud_shadow_flag;
|
||||
|
||||
vec3 specular_light;
|
||||
|
||||
|
@ -72,11 +73,14 @@ const float EarthRadius = 5800000.0;
|
|||
////fog "include" /////
|
||||
//uniform int fogType;
|
||||
|
||||
vec3 fog_Func(vec3 color, int type);
|
||||
//vec3 fog_Func(vec3 color, int type);
|
||||
float shadow_func (in float x, in float y, in float noise, in float dist);
|
||||
//////////////////////
|
||||
|
||||
/////// functions /////////
|
||||
|
||||
|
||||
|
||||
float rand2D(in vec2 co){
|
||||
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
||||
}
|
||||
|
@ -297,6 +301,7 @@ void main(void)
|
|||
|
||||
float noise_50m = Noise3D(rawPos.xyz, 50.0);
|
||||
float noise_250m = Noise3D(rawPos.xyz,250.0);
|
||||
float noise_500m = Noise3D(rawPos.xyz,500.0);
|
||||
float noise_1500m = Noise3D(rawPos.xyz,1500.0);
|
||||
float noise_2000m = Noise3D(rawPos.xyz,2000.0);
|
||||
float noise_2500m = Noise3D(rawPos.xyz, 2500.0);
|
||||
|
@ -531,7 +536,14 @@ void main(void)
|
|||
|
||||
|
||||
vec4 finalColor;
|
||||
|
||||
|
||||
float shadowValue;
|
||||
if (cloud_shadow_flag == 1)
|
||||
{
|
||||
shadowValue = shadow_func(relPos.x, relPos.y, 0.3 * noise_250m + 0.5 * noise_500m+0.2 * noise_1500m, dist);
|
||||
specular = specular * shadowValue;
|
||||
refl = refl * (0.7 + 0.3 *shadowValue);
|
||||
}
|
||||
|
||||
|
||||
finalColor = refl + specular * smoothstep(0.3, 0.6, ground_scattering);
|
||||
|
|
Loading…
Reference in a new issue