few tweaks

This commit is contained in:
Xonk 2024-02-06 00:03:37 -05:00
parent a4e8419081
commit a80ee1b12e
3 changed files with 11 additions and 5 deletions

View File

@ -315,9 +315,15 @@ void main() {
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * Albedo;
// specular
vec3 reflectedVector = reflect(normalize(pos.xyz), normals);
float fresnel = pow(clamp(1.0 + dot(normals, normalize(pos.xyz)), 0.0, 1.0),5.0);
float normalDotEye = dot(normals, normalize(pos.xyz));
float fresnel = pow(clamp(1.0 + normalDotEye, 0.0, 1.0),5.0);
fresnel = mix(0.02, 1.0, fresnel);
#ifdef SNELLS_WINDOW
// snells window looking thing
if(isEyeInWater == 1 ) fresnel = pow(clamp(1.66 + normalDotEye,0.0,1.0), 25.0);
#endif
#ifdef WATER_REFLECTIONS
vec4 ssReflections = vec4(0);

View File

@ -550,7 +550,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
vec3 reflectedVector = reflect(normalize(viewPos), normal);
float normalDotEye = dot(normal, normalize(viewPos));
float fresnel = pow(clamp(1.0 + dot(normal, normalize(viewPos)), 0.0, 1.0),5.0);
float fresnel = pow(clamp(1.0 + normalDotEye, 0.0, 1.0),5.0);
#ifdef SNELLS_WINDOW
// snells window looking thing

View File

@ -1203,7 +1203,7 @@ void main() {
#if DEBUG_VIEW == debug_SHADOWMAP
vec3 OutsideShadowMap_and_DH_shadow = (shadowMapFalloff > 0.0 && z >= 1.0) ? vec3(0.25,1.0,0.25) : vec3(1.0,0.25,0.25);
vec3 Normal_Shadowmap = z < 1.0 ? vec3(0.25,0.25,1.0) : OutsideShadowMap_and_DH_shadow;
gl_FragData[0].rgb = Normal_Shadowmap * shadowMap;
gl_FragData[0].rgb = mix(vec3(0.1) * (normal.y * 0.1 +0.9), Normal_Shadowmap, shadowMap);
#endif
#if DEBUG_VIEW == debug_NORMALS
gl_FragData[0].rgb = normal;
@ -1224,7 +1224,7 @@ void main() {
#ifdef CLOUDS_INFRONT_OF_WORLD
gl_FragData[1] = texture2D(colortex2, texcoord);
if(heightRelativeToClouds > 0.0){
if(heightRelativeToClouds > 0.0 && !hand){
gl_FragData[0].rgb = gl_FragData[0].rgb * Clouds.a + Clouds.rgb;
gl_FragData[1].a = gl_FragData[1].a*Clouds.a*Clouds.a*Clouds.a;
}