Created
May 7, 2021 16:17
-
-
Save jrmuizel/3cef8796d4cc846f551906c6f58335a1 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
VS_OUTPUT main(VS_INPUT input) | |
{ | |
initAttributes(input); | |
gl_Position = mul(transpose(_uTransform), float4((float2(10.00, 10.00) + (float2(427.00, 256.00) * _aPosition)), 1., 1.)); | |
float2 texture_size = {100000, 100000}; | |
int format = int_ctor(gl_texture2DFetch(_sGpuCache, int2(1022, 1), 0).z); | |
float2 uv = float2(427.0, 640.0) * _aPosition; | |
if (format == 1) { | |
texture_size = float2(427.0, 640.0) * (gl_texture2DFetch(_sGpuCache, int2(1022, 1), 0).z-0.5); | |
} else if (format == 0) { | |
texture_size = float2(427.0, 640.0) * (gl_texture2DFetch(_sGpuCache, int2(1022, 1), 0).z-0.5); | |
} if (format == 2) { | |
texture_size = float2(427.0, 640.0) * (gl_texture2DFetch(_sGpuCache, int2(1022, 1), 0).z-0.5); | |
} | |
_vUv_Y = (uv / texture_size); | |
return generateOutput(input); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment