mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
LOTS of fixes, changes, improvements. changes made is bloated because of a skill issue.
FIXED AND IMPROVED translucent rendering. FIXED random stuff from rendering over the hand. FIXED hand shading. FIXED blue horses. FIXED translucent lighting on the hand. FIXED translucent lighting on entities. IMPROVED colored shadows. IMPROVED SSAO application to the scene. IMPROVED subsurface scattering and give it more settings. IMPROVED bloom. ADD AgX tonemap and make it default.
This commit is contained in:
@ -7,9 +7,10 @@ uniform vec2 texelSize;
|
||||
uniform sampler2D depthtex0;
|
||||
uniform sampler2D depthtex1;
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
uniform sampler2D dhDepthTex;
|
||||
uniform sampler2D dhDepthTex1;
|
||||
|
||||
#endif
|
||||
uniform float near;
|
||||
uniform float far;
|
||||
|
||||
@ -44,7 +45,9 @@ void main() {
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float QuarterResDepth = texelFetch2D(dhDepthTex, ivec2(gl_FragCoord.xy*4), 0).x;
|
||||
if(newTex >= 1.0) newTex = QuarterResDepth;
|
||||
if(newTex >= 1.0) newTex = sqrt(QuarterResDepth);// + 0.0001;
|
||||
|
||||
gl_FragData[1].a = DH_ld(QuarterResDepth)*DH_ld(QuarterResDepth)*65000.0;
|
||||
#endif
|
||||
|
||||
if (newTex < 1.0)
|
||||
@ -52,28 +55,27 @@ void main() {
|
||||
else
|
||||
gl_FragData[0] = vec4(oldTex, 2.0);
|
||||
|
||||
float depth = texelFetch2D(depthtex1, ivec2(gl_FragCoord.xy*4), 0).x;
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float _near = near;
|
||||
float _far = far*4.0;
|
||||
if (depth >= 1.0) {
|
||||
depth = texelFetch2D(dhDepthTex1, ivec2(gl_FragCoord.xy*4), 0).x;
|
||||
_near = dhNearPlane;
|
||||
_far = dhFarPlane;
|
||||
}
|
||||
|
||||
depth = linearizeDepthFast(depth, _near, _far);
|
||||
depth = depth / dhFarPlane;
|
||||
#endif
|
||||
|
||||
if(depth < 1.0)
|
||||
gl_FragData[1] = vec4(vec3(0.0), depth * depth * 65000.0);
|
||||
else
|
||||
gl_FragData[1] = vec4(vec3(0.0), 65000.0);
|
||||
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
gl_FragData[1].a = DH_ld(QuarterResDepth)*DH_ld(QuarterResDepth)*65000.0;
|
||||
#endif
|
||||
// float depth = texelFetch2D(depthtex1, ivec2(gl_FragCoord.xy*4), 0).x;
|
||||
|
||||
// #ifdef DISTANT_HORIZONS
|
||||
// float _near = near;
|
||||
// float _far = far*4.0;
|
||||
// if (depth >= 1.0) {
|
||||
// depth = texelFetch2D(dhDepthTex1, ivec2(gl_FragCoord.xy*4), 0).x;
|
||||
// _near = dhNearPlane;
|
||||
// _far = dhFarPlane;
|
||||
// }
|
||||
|
||||
// depth = linearizeDepthFast(depth, _near, _far);
|
||||
// depth = depth / dhFarPlane;
|
||||
// #endif
|
||||
|
||||
// if(depth < 1.0)
|
||||
// gl_FragData[1] = vec4(vec3(0.0), depth * depth * 65000.0);
|
||||
// else
|
||||
// gl_FragData[1] = vec4(vec3(0.0), 65000.0);
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user