mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
brightness focus
+ brightness can control manual focus + fixed manual focus on optifine
This commit is contained in:
parent
ed8cf3df95
commit
d5503d4a22
@ -21,6 +21,7 @@ flat varying vec2 TAA_Offset;
|
||||
flat varying float tempOffsets;
|
||||
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
/*
|
||||
const int colortex12Format = RGBA16F; //Final output, transparencies id (gbuffer->composite4)
|
||||
const int colortex11Format = RGBA16F; //Final output, transparencies id (gbuffer->composite4)
|
||||
@ -1246,7 +1247,14 @@ void main() {
|
||||
#elif FOCUS_LASER_COLOR == 5 // White
|
||||
laserColor = vec3(25);
|
||||
#endif
|
||||
if( hideGUI < 1.0) gl_FragData[0].rgb += laserColor * pow( clamp( 1.0-abs(DOF_JITTER_FOCUS-abs(fragpos.z)) ,0,1),25) ;
|
||||
|
||||
#if DOF_JITTER_FOCUS < 0
|
||||
float focusDist = mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusDist = DOF_JITTER_FOCUS;
|
||||
#endif
|
||||
|
||||
if( hideGUI < 1.0) gl_FragData[0].rgb += laserColor * pow( clamp( 1.0-abs(focusDist-abs(fragpos.z)) ,0,1),25) ;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -34,6 +34,7 @@ uniform float aspectRatio;
|
||||
uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
@ -86,8 +87,12 @@ void main() {
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
float focus = DOF_JITTER_FOCUS;
|
||||
#if DOF_JITTER_FOCUS < 0
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - DOF_JITTER_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
|
@ -59,6 +59,7 @@ uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform sampler2D colortex4;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
|
||||
uniform mat4 gbufferModelView;
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
@ -270,7 +271,12 @@ void main() {
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
#if DOF_JITTER_FOCUS < 0
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - DOF_JITTER_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
|
@ -42,6 +42,7 @@ uniform float aspectRatio;
|
||||
uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
@ -126,8 +127,12 @@ void main() {
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
float focus = DOF_JITTER_FOCUS;
|
||||
#if DOF_JITTER_FOCUS < 0
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - DOF_JITTER_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
|
@ -17,6 +17,7 @@ value.DOF_QUALITY.2=Medium
|
||||
value.DOF_QUALITY.3=High
|
||||
value.DOF_QUALITY.4=Ultra
|
||||
option.DOF_ANAMORPHIC_RATIO=Anamorphic Ratio
|
||||
value.DOF_JITTER_FOCUS.-1=Brightness Slider
|
||||
value.FOCUS_LASER_COLOR.0=Red
|
||||
value.FOCUS_LASER_COLOR.1=Green
|
||||
value.FOCUS_LASER_COLOR.2=Blue
|
||||
|
@ -55,7 +55,7 @@
|
||||
#define MANUAL_FOCUS 48.0 // If autofocus is turned off, sets the focus point (meters) [0.06948345122280154 0.07243975703425146 0.07552184450877376 0.07873506526686186 0.0820849986238988 0.08557746127787037 0.08921851740926011 0.09301448921066349 0.09697196786440505 0.10109782498721881 0.10539922456186433 0.10988363537639657 0.11455884399268773 0.11943296826671962 0.12451447144412296 0.129812176855438 0.1353352832366127 0.1410933807013415 0.1470964673929768 0.15335496684492847 0.1598797460796939 0.16668213447794653 0.17377394345044514 0.18116748694692214 0.18887560283756183 0.19691167520419406 0.20528965757990927 0.21402409717744744 0.22313016014842982 0.2326236579172927 0.2425210746356487 0.25283959580474646 0.26359713811572677 0.27481238055948964 0.2865047968601901 0.29869468928867837 0.3114032239145977 0.32465246735834974 0.3384654251067422 0.3528660814588489 0.36787944117144233 0.3835315728763107 0.39984965434484737 0.4168620196785084 0.4345982085070782 0.453089017280169 0.4723665527410147 0.49246428767540973 0.513417119032592 0.5352614285189903 0.5580351457700471 0.5817778142098083 0.6065306597126334 0.6323366621862497 0.6592406302004438 0.6872892787909722 0.7165313105737893 0.7470175003104326 0.7788007830714049 0.8119363461506349 0.8464817248906141 0.8824969025845955 0.9200444146293233 0.9591894571091382 1.0 1.0425469051899914 1.086904049521229 1.1331484530668263 1.1813604128656459 1.2316236423470497 1.2840254166877414 1.338656724353094 1.3956124250860895 1.4549914146182013 1.5168967963882134 1.5814360605671443 1.6487212707001282 1.7188692582893286 1.7920018256557555 1.8682459574322223 1.9477340410546757 2.030604096634748 2.117000016612675 2.2070718156067044 2.300975890892825 2.398875293967098 2.5009400136621287 2.6073472713092674 2.718281828459045 2.833936307694169 2.9545115270921065 3.080216848918031 3.211270543153561 3.347900166492527 3.4903429574618414 3.638846248353525 3.7936678946831774 3.955076722920577 4.123352997269821 4.298788906309526 4.4816890703380645 4.672371070304759 4.871165999245474 5.0784190371800815 5.29449005047003 5.51975421667673 5.754602676005731 5.999443210467818 6.254700951936329 6.5208191203301125 6.798259793203881 7.087504708082256 7.38905609893065 7.703437568215379 8.031194996067258 8.372897488127265 8.72913836372013 9.10053618607165 9.487735836358526 9.891409633455755 10.312258501325767 10.751013186076355 11.208435524800691 11.685319768402522 12.182493960703473 12.700821376227164 13.241202019156521 13.804574186067095 14.391916095149892 15.00424758475255 15.642631884188171 16.30817745988666 17.00203994009402 17.725424121461643 18.479586061009854 19.265835257097933 20.085536923187668 20.940114358348602 21.831051418620845 22.75989509352673 23.728258192205157 24.737822143832553 25.790339917193062 26.88763906446752 28.03162489452614 29.22428378123494 30.46768661252054 31.763992386181833 33.11545195869231 34.52441195350251 35.99331883562839 37.524723159600995 39.12128399815321 40.78577355933337 42.52108200006278 44.3302224444953 46.21633621589248 48.182698291098816 50.23272298708815 52.36996988945491 54.598150033144236 56.92113234615337 59.34295036739207 61.867809250367884 64.50009306485578 67.24437240923179 70.10541234668786 73.08818067910767 76.19785657297057 79.43983955226133 82.81975887399955 86.3434833026695 90.01713130052181 93.84708165144015 97.83998453682129 102.00277308269969 106.34267539816554 110.86722712598126 115.58428452718766 120.50203812241894 125.62902691361414 130.9741532108186 136.54669808981876 142.35633750745257 148.4131591025766 154.72767971186107 161.3108636308289 168.17414165184545 175.32943091211476 182.78915558614753 190.56626845863 198.67427341514983 ]
|
||||
#define DoF_Adaptation_Speed 1.00 // [0.20 0.21 0.23 0.24 0.25 0.27 0.29 0.30 0.32 0.34 0.36 0.39 0.41 0.43 0.46 0.49 0.52 0.55 0.59 0.62 0.66 0.70 0.74 0.79 0.84 0.89 0.94 1.00 1.06 1.13 1.20 1.27 1.35 1.43 1.52 1.61 1.71 1.82 1.93 2.05 2.18 2.31 2.45 2.60 2.76 2.93 3.11 3.30 3.51 3.72 3.95 4.19 4.45 4.73 5.02 5.33 5.65 6.00]
|
||||
// #define DOF_JITTER
|
||||
#define DOF_JITTER_FOCUS 36.0 // [1.0 3.0 5.0 7.0 9.0 11.0 13.5 15.5 17.5 20.0 22.0 24.5 26.5 29.0 31.0 33.5 36.0 38.5 41.0 43.5 46.0 48.5 51.5 54.0 56.5 59.5 62.0 65.0 68.0 71.0 74.0 77.0 80.0 83.0 86.0 89.5 92.5 96.0 99.0 102.5 106.0 109.5 113.0 117.0 120.5 124.5 128.0 132.0 136.0 140.0 144.5 148.5 153.0 157.0 161.5 166.0 171.0 175.5 180.5 185.0 190.0 195.0 200.5 205.5 211.0 216.5 222.5 228.0 234.0 240.0 246.0 252.5 259.0 265.5 272.0 279.0 286.0 293.5 300.5 308.5 316.0 324.0 332.0 340.5 349.0 358.0 367.0 376.5 386.0 396.0 406.0 416.5 427.0 438.0 449.5 461.5 473.5 486.0 498.5 512.0]
|
||||
#define DOF_JITTER_FOCUS 32 // [-1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22 24 25 26 28 29 30 32 33 35 36 38 40 41 43 45 47 48 50 52 54 56 58 60 63 65 67 70 72 75 77 80 83 85 88 91 94 98 101 104 108 111 115 119 123 127 132 136 141 146 151 156 161 167 173 179 186 193 200 207 215 224 232 242 251 262 273 284 297 310 324 339 355 372 391 411 433 457 483 512]
|
||||
#define JITTER_STRENGTH 1.0 // sorry [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0]
|
||||
#define FOCUS_LASER_COLOR 1 // Red, Green, Blue, Pink, Yellow, White [0 1 2 3 4 5]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user