Use a Gray-Alpha texture for water depth information and use the globe-colors.jpg texture for water color.
This commit is contained in:
parent
6950670086
commit
055ce55be4
4 changed files with 39 additions and 4 deletions
|
@ -52,13 +52,21 @@
|
|||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n="7">
|
||||
<image>Textures/Globe/ocean_depth_1.jpg</image>
|
||||
<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/Globe/globe_colors.jpg</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="10">
|
||||
<image>Textures/Terrain/packice-overlay.png</image>
|
||||
<type>2d</type>
|
||||
|
@ -380,6 +388,27 @@
|
|||
<use>texture[10]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>8</unit>
|
||||
<image>
|
||||
<use>texture[8]/image</use>
|
||||
</image>
|
||||
<type>
|
||||
<use>texture[8]/type</use>
|
||||
</type>
|
||||
<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>
|
||||
|
||||
<program>
|
||||
<vertex-shader>Shaders/water-ALS.vert</vertex-shader>
|
||||
|
@ -425,6 +454,11 @@
|
|||
<type>sampler-2d</type>
|
||||
<value type="int">7</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>water_colormap</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">8</value>
|
||||
</uniform>
|
||||
<!-- normalmap is .dds-->
|
||||
<uniform>
|
||||
<name>normalmap_dds</name>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D water_normalmap;
|
||||
uniform sampler2D water_colormap;
|
||||
uniform sampler2D water_dudvmap;
|
||||
uniform sampler2D sea_foam;
|
||||
uniform sampler2D perlin_normalmap;
|
||||
|
@ -219,12 +220,12 @@ void main(void)
|
|||
float noise_2500m = Noise3D(rawPos.xyz, 2500.0);
|
||||
|
||||
// get depth map
|
||||
vec4 colorTexel = texture2D(water_colormap, TopoUV);
|
||||
vec4 topoTexel = texture2D(topo_map, TopoUV);
|
||||
topoTexel.a = 0.8*topoTexel.r+0.2*topoTexel.g;
|
||||
topoTexel.a = -topoTexel.a*topoTexel.a + 2*topoTexel.a;
|
||||
topoTexel.a = topoTexel.r;
|
||||
|
||||
float floorMixFactor = smoothstep(0.3, 0.985, topoTexel.a);
|
||||
vec3 floorColour = topoTexel.rgb;
|
||||
vec3 floorColour = colorTexel.rgb;
|
||||
|
||||
mat4 RotationMatrix;
|
||||
|
||||
|
|
Before Width: | Height: | Size: 8.6 MiB After Width: | Height: | Size: 8.6 MiB |
BIN
Textures/Globe/ocean_depth_1.png
Normal file
BIN
Textures/Globe/ocean_depth_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 MiB |
Loading…
Add table
Reference in a new issue