mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Merge 07b17760ba
into 2d36d32da8
This commit is contained in:
commit
adf5ab45cd
21 changed files with 882 additions and 104 deletions
|
@ -169,6 +169,7 @@ void main(void)
|
|||
// Generate waves with Perlin-type noise.
|
||||
// The constants are calibrated such that they roughly
|
||||
// correspond to the old sine waves.
|
||||
// Note: The same thing is implemented in clientmap.cpp. Keep them consistent!
|
||||
vec3 wavePos = (mWorld * pos).xyz + cameraOffset;
|
||||
// The waves are slightly compressed along the z-axis to get
|
||||
// wave-fronts along the x-axis.
|
||||
|
|
|
@ -5,6 +5,9 @@ uniform lowp vec4 fogColor;
|
|||
uniform float fogDistance;
|
||||
uniform float fogShadingParameter;
|
||||
|
||||
// Only used for the wieldhand. 0 otherwise.
|
||||
uniform vec4 wield_posteffect_color;
|
||||
|
||||
// The cameraOffset is the current center of the visible world.
|
||||
uniform highp vec3 cameraOffset;
|
||||
uniform float animationTimer;
|
||||
|
@ -458,5 +461,12 @@ void main(void)
|
|||
col = mix(fogColor * pow(fogColor / fogColorMax, vec4(2.0 * clarity)), col, clarity);
|
||||
col = vec4(col.rgb, base.a);
|
||||
|
||||
// Apply posteffect color for the wieldhand, by blending it above this
|
||||
// fragment.
|
||||
// The alpha channel is not blended. The posteffect geometry behind the
|
||||
// wieldhand already makes the image less transparent.
|
||||
// wield_posteffect_color.rgb is premultiplied.
|
||||
col.rgb = col.rgb * (1.0 - wield_posteffect_color.a) + wield_posteffect_color.rgb;
|
||||
|
||||
gl_FragData[0] = col;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue