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
|
2012-11-06 19:59:02 +00:00
|
|
|
node_ambient_occlusion.osl
|
2014-06-08 10:16:28 +00:00
|
|
|
node_anisotropic_bsdf.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_attribute.osl
|
|
|
|
node_background.osl
|
2012-09-05 00:59:04 +00:00
|
|
|
node_brick_texture.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_brightness.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
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
|
2012-09-02 15:07:51 +00:00
|
|
|
node_combine_rgb.osl
|
2013-07-03 23:46:56 +00:00
|
|
|
node_combine_hsv.osl
|
2014-06-13 19:44:48 +00:00
|
|
|
node_combine_xyz.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_convert_from_color.osl
|
|
|
|
node_convert_from_float.osl
|
2012-10-20 13:11:45 +00:00
|
|
|
node_convert_from_int.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
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
|
2011-04-27 11:58:34 +00:00
|
|
|
node_geometry.osl
|
|
|
|
node_glass_bsdf.osl
|
|
|
|
node_glossy_bsdf.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_gradient_texture.osl
|
2012-12-29 01:57:32 +00:00
|
|
|
node_hair_info.osl
|
2013-12-28 00:54:44 +00:00
|
|
|
node_scatter_volume.osl
|
|
|
|
node_absorption_volume.osl
|
2012-09-03 14:08:03 +00:00
|
|
|
node_holdout.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
|
2012-10-17 16:16:35 +00:00
|
|
|
node_layer_weight.osl
|
2012-10-17 00:28:46 +00:00
|
|
|
node_light_falloff.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_light_path.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_magic_texture.osl
|
|
|
|
node_mapping.osl
|
|
|
|
node_math.osl
|
|
|
|
node_mix.osl
|
|
|
|
node_mix_closure.osl
|
|
|
|
node_musgrave_texture.osl
|
|
|
|
node_noise_texture.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_normal.osl
|
|
|
|
node_normal_map.osl
|
2012-09-14 18:10:54 +00:00
|
|
|
node_object_info.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_output_displacement.osl
|
2011-10-12 23:03:12 +00:00
|
|
|
node_output_surface.osl
|
|
|
|
node_output_volume.osl
|
2012-09-14 19:09:25 +00:00
|
|
|
node_particle_info.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_refraction_bsdf.osl
|
2012-12-11 14:39:37 +00:00
|
|
|
node_rgb_curves.osl
|
2012-09-15 15:41:37 +00:00
|
|
|
node_rgb_ramp.osl
|
2012-09-02 15:07:51 +00:00
|
|
|
node_separate_rgb.osl
|
2013-07-03 23:46:56 +00:00
|
|
|
node_separate_hsv.osl
|
2014-06-13 19:44:48 +00:00
|
|
|
node_separate_xyz.osl
|
2012-10-20 15:09:36 +00:00
|
|
|
node_set_normal.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_sky_texture.osl
|
2013-04-01 20:26:52 +00:00
|
|
|
node_subsurface_scattering.osl
|
2012-11-06 19:59:02 +00:00
|
|
|
node_tangent.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_texture_coordinate.osl
|
2013-05-23 17:45:20 +00:00
|
|
|
node_toon_bsdf.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_translucent_bsdf.osl
|
|
|
|
node_transparent_bsdf.osl
|
|
|
|
node_value.osl
|
2012-12-11 14:39:37 +00:00
|
|
|
node_vector_curves.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_vector_math.osl
|
2013-06-23 17:51:08 +00:00
|
|
|
node_vector_transform.osl
|
2011-04-27 11:58:34 +00:00
|
|
|
node_velvet_bsdf.osl
|
|
|
|
node_voronoi_texture.osl
|
2013-06-09 20:46:22 +00:00
|
|
|
node_wavelength.osl
|
2013-06-13 08:55:51 +00:00
|
|
|
node_blackbody.osl
|
2012-06-02 19:14:14 +00:00
|
|
|
node_wave_texture.osl
|
2013-05-20 15:58:37 +00:00
|
|
|
node_wireframe.osl
|
2013-09-15 23:58:00 +00:00
|
|
|
node_hair_bsdf.osl
|
2014-04-02 09:40:29 +00:00
|
|
|
node_uv_map.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
|
2012-09-02 13:34:12 +00:00
|
|
|
oslutil.h
|
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_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})
|
2012-11-03 14:32:13 +00:00
|
|
|
string(REPLACE ".osl" ".oso" _OSO_FILE ${_OSL_FILE})
|
2011-11-08 20:27:37 +00:00
|
|
|
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}
|
2013-06-26 23:29:33 +00:00
|
|
|
COMMAND ${OSL_COMPILER} -q -O2 -I"${CMAKE_CURRENT_SOURCE_DIR}" ${_OSL_FILE}
|
2011-11-08 20:27:37 +00:00
|
|
|
DEPENDS ${_OSL_FILE} ${SRC_OSL_HEADERS})
|
|
|
|
list(APPEND SRC_OSO
|
|
|
|
${_OSO_FILE}
|
|
|
|
)
|
2012-11-15 17:16:27 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
unset(_OSL_FILE)
|
|
|
|
unset(_OSO_FILE)
|
2011-08-16 16:15:34 +00:00
|
|
|
endforeach()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-10-20 12:17:45 +00:00
|
|
|
add_custom_target(cycles_osl_shaders ALL DEPENDS ${SRC_OSO} ${SRC_OSL_HEADERS})
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-09-03 11:38:22 +00:00
|
|
|
# CMAKE_CURRENT_SOURCE_DIR is already included in OSO paths
|
|
|
|
delayed_install("" "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|
2012-11-03 14:32:13 +00:00
|
|
|
delayed_install("${CMAKE_CURRENT_SOURCE_DIR}" "${SRC_OSL_HEADERS}" ${CYCLES_INSTALL_PATH}/shader)
|
|
|
|
|