mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
re-add physics mod ocean support. tweak refraction strength falloff with distance
This commit is contained in:
@ -119,7 +119,7 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo
|
||||
|
||||
vec3 spos = clipPosition*vec3(RENDER_SCALE,1.0) + stepv*(dither-0.5);
|
||||
|
||||
#ifdef DEFERRED_SPECULAR
|
||||
#if defined DEFERRED_SPECULAR && defined TAA
|
||||
spos.xy += TAA_Offset*texelSize*0.5/RENDER_SCALE;
|
||||
#endif
|
||||
|
||||
@ -130,12 +130,9 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo
|
||||
|
||||
float sp = invLinZ(sqrt(texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4.0),0).a/65000.0));
|
||||
|
||||
// if(hand) convertHandDepth(sp);
|
||||
|
||||
float currZ = linZ(spos.z);
|
||||
float nextZ = linZ(sp);
|
||||
|
||||
// if(abs(nextZ-currZ) < mix(0.005,0.5,currZ*currZ) && sp < max(minZ,maxZ) && sp > min(minZ,maxZ)) return vec3(spos.xy/RENDER_SCALE,sp);
|
||||
if(sp < max(minZ,maxZ) && sp > min(minZ,maxZ)) return vec3(spos.xy/RENDER_SCALE,sp);
|
||||
|
||||
minZ = maxZ-biasAmount / currZ;
|
||||
@ -162,7 +159,7 @@ vec4 screenSpaceReflections(
|
||||
vec4 reflection = vec4(0.0);
|
||||
|
||||
float reflectionLength = 0.0;
|
||||
float quality = 30.0f;//mix(10.0f, 30.0f, fresnel);
|
||||
float quality = 30.0f;
|
||||
|
||||
vec3 raytracePos = rayTraceSpeculars(reflectedVector, viewPos, noise, quality, isHand, reflectionLength, fresnel);
|
||||
|
||||
|
Reference in New Issue
Block a user