Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/render_texture.c
| Show First 20 Lines • Show All 1,714 Lines • ▼ Show 20 Lines | if (shi->osatex) { | ||||
| } | } | ||||
| else dxt[1] = dyt[1] = 0.f; | else dxt[1] = dyt[1] = 0.f; | ||||
| if (mtex->projz) { | if (mtex->projz) { | ||||
| dxt[2] = mtex->size[2]*dx[mtex->projz - 1]; | dxt[2] = mtex->size[2]*dx[mtex->projz - 1]; | ||||
| dyt[2] = mtex->size[2]*dy[mtex->projz - 1]; | dyt[2] = mtex->size[2]*dy[mtex->projz - 1]; | ||||
| } | } | ||||
| else dxt[2]= dyt[2] = 0.f; | else dxt[2]= dyt[2] = 0.f; | ||||
| } | } | ||||
| if (mtex->tex->type == TEX_ENVMAP) { | |||||
| EnvMap *env = tex->env; | |||||
| if (!env->object) { | |||||
| // env->object is a view point for envmap rendering | |||||
| // if it's not set, return the result depending on the world_space_shading flag | |||||
| if (BKE_scene_use_world_space_shading(R.scene)) { | |||||
| mul_mat3_m4_v3(R.viewinv, texvec); | |||||
| if (shi->osatex) { | |||||
| mul_mat3_m4_v3(R.viewinv, dxt); | |||||
| mul_mat3_m4_v3(R.viewinv, dyt); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| /* Bump code from 2.5 development cycle, has a number of bugs, but here for compatibility */ | /* Bump code from 2.5 development cycle, has a number of bugs, but here for compatibility */ | ||||
| typedef struct CompatibleBump { | typedef struct CompatibleBump { | ||||
| float nu[3], nv[3], nn[3]; | float nu[3], nv[3], nn[3]; | ||||
| float dudnu, dudnv, dvdnu, dvdnv; | float dudnu, dudnv, dvdnu, dvdnv; | ||||
| ▲ Show 20 Lines • Show All 2,215 Lines • Show Last 20 Lines | |||||