-
-
Save yomotsu/9203275 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
uniform vec2 u_resolution; | |
// 1 | |
// +-----+-----+ | |
// | | | | |
// -ar +-----+-----+ ar | |
// | | | | |
// +-----+-----+ | |
// -1 | |
float aspectRatio = u_resolution.x / u_resolution.y; | |
vec2 uv = ( gl_FragCoord.xy * 2.0 - u_resolution ) / u_resolution.y; | |
--- | |
`a / b` を `b / a` にする(分子と分母を入れ替える) | |
b / a == (a / b) / pow( sqrt( a / b, 2 ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment