-
-
Save sarahzrf/c9909aee70e3656895820f20ac395956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//!HOOK MAINPRESUB | |
//!BIND HOOKED | |
const float videoNonLinStretchRatio = 1; | |
vec2 stretch(vec2 pos, float par) { | |
float m_stretch = pow(par, videoNonLinStretchRatio); | |
float x = pos.x - 0.5; | |
return vec2(mix(x * abs(x) * 2.0, x, m_stretch) + 0.5, pos.y); | |
} | |
vec4 hook() { | |
float dar = target_size.x / target_size.y, | |
sar = HOOKED_size.x / HOOKED_size.y, | |
par = dar / sar; | |
return HOOKED_tex(stretch(HOOKED_pos, par)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using this code, what would be the best way to increase the center width a bit more while decreasing the edge stretch amount? can this be accomplished by editing some of the numbers? for example changing the "const float videoNonLinStretchRatio = 1" to something other than 1 and/or changing any of the numbers that appear in this section: float x = pos.x - 0.5; return vec2(mix(x * abs(x) * 2.0, x, m_stretch) + 0.5, pos.y);.... ?
thank you!