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:
Xonk
2024-05-04 21:08:24 -04:00
parent 343a68c816
commit 25a2284a60
70 changed files with 4096 additions and 1510 deletions

View File

@ -1,63 +1,28 @@
#version 120
//#extension GL_ARB_shader_texture_lod : disable
#include "/lib/settings.glsl"
varying vec4 color;
varying vec2 texcoord;
uniform sampler2D tex;
uniform sampler2D noisetex;
uniform int frameCounter;
uniform float frameTimeCounter;
uniform vec3 cameraPosition;
varying vec4 color;
#include "/lib/waterBump.glsl"
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
uniform mat4 gbufferProjectionInverse;
uniform mat4 gbufferModelViewInverse;
uniform mat4 gbufferModelView;
uniform mat4 shadowModelView;
uniform mat4 shadowModelViewInverse;
uniform mat4 shadowProjection;
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
vec3 toScreenSpace(vec3 p) {
vec4 iProjDiag = vec4(gbufferProjectionInverse[0].x, gbufferProjectionInverse[1].y, gbufferProjectionInverse[2].zw);
vec3 p3 = p * 2. - 1.;
vec4 fragposition = iProjDiag * p3.xyzz + gbufferProjectionInverse[3];
return fragposition.xyz / fragposition.w;
}
float blueNoise(){
return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 );
}
void main() {
gl_FragData[0] = texture2D(tex,texcoord.xy) * color;
#ifdef SHADOW_DISABLE_ALPHA_MIPMAPS
gl_FragData[0].a = texture2DLod(tex, texcoord.xy, 0).a;
#endif
gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a);
#ifdef Stochastic_Transparent_Shadows
if(gl_FragData[0].a < blueNoise()) { discard; return;}
#endif
#ifdef RENDER_ENTITY_SHADOWS
#endif
// if(materials > 0.95){
// // gl_FragData[0] = vec4(0.3,0.8,1.0,0.1);
// gl_FragData[0] = vec4(1.0,1.0,1.0,0.1);
// }
}