From 902a69a7d3fad91d84bc109a6e6e5fd039a79e4b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 8 Dec 2006 09:40:44 +0000 Subject: Numerous fixes in Render code: - Bug: material emit was ignored (showed in preview render backdrop) - Bug: world exposure was ignored - Bug: lamp halo was ignoring 'render layer light override'. Further reshuffled the way shadows are being pre-calculated, this to enable more advanced (and faster) usage of Material lightgroups. Now shadows are being cached in lamps, using a per-sample counter to check if a recalc is needed. Will also work (later) for Raytracing node shaders. - New: Material LightGroup option "Always", which always shades the lights in the group, independent of visibility layer. (so it allows to move such lights to hidden layer, not influencing anything). --- source/blender/render/intern/include/shading.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/render/intern/include/shading.h') diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 38ed0f73e70..6c8f20673ed 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -28,6 +28,7 @@ struct ShadeResult; struct RenderPart; struct RenderLayer; struct PixStr; +struct LampRen; /* shadeinput.c */ @@ -35,8 +36,12 @@ struct PixStr; /* needed to calculate shadow and AO for an entire pixel */ typedef struct ShadeSample { int tot; /* amount of shi in use, can be 1 for not FULL_OSA */ + + /* could be malloced once */ ShadeInput shi[16]; /* RE_MAX_OSA */ ShadeResult shr[16]; /* RE_MAX_OSA */ + + int samplenr; /* counter, detect shadow-reuse for shaders */ } ShadeSample; @@ -52,8 +57,10 @@ void shade_input_set_normals(struct ShadeInput *shi); void shade_input_set_shade_texco(struct ShadeInput *shi); void shade_input_do_shade(struct ShadeInput *shi, struct ShadeResult *shr); +void shade_input_initialize(struct ShadeInput *shi, struct RenderPart *pa, struct RenderLayer *rl, int sample); + void shade_sample_initialize(struct ShadeSample *ssamp, struct RenderPart *pa, struct RenderLayer *rl); -void shade_samples_do_shadow(struct ShadeSample *ssamp); +void shade_samples_do_AO(struct ShadeSample *ssamp); int shade_samples(struct ShadeSample *ssamp, struct PixStr *ps, int x, int y); void vlr_set_uv_indices(struct VlakRen *vlr, int *i1, int *i2, int *i3); -- cgit v1.2.3