Tachyon (current)
Current Main Branch
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "macros.h"
#include "threads.h"
#include "light.h"
#include "intersect.h"
#include "vector.h"
#include "trace.h"
#include "shade.h"
Go to the source code of this file.
Macros | |
#define | TACHYON_INTERNAL 1 |
Functions | |
color | lowest_shader (ray *incident) |
color | low_shader (ray *incident) |
color | medium_shader (ray *incident) |
color | full_shader (ray *incident) |
color | shade_ambient_occlusion (ray *incident, const shadedata *shadevars) |
color | shade_reflection (ray *incident, const shadedata *shadevars, flt specular) |
color | shade_transmission (ray *incident, const shadedata *shadevars, flt trans) |
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) |
flt | shade_phong (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 *fog, color col, flt r) |
OpenGL-like linear fog. More... | |
color | fog_color_exp (struct fogdata_t *fog, color col, flt r) |
OpenGL-like exponential fog. More... | |
color | fog_color_exp2 (struct fogdata_t *fog, color col, flt r) |
OpenGL-like exponential-squared fog. More... | |
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().
color fog_color_exp | ( | struct fogdata_t * | fog, |
color | col, | ||
flt | r | ||
) |
OpenGL-like exponential fog.
Definition at line 715 of file shade.c.
References EXP.
Referenced by rt_fog_mode().
color fog_color_exp2 | ( | struct fogdata_t * | fog, |
color | col, | ||
flt | r | ||
) |
OpenGL-like exponential-squared fog.
Definition at line 735 of file shade.c.
References EXP.
Referenced by rt_fog_mode().
color fog_color_linear | ( | struct fogdata_t * | fog, |
color | col, | ||
flt | r | ||
) |
color full_shader | ( | ray * | incident | ) |
Definition at line 233 of file shade.c.
References add_clipped_shadow_intersection(), add_shadow_intersection(), closest_intersection(), ColorAccum(), ColorAddS(), ColorScale(), COS, fog_color(), intersect_objects(), POW, RAYPNT, RT_FOG_NORMAL, RT_PHONG_METAL, RT_TRANS_RASTER3D, RT_TRANS_VMD, shade_ambient_occlusion(), light_t::shade_diffuse, shade_reflection(), shade_transmission(), shadow_intersection(), and VDot().
Referenced by rt_autoshader(), and rt_shadermode().
color low_shader | ( | ray * | incident | ) |
Definition at line 65 of file shade.c.
References closest_intersection(), and RAYPNT.
Referenced by rt_shadermode().
color lowest_shader | ( | ray * | incident | ) |
Definition at line 32 of file shade.c.
References closest_intersection().
Referenced by rt_shadermode().
color medium_shader | ( | ray * | incident | ) |
Definition at line 93 of file shade.c.
References closest_intersection(), ColorAccum(), ColorAddS(), ColorScale(), COS, fog_color(), POW, RAYPNT, RT_FOG_NORMAL, RT_PHONG_METAL, RT_TRANS_RASTER3D, RT_TRANS_VMD, light_t::shade_diffuse, shade_reflection(), shade_transmission(), and VDot().
Referenced by rt_shadermode().
color shade_ambient_occlusion | ( | ray * | incident, |
const shadedata * | shadevars | ||
) |
Definition at line 410 of file shade.c.
References add_clipped_shadow_intersection(), add_shadow_intersection(), intersect_objects(), jitter_sphere3f(), Raypnt(), shadow_intersection(), and VDot().
Referenced by full_shader().
Definition at line 574 of file shade.c.
Referenced by rt_phong_shader().
color shade_reflection | ( | ray * | incident, |
const shadedata * | shadevars, | ||
flt | specular | ||
) |
Definition at line 489 of file shade.c.
References ColorScale(), intersect_objects(), Raypnt(), and VAddS().
Referenced by full_shader(), and medium_shader().
color shade_transmission | ( | ray * | incident, |
const shadedata * | shadevars, | ||
flt | trans | ||
) |
Definition at line 533 of file shade.c.
References ColorScale(), intersect_objects(), and Raypnt().
Referenced by ext_volume_texture(), full_shader(), medium_shader(), par_volume_texture(), and scalar_volume_texture().