mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
tweaks to subsurface scattering, improve SSS in the distance. make screenspace shadows have consistent step length across all window resolutions. tweak torch lighting (make it slightly brighter and a warmer color). tweak TAA handling of the hand. tweak specular reflection handling of the hand to be slightly more stable. make the shader use moonPosition instead of inverted sunPosition for moon related code. add support for Caelium moon positions. improve water parallax. remove some unused code improve specular handling of translucent entities with inside faces (slimes). add settings for refraction effects. re-enable block breaking effect and glass tint (it was off accidentally lol)
This commit is contained in:
@ -1,14 +1,21 @@
|
||||
#define ffstep(x,y) clamp((y - x) * 1e35,0.0,1.0)
|
||||
|
||||
vec3 drawSun(float cosY, float sunInt,vec3 nsunlight,vec3 inColor){
|
||||
return inColor+nsunlight/0.0008821203*pow(smoothstep(cos(0.0093084168595*3.2),cos(0.0093084168595*1.8),cosY),3.)*0.62;
|
||||
vec3 drawSun(float cosY, float sunInt,vec3 nsunlight, vec3 inColor){
|
||||
|
||||
// return nsunlight * min(max(cosY-0.9994,0.0)/(1.0-0.9994),1.0) * 100.0;
|
||||
|
||||
return (inColor+nsunlight/0.0008821203*pow(smoothstep(cos(0.0093084168595*3.2),cos(0.0093084168595*1.8),cosY),3.)*0.62);
|
||||
|
||||
}
|
||||
|
||||
vec3 drawMoon(vec3 PlayerPos, vec3 WorldSunVec, vec3 Color, inout vec3 occludeStars){
|
||||
|
||||
float Shape = clamp((exp(1 + -1000 * dot(WorldSunVec+PlayerPos,PlayerPos)) - 1.5),0.0,25.0);
|
||||
float Shape = min(max(dot(WorldSunVec,PlayerPos)-0.9994,0.0)/(1.0-0.9994),1.0);// * clamp(-dot(WorldSunVec,PlayerPos),0,1);
|
||||
|
||||
occludeStars *= max(1.0-Shape*5,0.0);
|
||||
|
||||
return Shape * Color * 40.0;
|
||||
/*
|
||||
float shape2 = pow(exp(Shape * -10),0.15) * 255.0;
|
||||
|
||||
vec3 sunNormal = vec3(dot(WorldSunVec+PlayerPos, vec3(shape2,0,0)), dot(PlayerPos+WorldSunVec, vec3(0,shape2,0)), -dot(WorldSunVec, PlayerPos) * 15.0);
|
||||
@ -27,8 +34,10 @@ vec3 drawMoon(vec3 PlayerPos, vec3 WorldSunVec, vec3 Color, inout vec3 occludeSt
|
||||
);
|
||||
|
||||
vec3 LightDir = phase[moonPhase];
|
||||
|
||||
|
||||
return Shape * pow(clamp(dot(sunNormal,LightDir)/5,0.0,1.5),5) * Color * 10.0 + clamp(Shape * 4.0 * pow(shape2/200,2.0),0.0,1.0)*0.004;
|
||||
*/
|
||||
}
|
||||
|
||||
const float pi = 3.141592653589793238462643383279502884197169;
|
||||
|
Reference in New Issue
Block a user