diff options
author | Ton Roosendaal <ton@blender.org> | 2006-12-08 12:40:44 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-12-08 12:40:44 +0300 |
commit | 902a69a7d3fad91d84bc109a6e6e5fd039a79e4b (patch) | |
tree | 113e76f7b85c50a428142086ac82e86eb9e2d9fb /source/blender/render/intern/include/shading.h | |
parent | 3da771fefcde9efc3797bb08cd3d90d09dbe1f81 (diff) |
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).
Diffstat (limited to 'source/blender/render/intern/include/shading.h')
-rw-r--r-- | source/blender/render/intern/include/shading.h | 9 |
1 files changed, 8 insertions, 1 deletions
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); |