2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
# OSL node shaders
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_OSL
|
2011-04-27 11:58:34 +00:00
|
|
|
node_add_closure.osl
|
|
|
|
node_attribute.osl
|
|
|
|
node_background.osl
|
|
|
|
node_bump.osl
|
2011-12-02 20:36:13 +00:00
|
|
|
node_camera.osl
|
2012-06-03 00:02:24 +00:00
|
|
|
node_checker_texture.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_convert_from_color.osl
|
|
|
|
node_convert_from_float.osl
|
|
|
|
node_convert_from_normal.osl
|
|
|
|
node_convert_from_point.osl
|
|
|
|
node_convert_from_vector.osl
|
|
|
|
node_diffuse_bsdf.osl
|
|
|
|
node_emission.osl
|
|
|
|
node_environment_texture.osl
|
|
|
|
node_fresnel.osl
|
2011-12-16 20:35:06 +00:00
|
|
|
node_gamma.osl
|
2012-06-02 17:10:59 +00:00
|
|
|
node_gradient_texture.osl
|
2012-01-24 16:32:31 +00:00
|
|
|
node_brightness.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_geometry.osl
|
|
|
|
node_glass_bsdf.osl
|
|
|
|
node_glossy_bsdf.osl
|
2011-12-02 16:57:37 +00:00
|
|
|
node_hsv.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_image_texture.osl
|
2011-12-03 23:05:35 +00:00
|
|
|
node_invert.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_light_path.osl
|
|
|
|
node_magic_texture.osl
|
|
|
|
node_mapping.osl
|
|
|
|
node_math.osl
|
|
|
|
node_mix.osl
|
|
|
|
node_mix_closure.osl
|
|
|
|
node_musgrave_texture.osl
|
2011-12-16 18:15:07 +00:00
|
|
|
node_normal.osl
|
2011-09-16 13:14:02 +00:00
|
|
|
node_blend_weight_texture.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_noise_texture.osl
|
|
|
|
node_output_displacement.osl
|
2011-10-12 23:03:12 +00:00
|
|
|
node_output_surface.osl
|
|
|
|
node_output_volume.osl
|
2011-12-01 21:46:10 +00:00
|
|
|
node_sepcomb_rgb.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_sky_texture.osl
|
|
|
|
node_texture_coordinate.osl
|
|
|
|
node_translucent_bsdf.osl
|
|
|
|
node_transparent_bsdf.osl
|
|
|
|
node_value.osl
|
|
|
|
node_vector_math.osl
|
|
|
|
node_velvet_bsdf.osl
|
|
|
|
node_voronoi_texture.osl
|
|
|
|
node_ward_bsdf.osl
|
2012-06-02 19:14:14 +00:00
|
|
|
node_wave_texture.osl
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_OSL_HEADERS
|
2011-04-27 11:58:34 +00:00
|
|
|
node_texture.h
|
2011-11-10 06:05:22 +00:00
|
|
|
node_color.h
|
|
|
|
node_fresnel.h
|
2011-11-08 20:27:37 +00:00
|
|
|
stdosl.h
|
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_OSO
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# TODO, add a module to compile OSL
|
|
|
|
foreach(_file ${SRC_OSL})
|
|
|
|
set(_OSL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
|
|
|
string(REPLACE ".osl" ".oso" _OSO_FILE ${_OSL_FILE}) # TODO, replace extension only
|
|
|
|
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _OSO_FILE ${_OSO_FILE})
|
2011-08-16 16:15:34 +00:00
|
|
|
add_custom_command(
|
2011-11-08 20:27:37 +00:00
|
|
|
OUTPUT ${_OSO_FILE}
|
|
|
|
COMMAND ${OSL_COMPILER} -O2 ${_OSL_FILE}
|
|
|
|
DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS})
|
|
|
|
list(APPEND SRC_OSO
|
|
|
|
${_OSO_FILE}
|
|
|
|
)
|
|
|
|
|
|
|
|
unset(_OSL_FILE)
|
|
|
|
unset(_OSO_FILE)
|
2011-08-16 16:15:34 +00:00
|
|
|
endforeach()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
add_custom_target(shader ALL DEPENDS ${SRC_OSO} ${SRC_OSL_HEADERS})
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|