Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-07-13 18:02:27 +0400
committerTon Roosendaal <ton@blender.org>2006-07-13 18:02:27 +0400
commitec9b9525827a80072f7da48ba6034aca28c455fc (patch)
tree7b836e191dfbc735a93fcef05604c006634b10fc
parentf1eed11ad75df3f0e43d847a341ee34b6a59482e (diff)
Bugfix #4683
Render non-osa, with mblur, did not jitter the zbuffering, so it did not result in basic AA for non moving parts. Note to self: this now works on < 2.42 level again: it doesn't use the correct subsampling, which can cause slight errors in rendering image textures.
-rw-r--r--source/blender/render/intern/source/initrender.c10
-rw-r--r--source/blender/render/intern/source/zbuf.c8
2 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index b1f40057386..dc54508a4ad 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -90,12 +90,12 @@ static void init_render_jit(Render *re)
static float jit[32][2]; /* simple caching */
static int lastjit= 0;
- if(lastjit!=re->osa) {
+ if(lastjit!=re->r.osa) {
memset(jit, 0, sizeof(jit));
- BLI_initjit(jit[0], re->osa);
+ BLI_initjit(jit[0], re->r.osa);
}
- lastjit= re->osa;
+ lastjit= re->r.osa;
memcpy(re->jit, jit, sizeof(jit));
}
@@ -272,6 +272,8 @@ void make_sample_tables(Render *re)
free_sample_tables(re);
+ init_render_jit(re); /* needed for mblur too */
+
if(re->osa==0) {
/* just prevents cpu cycles for larger render and copying */
re->r.filtertype= 0;
@@ -284,8 +286,6 @@ void make_sample_tables(Render *re)
re->do_gamma= 1;
}
- init_render_jit(re);
-
st= re->samples= MEM_callocN(sizeof(SampleTables), "sample tables");
for(a=0; a<9;a++) {
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 74375c409bd..7cd21836469 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -1632,6 +1632,10 @@ void zbuffer_solid(RenderPart *pa, unsigned int lay, short layflag)
zspan.zofsx= -pa->disprect.xmin - R.jit[pa->sample][0];
zspan.zofsy= -pa->disprect.ymin - R.jit[pa->sample][1];
}
+ else if(R.i.curblur) {
+ zspan.zofsx= -pa->disprect.xmin - R.jit[R.i.curblur-1][0];
+ zspan.zofsy= -pa->disprect.ymin - R.jit[R.i.curblur-1][1];
+ }
else {
zspan.zofsx= -pa->disprect.xmin;
zspan.zofsy= -pa->disprect.ymin;
@@ -2429,6 +2433,10 @@ static void zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, u
zspan.zofsx= -pa->disprect.xmin-R.jit[zsample][0];
zspan.zofsy= -pa->disprect.ymin-R.jit[zsample][1];
}
+ else if(R.i.curblur) {
+ zspan.zofsx= -pa->disprect.xmin - R.jit[R.i.curblur-1][0];
+ zspan.zofsy= -pa->disprect.ymin - R.jit[R.i.curblur-1][1];
+ }
for(v=0; v<R.totvlak; v++) {
if((v & 255)==0)