mdl 1.0;

/*
bump_file_texture = ['images\\shaders\\surfacefinish/edm_spark_n.dds']
mtl_ior = ['1', ',']
blurryReflections = ['on', ',']
sw_shader = ['largesparkerosionplasticblue']
doubleSided = ['on', ',']
matColor = [u'0.22,0.41,1.0,1.0']
displacementDistance = ['0.001', ',']
specular_color = ['1', '1', '1', ',']
normalMapName = [u'surfacefinish/edm_spark_n.dds']
DefaultShininess = [u'0.07']
luminousIntensity = ['0', ',']
reflectivity = ['0', ',']
roughness = ['0.93', ',']
TextureScale = [u'1.0']
col1 = ['0.137255', '0.294118', '0.74902', ',']
refractionRoughness = ['0', ',']
bumpTexture = ['images\\shaders\\surfacefinish/edm_spark_n.dds', ',']
specular_factor = ['0.7', ',']
bumpStrength = ['0.001', ',']
diffuse_factor = ['1', ',']
DefaultSpecular = [u'0.7']
reflectModifier = [u'0.0']
num_cols = ['1', ',']
transparency = ['0', ',']
bumpIsNormalMap = ['on', ',']
*/

import solidworks::solidworks::*;
import anno::*;
import base::*;

export material large_spark_erosion_plastic_blue(
    uniform float texture_scale= 1.0,
    uniform color base_color= color(0.137255,0.294118,0.74902),
    uniform float diffuse_factor= 1,
    uniform bool enable_diffuse_map= false,
    uniform texture_2d diffuse_texture= texture_2d(),
    uniform bool enable_bump_map= true,
    uniform texture_2d bump_texture= texture_2d("images/shaders/surfacefinish/edm_spark_n.dds"),
    uniform float bump_strength= 0.001,
    uniform bool bump_is_normal_map= true,
    uniform color specular_color= color(1,1,1),
    uniform float reflectivity= 0 [[  anno::unused() ]],
    uniform float roughness= 0.93,
    uniform bool is_metal= false,
    uniform float transparency= 0,
    uniform color transparency_color= color(0.137255,0.294118,0.74902),
    uniform bool enable_blurry_reflections= true,
    uniform float mtl_ior= 1,
    uniform bool  use_projector = false,
    uniform base::texture_coordinate_system coordinate_system = base::texture_coordinate_object,
    uniform int texture_space = 0,
    uniform base::projection_mode projection_type = base::projection_planar,
    uniform float4x4 projection_transform = float4x4(1.0) )
= let {
    uniform float override_reflectivity = 1.0;
    uniform float override_roughness = roughness * 1.0;
    uniform float override_ior = mtl_ior != 1.0?mtl_ior: 1.5 ;
} in solidworks::solidworks::solidworks(
    texture_scale: texture_scale,
    base_color: base_color,
    diffuse_factor: diffuse_factor,
    enable_diffuse_map: enable_diffuse_map,
    diffuse_texture: diffuse_texture,
    enable_bump_map: enable_bump_map,
    bump_texture: bump_texture,
    bump_strength: bump_strength,
    bump_is_normal_map: bump_is_normal_map,
    specular_color: specular_color,
    reflectivity: override_reflectivity,
    roughness: override_roughness,
    is_metal: is_metal,
    transparency: transparency,
    transparency_color: transparency_color,
    enable_blurry_reflections: enable_blurry_reflections,
    mtl_ior: override_ior,
    use_projector: use_projector,
    coordinate_system: coordinate_system,
    texture_space: texture_space,
    projection_type: projection_type,
    projection_transform: projection_transform
);
