mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
fix critical damage effect when temporal upscaling was enabled.
This commit is contained in:
parent
396c9edba7
commit
cdd12d441e
@ -41,11 +41,11 @@ const bool colortex15Clear = false;
|
|||||||
|
|
||||||
#ifdef SCREENSHOT_MODE
|
#ifdef SCREENSHOT_MODE
|
||||||
/*
|
/*
|
||||||
const int colortex5Format = RGBA32F; //TAA buffer (everything)
|
const int colortex5Format = RGBA32F;// TAA buffer (everything)
|
||||||
*/
|
*/
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
const int colortex5Format = RGBA16F; //TAA buffer (everything)
|
const int colortex5Format = R11F_G11F_B10F; // TAA buffer (everything)
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ vec4 computeTAA(vec2 texcoord, bool hand){
|
|||||||
#endif
|
#endif
|
||||||
#ifdef DAMAGE_TAKEN_EFFECT
|
#ifdef DAMAGE_TAKEN_EFFECT
|
||||||
// when this triggers, use current frame UV to sample history, for a funny trailing effect.
|
// when this triggers, use current frame UV to sample history, for a funny trailing effect.
|
||||||
if(CriticalDamageTaken > 0.01) previousPosition.xy = adjTC;
|
if(CriticalDamageTaken > 0.01) previousPosition.xy = texcoord;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vec3 frameHistory = max(FastCatmulRom(colortex5, previousPosition.xy, vec4(texelSize, 1.0/texelSize), 0.75).xyz,0.0);
|
vec3 frameHistory = max(FastCatmulRom(colortex5, previousPosition.xy, vec4(texelSize, 1.0/texelSize), 0.75).xyz,0.0);
|
||||||
@ -410,10 +410,7 @@ vec4 computeTAA(vec2 texcoord, bool hand){
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
/* DRAWBUFFERS:5 */
|
/* DRAWBUFFERS:5 */
|
||||||
|
|
||||||
|
|
||||||
#ifdef TAA
|
#ifdef TAA
|
||||||
|
|
||||||
vec2 taauTC = clamp(texcoord*RENDER_SCALE, vec2(0.0), RENDER_SCALE - texelSize*2.0);
|
vec2 taauTC = clamp(texcoord*RENDER_SCALE, vec2(0.0), RENDER_SCALE - texelSize*2.0);
|
||||||
|
|
||||||
float dataUnpacked = decodeVec2(texelFetch2D(colortex1,ivec2(gl_FragCoord.xy*RENDER_SCALE),0).w).y;
|
float dataUnpacked = decodeVec2(texelFetch2D(colortex1,ivec2(gl_FragCoord.xy*RENDER_SCALE),0).w).y;
|
||||||
|
@ -3,6 +3,7 @@ const float LpvBlockBrightness = 1.0;
|
|||||||
|
|
||||||
|
|
||||||
float lpvCurve(float values) {
|
float lpvCurve(float values) {
|
||||||
|
// return values;
|
||||||
return pow(1.0 - sqrt(1.0-values), 2.0);
|
return pow(1.0 - sqrt(1.0-values), 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define SHADER_VERSION_LABEL 478 // [478]
|
#define SHADER_VERSION_LABEL 479 // [479]
|
||||||
|
|
||||||
#define saturate(x) clamp(x,0.0,1.0)
|
#define saturate(x) clamp(x,0.0,1.0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user