mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-26 18:22:33 +08:00
add heat effect when on fire
This commit is contained in:
@ -216,20 +216,11 @@ float mixhistory = 0.06;
|
|||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
// the idea is to store the 8 values, coverage + density of 3 cloud layers and 2 fog density values.
|
// the idea is to store the 8 values, coverage + density of 3 cloud layers and 2 fog density values.
|
||||||
|
if (gl_FragCoord.x > 1 && gl_FragCoord.x < 4 && gl_FragCoord.y > 1 && gl_FragCoord.y < 4){
|
||||||
|
mixhistory = 10.0 * frameTime;
|
||||||
|
|
||||||
// #ifdef Daily_Weather
|
gl_FragData[0].rgb = writeSceneControllerParameters(gl_FragCoord.xy, parameters.smallCumulus, parameters.largeCumulus, parameters.altostratus, parameters.fog);
|
||||||
if (gl_FragCoord.x > 1 && gl_FragCoord.x < 4 && gl_FragCoord.y > 1 && gl_FragCoord.y < 4){
|
}
|
||||||
mixhistory = 10.0 * frameTime;
|
|
||||||
|
|
||||||
gl_FragData[0].rgb = writeSceneControllerParameters(gl_FragCoord.xy, parameters.smallCumulus, parameters.largeCumulus, parameters.altostratus, parameters.fog);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vec4 superSampledHistory = texture2D(colortex5, previousPosition.xy);
|
|
||||||
// vec3 superSampledResult = superSampledHistory.rgb * superSampledHistory.a + currentFrame;
|
|
||||||
|
|
||||||
// return vec4(superSampledResult/(superSampledHistory.a+1.0), superSampledHistory.a+1.0);
|
|
||||||
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
/// --- STORE COLOR LUT --- ///
|
/// --- STORE COLOR LUT --- ///
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
uniform float exitWater;
|
uniform float exitWater;
|
||||||
uniform float enterWater;
|
uniform float enterWater;
|
||||||
|
uniform float exitLava;
|
||||||
// uniform float exitPowderSnow;
|
// uniform float exitPowderSnow;
|
||||||
uniform int isEyeInWater;
|
uniform int isEyeInWater;
|
||||||
|
|
||||||
@ -75,21 +76,33 @@ void applyGameplayEffects(inout vec3 color, in vec2 texcoord, float noise){
|
|||||||
distortmask = max(distortmask, waterDrops);
|
distortmask = max(distortmask, waterDrops);
|
||||||
}
|
}
|
||||||
if(enterWater > 0.0){
|
if(enterWater > 0.0){
|
||||||
vec2 zoomTC = 0.5 + (texcoord - 0.5) * (1.0 - (1.0-sqrt(1.0-enterWater)));
|
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);
|
float waterSplash = texture2D(noisetex, zoomTC * vec2(aspectRatio,1.0)).r * (1.0-enterWater);
|
||||||
|
|
||||||
distortmask = max(distortmask, waterSplash);
|
distortmask = max(distortmask, waterSplash);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
//////////////////////// HEAT DISTORTION /////////////////////
|
||||||
|
#if defined ON_FIRE_DISTORT_EFFECT
|
||||||
|
if(exitLava > 0.0){
|
||||||
|
vec2 zoomin = 0.5 + (texcoord - 0.5) * (1.0-pow(1.0-clamp(-texcoord.y*0.5+0.75,0.0,1.0),1.0)) * (1.0-pow(1.0-exitLava,2.0));
|
||||||
|
|
||||||
|
vec2 UV = zoomin;
|
||||||
|
|
||||||
|
float flameDistort = texture2D(noisetex, UV * vec2(aspectRatio,1.0) - vec2(0.0,frameTimeCounter*0.3)).b * clamp(-texcoord.y*0.3+0.3,0.0,1.0) * 0.75 * exitLava;
|
||||||
|
|
||||||
|
distortmask = max(distortmask, flameDistort);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////// APPLY DISTORTION /////////////////////
|
//////////////////////// APPLY DISTORTION /////////////////////
|
||||||
// all of the distortion will be based around zooming the UV in the center
|
// all of the distortion will be based around zooming the UV in the center
|
||||||
vec2 zoomUV = 0.5 + (texcoord - 0.5) * (1.0 - distortmask);
|
vec2 zoomUV = 0.5 + (texcoord - 0.5) * (1.0 - distortmask);
|
||||||
vec3 distortedColor = texture2D(colortex7, zoomUV).rgb;
|
vec3 distortedColor = texture2D(colortex7, zoomUV).rgb;
|
||||||
|
|
||||||
#ifdef WATER_ON_CAMERA_EFFECT
|
#if defined WATER_ON_CAMERA_EFFECT || defined ON_FIRE_DISTORT_EFFECT
|
||||||
// apply the distorted water color to the scene, but revert back to before when it ends
|
// apply the distorted water color to the scene, but revert back to before when it ends
|
||||||
if(exitWater > 0.01) color = distortedColor;
|
if(exitWater > 0.01 || exitLava > 0.01) color = distortedColor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -616,7 +616,7 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WATER_ON_CAMERA_EFFECT
|
#define WATER_ON_CAMERA_EFFECT
|
||||||
#define POWDERSNOW_FROST_CAMERA_EFFECT
|
#define ON_FIRE_DISTORT_EFFECT
|
||||||
|
|
||||||
#ifdef LOW_HEALTH_EFFECT
|
#ifdef LOW_HEALTH_EFFECT
|
||||||
#endif
|
#endif
|
||||||
@ -624,6 +624,8 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef WATER_ON_CAMERA_EFFECT
|
#ifdef WATER_ON_CAMERA_EFFECT
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ON_FIRE_DISTORT_EFFECT
|
||||||
|
#endif
|
||||||
|
|
||||||
// #define FLASHLIGHT
|
// #define FLASHLIGHT
|
||||||
#define FLASHLIGHT_SPECULAR
|
#define FLASHLIGHT_SPECULAR
|
||||||
|
@ -324,7 +324,7 @@ SHADER_VERSION_LABEL <empty> \
|
|||||||
SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL
|
SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL
|
||||||
|
|
||||||
### COOL GAMEPLAY EFFECTS
|
### COOL GAMEPLAY EFFECTS
|
||||||
screen.GAMEPLAY_EFFECTS = FLASHLIGHT [FLASHLIGHT_SETTING] MOTION_AMOUNT WATER_ON_CAMERA_EFFECT DAMAGE_TAKEN_EFFECT LOW_HEALTH_EFFECT LOW_HEALTH_EFFECT_START CRITICALLY_LOW_HEALTH_EFFECT_START
|
screen.GAMEPLAY_EFFECTS = FLASHLIGHT [FLASHLIGHT_SETTING] MOTION_AMOUNT WATER_ON_CAMERA_EFFECT DAMAGE_TAKEN_EFFECT ON_FIRE_DISTORT_EFFECT LOW_HEALTH_EFFECT LOW_HEALTH_EFFECT_START CRITICALLY_LOW_HEALTH_EFFECT_START
|
||||||
screen.FLASHLIGHT_SETTING.columns = 2
|
screen.FLASHLIGHT_SETTING.columns = 2
|
||||||
screen.FLASHLIGHT_SETTING = FLASHLIGHT FLASHLIGHT_R \
|
screen.FLASHLIGHT_SETTING = FLASHLIGHT FLASHLIGHT_R \
|
||||||
FLASHLIGHT_SPECULAR FLASHLIGHT_G \
|
FLASHLIGHT_SPECULAR FLASHLIGHT_G \
|
||||||
@ -474,6 +474,9 @@ uniform.bool.worldTimeChangeCheck = abs(smooth(sunAngle, 1.0, 1.0) - sunAngle) >
|
|||||||
uniform.float.exitWater = smooth(if(isEyeInWater == 1,1,0),0.0,5.0)
|
uniform.float.exitWater = smooth(if(isEyeInWater == 1,1,0),0.0,5.0)
|
||||||
uniform.float.enterWater = smooth(if(isEyeInWater == 1,1,0),1.5,0.0)
|
uniform.float.enterWater = smooth(if(isEyeInWater == 1,1,0),1.5,0.0)
|
||||||
#endif
|
#endif
|
||||||
|
#if defined ON_FIRE_DISTORT_EFFECT
|
||||||
|
uniform.float.exitLava = smooth(if(isEyeInWater == 2 || is_burning,1,0),0.5,3.0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT
|
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT
|
||||||
#ifdef IS_IRIS
|
#ifdef IS_IRIS
|
||||||
|
Reference in New Issue
Block a user