Tachyon (current)  Current Main Branch
Functions
shade.h File Reference

Go to the source code of this file.

Functions

color lowest_shader (ray *)
 
color low_shader (ray *)
 
color medium_shader (ray *)
 
color full_shader (ray *)
 
color shade_reflection (ray *, const shadedata *, flt)
 
color shade_transmission (ray *, const shadedata *, flt)
 
color shade_ambient_occlusion (ray *incident, const shadedata *shadevars)
 
flt shade_phong (const ray *incident, const shadedata *shadevars, flt specpower)
 
flt shade_nullphong (const ray *incident, const shadedata *shadevars, flt specpower)
 
flt shade_blinn (const ray *incident, const shadedata *shadevars, flt specpower)
 
flt shade_blinn_fast (const ray *incident, const shadedata *shadevars, flt specpower)
 
color fog_color (const ray *incident, color col, flt t)
 Compute the fog color, given the active fogging function and fog parameters. More...
 
color fog_color_linear (struct fogdata_t *, color col, flt z)
 OpenGL-like linear fog. More...
 
color fog_color_exp (struct fogdata_t *, color col, flt z)
 OpenGL-like exponential fog. More...
 
color fog_color_exp2 (struct fogdata_t *, color col, flt z)
 OpenGL-like exponential-squared fog. More...
 

Function Documentation

◆ fog_color()

color fog_color ( const ray *  incident,
color  col,
flt  t 
)

Compute the fog color, given the active fogging function and fog parameters.

Definition at line 676 of file shade.c.

References RT_FOG_OPENGL, and VDot().

Referenced by full_shader(), and medium_shader().

◆ fog_color_exp()

color fog_color_exp ( struct fogdata_t *  ,
color  col,
flt  z 
)

OpenGL-like exponential fog.

Definition at line 715 of file shade.c.

References EXP.

Referenced by rt_fog_mode().

◆ fog_color_exp2()

color fog_color_exp2 ( struct fogdata_t *  ,
color  col,
flt  z 
)

OpenGL-like exponential-squared fog.

Definition at line 735 of file shade.c.

References EXP.

Referenced by rt_fog_mode().

◆ fog_color_linear()

color fog_color_linear ( struct fogdata_t *  ,
color  col,
flt  z 
)

OpenGL-like linear fog.

Definition at line 696 of file shade.c.

Referenced by rt_fog_mode().

◆ full_shader()

color full_shader ( ray *  )

◆ low_shader()

color low_shader ( ray *  )

Definition at line 65 of file shade.c.

References closest_intersection(), and RAYPNT.

Referenced by rt_shadermode().

◆ lowest_shader()

color lowest_shader ( ray *  )

Definition at line 32 of file shade.c.

References closest_intersection().

Referenced by rt_shadermode().

◆ medium_shader()

color medium_shader ( ray *  )

◆ shade_ambient_occlusion()

color shade_ambient_occlusion ( ray *  incident,
const shadedata *  shadevars 
)

◆ shade_blinn()

flt shade_blinn ( const ray *  incident,
const shadedata *  shadevars,
flt  specpower 
)

Definition at line 583 of file shade.c.

References POW, and SQRT.

Referenced by rt_phong_shader().

◆ shade_blinn_fast()

flt shade_blinn_fast ( const ray *  incident,
const shadedata *  shadevars,
flt  specpower 
)

Definition at line 616 of file shade.c.

References SQRT.

Referenced by rt_phong_shader().

◆ shade_nullphong()

flt shade_nullphong ( const ray *  incident,
const shadedata *  shadevars,
flt  specpower 
)

Definition at line 574 of file shade.c.

Referenced by rt_phong_shader().

◆ shade_phong()

flt shade_phong ( const ray *  incident,
const shadedata *  shadevars,
flt  specpower 
)

Definition at line 646 of file shade.c.

References POW, VAddS(), VDot(), VNorm(), and VScale().

Referenced by rt_phong_shader().

◆ shade_reflection()

color shade_reflection ( ray *  ,
const shadedata *  ,
flt   
)

Definition at line 489 of file shade.c.

References ColorScale(), intersect_objects(), Raypnt(), and VAddS().

Referenced by full_shader(), and medium_shader().

◆ shade_transmission()

color shade_transmission ( ray *  ,
const shadedata *  ,
flt   
)