diff options
author | Matt Ebb <matt@mke3.net> | 2007-09-07 07:48:50 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2007-09-07 07:48:50 +0400 |
commit | 0ba5295404dd1c2ee04a9e7823eafc664562f4eb (patch) | |
tree | 816891a80322ecc06a5016cfb1e8ef4abba9f0ba /source/blender/render/intern/include | |
parent | f85cd06873a991fec91766ea8cd5efe3eda17594 (diff) |
* QMC Raytracing
This introduces QMC sampling for use in glossy reflections/refractions, soft raytraced shadows, and ambient occlusion.
This work includes many new features and speed-ups, so check out the nice docs here:
Glossy Reflection/Refraction
http://www.blender.org/development/current-projects/changes-since-244/glossy-reflectionrefraction/
Raytraced Soft Shadows
http://www.blender.org/development/current-projects/changes-since-244/raytraced-soft-shadows/
QMC Sampling
http://www.blender.org/development/current-projects/changes-since-244/qmc-sampling/
Many thanks to Brecht van Lommel for some initial code snippets and for reviewing the patch, and especially to Alfredo de Greef who gave me a lot of guidance and help along the way!
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r-- | source/blender/render/intern/include/render_types.h | 21 | ||||
-rw-r--r-- | source/blender/render/intern/include/rendercore.h | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 5c2e788ce44..b6d1024a081 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -59,6 +59,18 @@ typedef struct SampleTables } SampleTables; +typedef struct QMCSampler +{ + int type; + int tot; + double *samp2d; + double offs[BLENDER_MAX_THREADS][2]; +} QMCSampler; + +#define SAMP_TYPE_JITTERED 0 +#define SAMP_TYPE_HALTON 1 +#define SAMP_TYPE_HAMMERSLEY 2 + /* this is handed over to threaded hiding/passes/shading engine */ typedef struct RenderPart { @@ -130,6 +142,7 @@ struct Render /* samples */ SampleTables *samples; float jit[32][2]; + QMCSampler *qsa; /* scene, and its full copy of renderdata and world */ Scene *scene; @@ -335,12 +348,14 @@ typedef struct LampRen { /** A small depth offset to prevent self-shadowing. */ float bias; - short ray_samp, ray_sampy, ray_sampz, ray_samp_type, area_shape, ray_totsamp; + short ray_samp, ray_sampy, ray_sampz, ray_samp_method, ray_samp_type, area_shape, ray_totsamp; short xold[BLENDER_MAX_THREADS], yold[BLENDER_MAX_THREADS]; /* last jitter table for area lights */ float area_size, area_sizey, area_sizez; - + float adapt_thresh; + struct ShadBuf *shb; float *jitter; + QMCSampler *qsa; float imat[3][3]; float spottexfac; @@ -351,7 +366,7 @@ typedef struct LampRen { /* passes & node shader support: all shadow info for a pixel */ LampShadowSample *shadsamp; - + /* yafray: photonlight params */ int YF_numphotons, YF_numsearch; short YF_phdepth, YF_useqmc, YF_bufsize; diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h index 3e3c49e87d0..0d807d56180 100644 --- a/source/blender/render/intern/include/rendercore.h +++ b/source/blender/render/intern/include/rendercore.h @@ -99,6 +99,10 @@ extern void ray_trace(ShadeInput *, ShadeResult *); extern void ray_ao(ShadeInput *, float *); extern void init_jitter_plane(LampRen *lar); extern void init_ao_sphere(struct World *wrld); +extern void init_lamp_hammersley(LampRen *lar); +extern void free_lamp_qmcsampler(LampRen *lar); +extern void init_render_hammersley(Render *re); +extern void free_render_qmcsampler(Render *re); #endif /* RENDER_EXT_H */ |