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:
authorMiika Hamalainen <blender@miikah.org>2012-05-25 13:40:56 +0400
committerMiika Hamalainen <blender@miikah.org>2012-05-25 13:40:56 +0400
commitc4bbc5abfcb543563872e42a8352917682787b14 (patch)
treec06cdbdc0d19c973b9e74aa7df029f28268ee47a /source/blender/editors/space_view3d/drawvolume.c
parent19dd66cf3b0108c0a74d7626b31c1b8cb9dd57fe (diff)
Fixed smoke 3D-view issues: Preview became invisible from certain angles if domain size was < 1.0 and density+shading strength changed depended on domain size.
Diffstat (limited to 'source/blender/editors/space_view3d/drawvolume.c')
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 10ae96d87bf..19cf9d9e20f 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -319,9 +319,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float min[3], float max[3], int r
for (i = 0; i < 8; i++) {
float x, y, z;
- x = cv[i][0] - viewnormal[0];
- y = cv[i][1] - viewnormal[1];
- z = cv[i][2] - viewnormal[2];
+ x = cv[i][0] - viewnormal[0]*size[0]*0.5f;
+ y = cv[i][1] - viewnormal[1]*size[1]*0.5f;
+ z = cv[i][2] - viewnormal[2]*size[2]*0.5f;
if ((x >= min[0]) && (x <= max[0]) &&
(y >= min[1]) && (y <= max[1]) &&
@@ -373,7 +373,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float min[3], float max[3], int r
/* d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]); */ /* UNUSED */
ds = (ABS(viewnormal[0]) * size[0] + ABS(viewnormal[1]) * size[1] + ABS(viewnormal[2]) * size[2]);
- dd = 0.05; // ds/512.0f;
+ dd = ds/96.f;
n = 0;
good_index = i;