Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/zbuf.c
| Show First 20 Lines • Show All 2,060 Lines • ▼ Show 20 Lines | void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart *, ZSpan *, int, void *), void *data) | ||||
| ZSpan zspans[16], *zspan; /* 16 = RE_MAX_OSA */ | ZSpan zspans[16], *zspan; /* 16 = RE_MAX_OSA */ | ||||
| VlakRen *vlr= NULL; | VlakRen *vlr= NULL; | ||||
| VertRen *v1, *v2, *v3, *v4; | VertRen *v1, *v2, *v3, *v4; | ||||
| Material *ma = NULL; | Material *ma = NULL; | ||||
| ObjectInstanceRen *obi; | ObjectInstanceRen *obi; | ||||
| ObjectRen *obr; | ObjectRen *obr; | ||||
| float obwinmat[4][4], winmat[4][4], bounds[4]; | float obwinmat[4][4], winmat[4][4], bounds[4]; | ||||
| float ho1[4], ho2[4], ho3[4], ho4[4]={0}; | float ho1[4], ho2[4], ho3[4], ho4[4]={0}; | ||||
| unsigned int lay= rl->lay, lay_zmask= rl->lay_zmask; | unsigned int lay= (1 << 20) - 1, lay_zmask= 0; | ||||
| int i, v, zvlnr, zsample, samples, c1, c2, c3, c4=0; | int i, v, zvlnr, zsample, samples, c1, c2, c3, c4=0; | ||||
| short nofill=0, env=0, wire=0, zmaskpass=0; | short nofill=0, env=0, wire=0, zmaskpass=0; | ||||
| const bool all_z = (rl->layflag & SCE_LAY_ALL_Z) && !(rl->layflag & SCE_LAY_ZMASK); | const bool all_z = (rl->layflag & SCE_LAY_ALL_Z) && !(rl->layflag & SCE_LAY_ZMASK); | ||||
| const bool neg_zmask = (rl->layflag & SCE_LAY_ZMASK) && (rl->layflag & SCE_LAY_NEG_ZMASK); | const bool neg_zmask = (rl->layflag & SCE_LAY_ZMASK) && (rl->layflag & SCE_LAY_NEG_ZMASK); | ||||
| zbuf_make_winmat(&R, winmat); | zbuf_make_winmat(&R, winmat); | ||||
| samples= (R.osa? R.osa: 1); | samples= (R.osa? R.osa: 1); | ||||
| ▲ Show 20 Lines • Show All 1,367 Lines • ▼ Show 20 Lines | static int zbuffer_abuf_render(RenderPart *pa, APixstr *APixbuf, APixstrand *APixbufstrand, ListBase *apsmbase, RenderLayer *rl, StrandShadeCache *sscache) | ||||
| else if (R.i.curblur) | else if (R.i.curblur) | ||||
| jit= &R.mblur_jit[R.i.curblur-1]; | jit= &R.mblur_jit[R.i.curblur-1]; | ||||
| else | else | ||||
| jit= NULL; | jit= NULL; | ||||
| zbuf_make_winmat(&R, winmat); | zbuf_make_winmat(&R, winmat); | ||||
| if (rl->layflag & SCE_LAY_ZTRA) | if (rl->layflag & SCE_LAY_ZTRA) | ||||
| doztra+= zbuffer_abuf(&R, pa, APixbuf, apsmbase, rl->lay, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0); | doztra+= zbuffer_abuf(&R, pa, APixbuf, apsmbase, (1 << 20) - 1, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0); | ||||
| if ((rl->layflag & SCE_LAY_STRAND) && APixbufstrand) | if ((rl->layflag & SCE_LAY_STRAND) && APixbufstrand) | ||||
| doztra+= zbuffer_strands_abuf(&R, pa, APixbufstrand, apsmbase, rl->lay, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0, sscache); | doztra+= zbuffer_strands_abuf(&R, pa, APixbufstrand, apsmbase, (1 << 20) - 1, negzmask, winmat, R.winx, R.winy, samples, jit, R.clipcrop, 0, sscache); | ||||
| return doztra; | return doztra; | ||||
| } | } | ||||
| void zbuffer_abuf_shadow(Render *re, LampRen *lar, float winmat[4][4], APixstr *APixbuf, APixstrand *APixbufstrand, ListBase *apsmbase, int size, int samples, float (*jit)[2]) | void zbuffer_abuf_shadow(Render *re, LampRen *lar, float winmat[4][4], APixstr *APixbuf, APixstrand *APixbufstrand, ListBase *apsmbase, int size, int samples, float (*jit)[2]) | ||||
| { | { | ||||
| RenderPart pa; | RenderPart pa; | ||||
| int lay= -1; | int lay= -1; | ||||
| ▲ Show 20 Lines • Show All 828 Lines • Show Last 20 Lines | |||||