Setup shaders for text rendering based on VEFontCache samples

This commit is contained in:
2024-06-06 16:15:57 -04:00
parent a81019d2a5
commit 4a931dcbe5
16 changed files with 1009 additions and 76 deletions

View File

@ -13,17 +13,27 @@ $path_shaders = join-path $path_sectr 'shaders'
$sokol_shdc = join-path $path_sokol_tools 'bin/win32/sokol-shdc.exe'
$shadersrc_learngl_font_glyph = join-path $path_shaders 'font_glyph.shdc.glsl'
$shaderout_learngl_font_glyph = join-path $path_shaders 'font_glyph.odin'
$shadersrc_simple_font_glyph = join-path $path_shaders 'simple_font_glyph.shdc.glsl'
$shaderout_simple_font_glyph = join-path $path_shaders 'simple_font_glyph.odin'
$shadersrc_ve_blit_atlas = join-path $path_shaders 've_blit_atlas.shdc.glsl'
$shaderout_ve_blit_atlas = join-path $path_shaders 've_blit_atlas.odin'
$shadersrc_ve_draw_text = join-path $path_shaders 've_draw_text.shdc.glsl'
$shaderout_ve_draw_text = join-path $path_shaders 've_draw_text.odin'
$shadersrc_ve_render_glyph = join-path $path_shaders 've_render_glyph.shdc.glsl'
$shaderout_ve_render_glyph = join-path $path_shaders 've_render_glyph.odin'
$flag_input = '--input '
$flag_output = '--output '
$flag_target_lang = '--slang '
$flag_format_odin = '--format=sokol_odin'
$flag_module = '--module'
$cmd_args = @()
$cmd_args += $flag_input + $shadersrc_learngl_font_glyph
$cmd_args += $flag_output + $shaderout_learngl_font_glyph
$cmd_args += $flag_target_lang + 'hlsl5'
& $sokol_shdc --input $shadersrc_learngl_font_glyph --output $shaderout_learngl_font_glyph --slang 'hlsl5' $flag_format_odin
push-location $path_shaders
& $sokol_shdc --input $shadersrc_simple_font_glyph --output $shaderout_simple_font_glyph --slang 'hlsl5' $flag_format_odin
& $sokol_shdc --input $shadersrc_ve_blit_atlas --output $shaderout_ve_blit_atlas --slang 'hlsl5' $flag_format_odin $flag_module='vefc_blit_atlas'
& $sokol_shdc --input $shadersrc_ve_render_glyph --output $shaderout_ve_render_glyph --slang 'hlsl5' $flag_format_odin $flag_module='vefc_render_glyph'
& $sokol_shdc --input $shadersrc_ve_draw_text --output $shaderout_ve_draw_text --slang 'hlsl5' $flag_format_odin $flag_module='vefc_draw_text'
pop-location