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:
authorMai Lavelle <mai.lavelle@gmail.com>2016-04-11 23:49:09 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-12 00:12:11 +0300
commitebfdd7da83200f2890b28dd5ef9a0fc8c6ab9137 (patch)
tree8ccb1ad1af787ccf3d186b687324e4056f9665df /intern/cycles/render/camera.h
parent7d033717ad52bf92235e65224b6b3940de7ec473 (diff)
Cycles microdisplacement: perform subdivision dicing in raster space
NOTE: this is only the first of many patches towards completing the subdivison and displacement system in Cycles. These patches will be reviewed and committed one by one over the coming weeks. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D1909
Diffstat (limited to 'intern/cycles/render/camera.h')
-rw-r--r--intern/cycles/render/camera.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index 6fbb1dc3bc8..684b4458dfc 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -120,6 +120,8 @@ public:
int width, height;
int resolution;
BoundBox2D viewplane;
+ /* width and height change during preview, so we need these for calculating dice rates. */
+ int full_width, full_height;
/* border */
BoundBox2D border;
@@ -151,6 +153,9 @@ public:
float3 dx;
float3 dy;
+ float3 full_dx;
+ float3 full_dy;
+
/* update */
bool need_update;
bool need_device_update;
@@ -176,6 +181,9 @@ public:
/* Public utility functions. */
BoundBox viewplane_bounds_get();
+ /* Calculates the width of a pixel at point in world space. */
+ float world_to_raster_size(float3 P);
+
private:
/* Private utility functions. */
float3 transform_raster_to_world(float raster_x, float raster_y);