2023-09-30 13:21:40 +00:00
|
|
|
hlsl_sources = [
|
2023-11-24 16:52:44 +00:00
|
|
|
['PSMain_checker_luma', 'ps_4_0'],
|
|
|
|
['PSMain_checker_rgb', 'ps_4_0'],
|
|
|
|
['PSMain_checker_vuya', 'ps_4_0'],
|
|
|
|
['PSMain_checker', 'ps_4_0'],
|
|
|
|
['PSMain_color', 'ps_4_0'],
|
|
|
|
['PSMain_sample_premul', 'ps_4_0'],
|
|
|
|
['PSMain_sample', 'ps_4_0'],
|
|
|
|
['PSMain_snow', 'ps_4_0'],
|
|
|
|
['VSMain_color', 'vs_4_0'],
|
|
|
|
['VSMain_coord', 'vs_4_0'],
|
|
|
|
['VSMain_pos', 'vs_4_0'],
|
2023-09-30 13:21:40 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach shader : hlsl_sources
|
2023-10-06 11:46:23 +00:00
|
|
|
entry_point = shader.get(0)
|
|
|
|
source = files('@0@.hlsl'.format(entry_point))
|
|
|
|
header = '@0@.h'.format(entry_point)
|
2023-09-30 13:21:40 +00:00
|
|
|
compiled_shader = custom_target(header,
|
|
|
|
input : source,
|
|
|
|
output : header,
|
|
|
|
command : [fxc, '/Fh', '@OUTPUT@',
|
2023-10-06 11:46:23 +00:00
|
|
|
'/E', entry_point,
|
|
|
|
'/T', shader.get(1),
|
2023-09-30 13:21:40 +00:00
|
|
|
'/D', 'BUILDING_HLSL=1',
|
2023-10-06 11:46:23 +00:00
|
|
|
'/nologo',
|
2023-09-30 13:21:40 +00:00
|
|
|
'@INPUT@'])
|
|
|
|
hlsl_precompiled += [compiled_shader]
|
|
|
|
endforeach
|