Make your own free website on Tripod.com
Shaders in Sunflow

-Sunflow Shaders
Diffuse
AO
Glass

Mirror
Phong
Ward
Shiny
Janino

The Sunflow raytracer has many shaders, and here I'll explaing a little bit about accessing these shaders through manually editing the .sc file.


A shader block looks like this

shader {
   name shadername
   type
}


'shader' tells the renderer that this is a shader. The shader is contained in the following '{ }'

Where the purple text is, is where the shader's name is defined. It is up to the user to choose a name for the shader. 'type' defines the shader type. After this, but before the last '}' are other parameters the vary depending on the shader type.

Now below is an object block.

object {
   shader shadername
   type generic-mesh
   name "Plane"
   points 8
      -4.25819396973 -4.8784570694 5.70054674149
      -5.13696432114 -5.61583280563 4.06224298477
      -6.422539711 -4.08374404907 4.06224298477
      -5.54376888275 -3.34636831284 5.70054721832
   triangles 2
      0 1 2
      0 2 3
}


Right after 'shader' it says 'shadername'. This means it's linked to the shader thats named 'shadername'. So there, you would put the name of the shader you wish to link to your mesh object.

Now for the shader types...



Next >