mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
make roughness threshold harder to see
This commit is contained in:
parent
4d1673a54c
commit
f40c20f3c8
@ -272,6 +272,7 @@ void main() {
|
||||
float Puddle_shape = 0.;
|
||||
|
||||
#ifndef ENTITIES
|
||||
#ifndef HAND
|
||||
#ifdef WORLD
|
||||
#ifdef Puddles
|
||||
Puddle_shape = (1.0 - clamp(exp(-15 * pow(texture2D(noisetex, worldpos.xz * (0.015 * Puddle_Size) ).b ,5)),0,1)) * lightmap ;
|
||||
@ -280,6 +281,7 @@ void main() {
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef POM
|
||||
@ -492,7 +494,7 @@ void main() {
|
||||
vec4 SpecularTex = texture2D(specular, lmtexcoord.xy, bias);
|
||||
|
||||
SpecularTex.r = max(SpecularTex.r, Puddle_shape);
|
||||
SpecularTex.g = max(SpecularTex.g, Puddle_shape*0.04);
|
||||
SpecularTex.g = max(SpecularTex.g, Puddle_shape*0.02);
|
||||
|
||||
// #ifdef ENTITIES
|
||||
// if(NameTags == 1) SpecularTex = vec4(0.0);
|
||||
|
@ -271,17 +271,14 @@ void MaterialReflections(
|
||||
vec3 F = mix_vec3(f0, vec3(1.0), fresnel);
|
||||
vec3 rayContrib = F;
|
||||
|
||||
float VisibilityFactor = rayContrib.x * pow(1.0-roughness,3.0);
|
||||
float rayContribLuma = luma(rayContrib);
|
||||
|
||||
float VisibilityFactor = rayContribLuma * pow(1.0-roughness,3.0);
|
||||
|
||||
bool hasReflections = Roughness_Threshold == 1.0 ? true : (f0.y * (1.0 - roughness * Roughness_Threshold)) > 0.01;
|
||||
float hasReflections2 = max(1.0 - roughness*1.75,0.0);
|
||||
|
||||
|
||||
// // if (!hasReflections) Outdoors = 0.0;
|
||||
|
||||
// SunReflection = directlighting * SunGGX(normal, -np3, sunPos, roughness, f0.y) / 5.0;
|
||||
SunReflection = directlighting * GGX(normal, -np3, sunPos, roughness, vec3(f0.y));
|
||||
//
|
||||
|
||||
if (hasReflections) { // Skip sky reflection and SSR if its just not very visible anyway
|
||||
#ifdef Sky_reflection
|
||||
SkyReflection = ( skyCloudsFromTex(L, colortex4).rgb / 150. ) * 5.;
|
||||
@ -289,7 +286,7 @@ void MaterialReflections(
|
||||
|
||||
#ifdef Screen_Space_Reflections
|
||||
|
||||
float rayQuality = mix_float(reflection_quality,6.0,luma(rayContrib)); // Scale quality with ray contribution
|
||||
float rayQuality = mix_float(reflection_quality,6.0,rayContribLuma); // Scale quality with ray contribution
|
||||
|
||||
|
||||
|
||||
@ -331,7 +328,7 @@ void MaterialReflections(
|
||||
|
||||
// put reflections onto the scene
|
||||
#ifdef Rough_reflections
|
||||
Output = hand ? mix_vec3(Output, Reflections.rgb, VisibilityFactor) : mix_vec3(Output, Reflections.rgb, luma(rayContrib));
|
||||
Output = hand ? mix_vec3(Output, Reflections.rgb, VisibilityFactor) : mix_vec3(Output, Reflections.rgb, rayContribLuma * (1.0 - roughness * Roughness_Threshold));
|
||||
#else
|
||||
Output = mix_vec3(Output, Reflections.rgb, VisibilityFactor);
|
||||
#endif
|
||||
|
@ -136,7 +136,7 @@ vec4 getVolumetricRays(
|
||||
vec3 AtmosphericFog = skyCol0 * (rL+m) ;
|
||||
|
||||
// extra fog effects
|
||||
vec3 rainRays = (sunColor*sh) * (rayL*phaseg(SdotV,0.5)) * clamp(pow(WsunVec.y,5)*2,0.0,1) * rainStrength * noPuddleAreas * RainFog_amount;
|
||||
vec3 rainRays = (sunColor*sh) * (rayL*phaseg(SdotV,0.5)) * clamp(pow(WsunVec.y,5)*2,0.0,1) * rainStrength * noPuddleAreas * RainFog_amount * 0.5;
|
||||
vec3 CaveRays = (sunColor*sh) * phaseg(SdotV,0.7) * 0.001 * (1.0 - max(eyeBrightnessSmooth.y,0)/240.);
|
||||
|
||||
vec3 vL0 = (DirectLight + AmbientLight + AtmosphericFog + rainRays ) * max(eyeBrightnessSmooth.y,0)/240. ;
|
||||
|
Loading…
Reference in New Issue
Block a user