mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
more setup for scene controller, replace old weather stuff with it. fix vignette when entering/exitings water. added a water enter effect
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#endif
|
||||
|
||||
uniform float exitWater;
|
||||
uniform float enterWater;
|
||||
// uniform float exitPowderSnow;
|
||||
uniform int isEyeInWater;
|
||||
|
||||
@ -32,7 +33,6 @@ uniform int isEyeInWater;
|
||||
// uniform bool is_on_ground;
|
||||
// uniform bool isSpectator;
|
||||
|
||||
|
||||
void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
|
||||
// detect when health is zero
|
||||
@ -74,6 +74,12 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
// apply distortion effects for exiting water and under water
|
||||
distortmask = max(distortmask, waterDrops);
|
||||
}
|
||||
if(enterWater > 0.0){
|
||||
vec2 zoomTC = 0.5 + (texcoord - 0.5) * (1.0 - (1.0-sqrt(1.0-enterWater)));
|
||||
float waterSplash = texture2D(noisetex, zoomTC * vec2(aspectRatio,1.0)).r * (1.0-enterWater);
|
||||
|
||||
distortmask = max(distortmask, waterSplash);
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////// APPLY DISTORTION /////////////////////
|
||||
@ -86,6 +92,7 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
||||
if(exitWater > 0.01) color = distortedColor;
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////// APPLY COLOR EFFECTS /////////////////////
|
||||
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT
|
||||
vec3 distortedColorLuma = vec3(1.0, 0.0, 0.0) * dot(distortedColor, vec3(0.21, 0.72, 0.07));
|
||||
|
Reference in New Issue
Block a user