2023-09-30 13:21:40 +00:00
|
|
|
hlsl_sources = [
|
2023-10-06 11:46:23 +00:00
|
|
|
['PSMain_checker_luma', 'ps_5_0'],
|
|
|
|
['PSMain_checker_rgb', 'ps_5_0'],
|
|
|
|
['PSMain_checker_vuya', 'ps_5_0'],
|
|
|
|
['PSMain_checker', 'ps_5_0'],
|
|
|
|
['PSMain_color', 'ps_5_0'],
|
|
|
|
['PSMain_sample_premul', 'ps_5_0'],
|
|
|
|
['PSMain_sample', 'ps_5_0'],
|
|
|
|
['PSMain_snow', 'ps_5_0'],
|
|
|
|
['VSMain_color', 'vs_5_0'],
|
|
|
|
['VSMain_coord', 'vs_5_0'],
|
|
|
|
['VSMain_pos', 'vs_5_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
|