mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
fix critical damage effect when temporal upscaling was enabled.
This commit is contained in:
parent
396c9edba7
commit
cdd12d441e
@ -399,7 +399,7 @@ void main() {
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
float textureLOD = bias();
|
||||
vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM, textureLOD) * color;
|
||||
|
||||
|
||||
#if defined HAND
|
||||
if (Albedo.a < 0.1) discard;
|
||||
#endif
|
||||
@ -553,7 +553,7 @@ void main() {
|
||||
vec2 PackLightmaps = vec2(torchlightmap, lmtexcoord.w);
|
||||
|
||||
vec4 data1 = clamp( encode(viewToWorld(normal), PackLightmaps), 0.0, 1.0);
|
||||
|
||||
|
||||
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
||||
|
||||
gl_FragData[2] = vec4(FlatNormals * 0.5 + 0.5, VanillaAO);
|
||||
|
@ -41,11 +41,11 @@ const bool colortex15Clear = false;
|
||||
|
||||
#ifdef SCREENSHOT_MODE
|
||||
/*
|
||||
const int colortex5Format = RGBA32F; //TAA buffer (everything)
|
||||
const int colortex5Format = RGBA32F;// TAA buffer (everything)
|
||||
*/
|
||||
#else
|
||||
/*
|
||||
const int colortex5Format = RGBA16F; //TAA buffer (everything)
|
||||
const int colortex5Format = R11F_G11F_B10F; // TAA buffer (everything)
|
||||
*/
|
||||
#endif
|
||||
|
||||
@ -374,7 +374,7 @@ vec4 computeTAA(vec2 texcoord, bool hand){
|
||||
#endif
|
||||
#ifdef DAMAGE_TAKEN_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
|
||||
|
||||
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() {
|
||||
/* DRAWBUFFERS:5 */
|
||||
|
||||
|
||||
#ifdef TAA
|
||||
|
||||
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;
|
||||
|
@ -3,6 +3,7 @@ const float LpvBlockBrightness = 1.0;
|
||||
|
||||
|
||||
float lpvCurve(float values) {
|
||||
// return values;
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user