Sample scenes
box_cyl_opaque_shadow.ray
box_cyl_reflect.ray
box_cyl_transp_shadow.ray
box_dist_atten.ray
cylinder_refract.ray
cyl_ambient.ray
cyl_diffuse.ray
cyl_diff_spec.ray
cyl_emissive.ray
recurse_depth.ray
sphere_refract.ray
texture_map.ray
Download as a group

cyl_diffuse.ray

Purpose: Test for the diffuse term

Settings:

Image:

Code:

SBT-raytracer 1.0

// cyl_diffuse.ray
// purpose: Test for the diffuse term

// This was rendered with the following attenuation
// settings:
// Distance scale: 0.000        OR   1.87
// Constant term:  0.25         OR   0.25
// Linear term:    0.0033724    OR   0.25
// Quadratic term: 0.00004592   OR   0.25


camera
{
  position = (5, 0, 0);
  viewdir = (-1, 0, 0);
  updir = (0, 1, 0);
}

// This is a directional light coming from the
// left of the scene.
directional_light
{
  // Direction is automatically normalized
  direction = (-1, -0.5, -1);
  color = (1, 0, 1);
}

// The cylinder should turn out a shaded blue.
rotate( 1, 0, 0, 1.6,
  rotate( 0, 1, 0, -0.5,
    cylinder {
      material = { diffuse = (0, 0, 0.8);
    }
  } ) )