diff options
Diffstat (limited to 'intern/cycles/render/camera.h')
-rw-r--r-- | intern/cycles/render/camera.h | 8 |
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); |