Last active
February 15, 2024 18:10
-
-
Save yanorei32/db571ea23662024079bedaf9166b83c8 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
uniform int horiz_res = 64; | |
float4 mainImage(VertData v_in) : TARGET { | |
float ratio = uv_size.y / uv_size.x; | |
float2 res = float2(horiz_res, horiz_res * ratio); | |
float2 sampling_pos = (floor(v_in.uv * res) + 0.5) * rcp(res); | |
return image.Sample(textureSampler, sampling_pos); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment