2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 #ifndef __RENDERCORE_H__
29 #define __RENDERCORE_H__
31 /** \file blender/render/intern/include/rendercore.h
35 #include "render_types.h"
47 /* ------------------------------------------------------------------------- */
49 typedef struct PixStr {
51 int obi, facenr, z, maskz;
56 typedef struct PixStrMain {
57 struct PixStrMain *next, *prev;
62 /* ------------------------------------------------------------------------- */
65 void calc_view_vector(float view[3], float x, float y);
66 float mistfactor(float zcor, const float co[3]); /* dist and height, return alpha */
68 void renderspothalo(struct ShadeInput *shi, float col[4], float alpha);
69 void add_halo_flare(Render *re);
71 void calc_renderco_zbuf(float co[3], const float view[3], int z);
72 void calc_renderco_ortho(float co[3], float x, float y, int z);
74 int count_mask(unsigned short mask);
76 void zbufshade_tile(struct RenderPart *pa);
77 void zbufshadeDA_tile(struct RenderPart *pa);
79 void zbufshade_sss_tile(struct RenderPart *pa);
81 int get_sample_layers(struct RenderPart *pa, struct RenderLayer *rl, struct RenderLayer **rlpp);
84 /* -------- ray.c ------- */
86 extern void freeraytree(Render *re);
87 extern void makeraytree(Render *re);
88 struct RayObject* makeraytree_object(Render *re, ObjectInstanceRen *obi);
90 extern void ray_shadow(ShadeInput *shi, LampRen *lar, float shadfac[4]);
91 extern void ray_trace(ShadeInput *shi, ShadeResult *);
92 extern void ray_ao(ShadeInput *shi, float ao[3], float env[3]);
93 extern void init_jitter_plane(LampRen *lar);
94 extern void init_ao_sphere(struct World *wrld);
95 extern void init_render_qmcsampler(Render *re);
96 extern void free_render_qmcsampler(Render *re);
98 #endif /* __RENDERCORE_H__ */