mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-05 14:42:42 -07:00
Fixes for uv coords on shaders when compiling for opengl vs directx
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
build
|
||||
thirdparty
|
||||
.vscode
|
||||
backend/sokol/render_glyph.odin
|
||||
backend/sokol/blit_atlas.odin
|
||||
backend/sokol/draw_text.odin
|
||||
|
@@ -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,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 );
|
||||
}
|
||||
|
@@ -29,17 +29,17 @@ pushd "$path_backend_sokol" > /dev/null
|
||||
|
||||
"$sokol_shdc" "$flag_input" "$shadersrc_blit_atlas" \
|
||||
"$flag_output" "$shaderout_blit_atlas" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:hlsl4:metal_macos:wgsl" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:metal_macos:wgsl" \
|
||||
"$flag_format_odin" "$flag_module=blit_atlas"
|
||||
|
||||
"$sokol_shdc" "$flag_input" "$shadersrc_render_glyph" \
|
||||
"$flag_output" "$shaderout_render_glyph" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:hlsl4:metal_macos:wgsl" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:metal_macos:wgsl" \
|
||||
"$flag_format_odin" "$flag_module=render_glyph"
|
||||
|
||||
"$sokol_shdc" "$flag_input" "$shadersrc_draw_text" \
|
||||
"$flag_output" "$shaderout_draw_text" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:hlsl4:metal_macos:wgsl" \
|
||||
"$flag_target_lang" "glsl410:glsl300es:metal_macos:wgsl" \
|
||||
"$flag_format_odin" "$flag_module=draw_text"
|
||||
|
||||
popd > /dev/null
|
||||
|
Reference in New Issue
Block a user