mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-23 17:12:40 +08:00
added a contrast setting. make beacon beams and enchantment glint work in the end and nether. tweak lighting in the end and nether.
This commit is contained in:
@ -67,6 +67,10 @@ vec4 SampleTextureCatmullRom(sampler2D tex, vec2 uv, vec2 texSize )
|
||||
return result;
|
||||
}
|
||||
|
||||
/// thanks stackoverflow https://stackoverflow.com/questions/944713/help-with-pixel-shader-effect-for-brightness-and-contrast#3027595
|
||||
void applyContrast(inout vec3 color, float contrast){
|
||||
color = (color - 0.5) * contrast + 0.5;
|
||||
}
|
||||
|
||||
void main() {
|
||||
#ifdef BICUBIC_UPSCALING
|
||||
@ -75,6 +79,7 @@ void main() {
|
||||
vec3 col = texture2D(colortex7,texcoord).rgb;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONTRAST_ADAPTATIVE_SHARPENING
|
||||
//Weights : 1 in the center, 0.5 middle, 0.25 corners
|
||||
vec3 albedoCurrent1 = texture2D(colortex7, texcoord + vec2(texelSize.x,texelSize.y)/MC_RENDER_QUALITY*0.5).rgb;
|
||||
@ -95,5 +100,8 @@ void main() {
|
||||
vec3 diff = col-lum;
|
||||
col = col + diff*(-lum*CROSSTALK + SATURATION);
|
||||
|
||||
|
||||
applyContrast(col, CONTRAST);
|
||||
|
||||
gl_FragColor.rgb = clamp(int8Dither(col,texcoord),0.0,1.0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user