Fixes for uv coords on shaders when compiling for opengl vs directx

This commit is contained in:
ed committed 2024-09-11 15:11:24 -04:00
1 parent 4f296cd96d
commit 922372b582
4 files changed
+16 -5

No files matched your search

+5 -1
View File
@@ -10,7 +10,11 @@ out vec2 uv;
void main()
{
uv = vec2( v_texture.x, 1 - v_texture.y );
#if SOKOL_GLSL
uv = vec2( v_texture.x, v_texture.y );
#else
uv = vec2( v_texture.x, 1.0 - v_texture.y );
#endif
gl_Position = vec4( v_position * 2.0f - 1.0f, 0.0f, 1.0f );
}
@end
+5 -1
View File
@@ -5,6 +5,10 @@ out vec2 uv;
void main()
{
uv = vec2( v_texture.x, 1 - v_texture.y );
#if SOKOL_GLSL
uv = vec2( v_texture.x, v_texture.y );
#else
uv = vec2( v_texture.x, 1.0 - v_texture.y );
#endif
gl_Position = vec4( v_position, 0.0, 1.0 );
}