Skip to content

Commit

Permalink
Reduce horizontal sync maximum strength.
Browse files Browse the repository at this point in the history
  • Loading branch information
Swordfish90 committed Dec 17, 2018
1 parent 3cee186 commit dcb7b7c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/qml/ShaderTerminal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Item {
property real ambientLight: parent.ambientLight

property real flickering: appSettings.flickering
property real horizontalSync: appSettings.horizontalSync * 0.5
property real horizontalSync: appSettings.horizontalSync
property real horizontalSyncStrength: Utils.lint(0.1, 0.35, horizontalSync)
property real glowingLine: appSettings.glowingLine * 0.2
property real burnIn: appSettings.burnIn
property real burnInLastUpdate: burnInEffect.lastUpdate
Expand Down Expand Up @@ -115,7 +116,7 @@ Item {
uniform lowp float flickering;" : "") +

(!fallBack && horizontalSync !== 0.0 ?"
uniform lowp float horizontalSync;
uniform lowp float horizontalSyncStrength;
varying lowp float distortionScale;
varying lowp float distortionFreq;" : "") +

Expand All @@ -133,8 +134,8 @@ Item {
: "") +

(!fallBack && horizontalSync !== 0.0 ? "
float randval = horizontalSync - initialNoiseTexel.r;
distortionScale = step(0.0, randval) * randval * horizontalSync;
float randval = horizontalSyncStrength - initialNoiseTexel.r;
distortionScale = step(0.0, randval) * randval * horizontalSyncStrength;
distortionFreq = mix(4.0, 40.0, initialNoiseTexel.g);"
: "") +

Expand Down Expand Up @@ -180,7 +181,7 @@ Item {
uniform lowp float ambientLight;" : "") +

(fallBack && horizontalSync !== 0 ? "
uniform lowp float horizontalSync;" : "") +
uniform lowp float horizontalSyncStrength;" : "") +
(fallBack && flickering !== 0.0 ?"
uniform lowp float flickering;" : "") +
(!fallBack && flickering !== 0 ? "
Expand Down Expand Up @@ -240,8 +241,8 @@ Item {
float brightness = 1.0 + (initialNoiseTexel.g - 0.5) * flickering;"
: "") +
(fallBack && horizontalSync !== 0.0 ? "
float randval = horizontalSync - initialNoiseTexel.r;
float distortionScale = step(0.0, randval) * randval * horizontalSync;
float randval = horizontalSyncStrength - initialNoiseTexel.r;
float distortionScale = step(0.0, randval) * randval * horizontalSyncStrength;
float distortionFreq = mix(4.0, 40.0, initialNoiseTexel.g);"
: "") +

Expand Down

0 comments on commit dcb7b7c

Please sign in to comment.