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
This commit is contained in:

committed by
Brecht Van Lommel

parent
7d033717ad
commit
ebfdd7da83
@@ -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);
|
||||
|
Reference in New Issue
Block a user