![]()  | 
  
    Blender V2.61 - r43446 
   | 
 
#include <float.h>#include <math.h>#include <string.h>#include "BLI_math.h"#include "BLI_utildefines.h"#include "IMB_imbuf_types.h"#include "IMB_imbuf.h"#include "DNA_camera_types.h"#include "DNA_group_types.h"#include "DNA_material_types.h"#include "DNA_object_types.h"#include "DNA_image_types.h"#include "DNA_texture_types.h"#include "DNA_lamp_types.h"#include "BKE_colortools.h"#include "BKE_image.h"#include "BKE_global.h"#include "BKE_material.h"#include "BKE_texture.h"#include "render_types.h"#include "renderpipeline.h"#include "renderdatabase.h"#include "texture.h"#include "pixelblending.h"#include "rendercore.h"#include "shadbuf.h"#include "pixelshading.h"#include "shading.h"#include "sunsky.h"Go to the source code of this file.
Functions | |
| static void | render_lighting_halo (HaloRen *har, float col_r[3]) | 
| static float | haloZtoDist (int z) | 
| int | shadeHaloFloat (HaloRen *har, float *col, int zz, float dist, float xn, float yn, short flarec) | 
| void | shadeSkyView (float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread) | 
| void | shadeSunView (float col_r[3], const float view[3]) | 
| void | shadeSkyPixel (float collector[4], float fx, float fy, short thread) | 
| void | shadeAtmPixel (struct SunSky *sunsky, float collector[3], float fx, float fy, float distance) | 
Variables | |
| struct Render | R | 
| float | hashvectf [] | 
Definition in file pixelshading.c.
| static float haloZtoDist | ( | int | z | ) |  [static] | 
        
Converts a halo z-buffer value to distance from the camera's near plane
| z | The z-buffer value to convert | 
Definition at line 258 of file pixelshading.c.
Referenced by shadeHaloFloat().
| static void render_lighting_halo | ( | HaloRen * | har, | 
| float | col_r[3] | ||
| ) |  [static] | 
        
Definition at line 78 of file pixelshading.c.
References LampRen::b, ShadeInput::co, LampRen::co, HaloRen::co, copy_v3_v3(), LampRen::dist, LampRen::distkw, do_lamp_tex(), LampRen::energy, fabs(), LampRen::g, i, LampRen::imat, LA_HEMI, LA_LAYER, LA_ONLYSHADOW, LA_QUAD, LA_SPHERE, LA_SPOT, LA_SQUARE, LA_SUN, LA_TEXTURE, GroupObject::lampren, HaloRen::lay, LampRen::lay, LampRen::ld1, LampRen::ld2, MAX2, LampRen::mode, mul_m3_v3(), GroupObject::next, HaloRen::no, ShadeInput::osatex, LampRen::r, R, HaloRen::rad, LampRen::shb, LampRen::spotbl, LampRen::spotsi, sqrt(), testshadowbuf(), LampRen::type, and LampRen::vec.
Referenced by shadeHaloFloat().
| void shadeAtmPixel | ( | struct SunSky * | sunsky, | 
| float | collector[3], | ||
| float | fx, | ||
| float | fy, | ||
| float | distance | ||
| ) | 
Definition at line 648 of file pixelshading.c.
References AtmospherePixleShader(), calc_view_vector(), and normalize_v3().
| int shadeHaloFloat | ( | HaloRen * | har, | 
| float * | col, | ||
| int | zz, | ||
| float | dist, | ||
| float | xn, | ||
| float | yn, | ||
| short | flarec | ||
| ) | 
| col | (float[4]) Store the rgb color here (with alpha) The alpha is used to blend the color to the background color_new = (1-alpha)*color_background + color | 
| zz | The current zbuffer value at the place of this pixel | 
| dist | Distance of the pixel from the center of the halo squared. Given in pixels | 
| xn | The x coordinate of the pixel relaticve to the center of the halo. given in pixels | 
| yn | The y coordinate of the pixel relaticve to the center of the halo. given in pixels | 
Definition at line 282 of file pixelshading.c.
References HaloRen::alfa, angle(), KDL::atan2(), HaloRen::b, HaloRen::co, co, HaloRen::cos, cosf, do_halo_tex(), fabs(), fabsf, HaloRen::g, HA_FLARECIRC, HA_ONLYSKY, HA_VECT, HA_XALPHA, haloZtoDist(), HaloRen::hard, hashvectf, HaloRen::hasize, HaloRen::linec, M_PI_2, MA_HALO_SHADE, MA_HALO_SOFT, HaloRen::mat, Material::mirb, Material::mirg, Material::mirr, mistfactor(), Material::mode, HaloRen::pixels, HaloRen::r, R, HaloRen::rad, HaloRen::radsq, render_lighting_halo(), HaloRen::ringc, sasqrt(), HaloRen::seed, si, HaloRen::sin, sinf, Material::specb, Material::specg, Material::specr, sqrt(), sqrtf, HaloRen::starpoints, HaloRen::tex, HaloRen::type, WO_MIST, HaloRen::zd, and HaloRen::zs.
Referenced by halo_pixelstruct(), halo_tile(), and renderhalo_post().
| void shadeSkyPixel | ( | float | collector[4], | 
| float | fx, | ||
| float | fy, | ||
| short | thread | ||
| ) | 
Render the sky at pixel (x, y).
Definition at line 598 of file pixelshading.c.
References calc_view_vector(), copy_v3_v3(), normalize_v3(), NULL, R, shadeSkyView(), shadeSunView(), WO_SKYBLEND, WO_SKYPAPER, and WO_SKYTEX.
Referenced by sky_tile().
| void shadeSkyView | ( | float | col_r[3], | 
| const float | rco[3], | ||
| const float | view[3], | ||
| const float | dxyview[2], | ||
| short | thread | ||
| ) | 
Definition at line 503 of file pixelshading.c.
References blend(), copy_v3_v3(), do_sky_tex(), fabs(), mul_m3_v3(), R, SWAP, WO_SKYBLEND, WO_SKYPAPER, WO_SKYREAL, WO_SKYTEX, and WO_ZENUP.
Referenced by ray_ao_qmc(), ray_ao_spheresamp(), ray_fadeout_endcolor(), sample_occ_tree(), shadeSkyPixel(), and vol_trace_behind().
| void shadeSunView | ( | float | col_r[3], | 
| const float | view[3] | ||
| ) | 
Definition at line 562 of file pixelshading.c.
References SunSky::effect_type, GetSkyXYZRadiancef(), LA_SUN, LA_SUN_EFFECT_SKY, GroupObject::lampren, mul_m3_v3(), GroupObject::next, normalize_v3(), normalize_v3_v3(), R, ramp_blend(), SunSky::sky_colorspace, SunSky::skyblendfac, SunSky::skyblendtype, LampRen::sunsky, LampRen::type, and xyz_to_rgb().
Referenced by ray_ao_qmc(), ray_ao_spheresamp(), ray_fadeout_endcolor(), shadeSkyPixel(), and vol_trace_behind().
| float hashvectf[] | 
Definition at line 177 of file noise.c.
Referenced by orgBlenderNoise(), ray_trace_shadow_rad(), renderflare(), and shadeHaloFloat().
Definition at line 127 of file pipeline.c.