diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-11-05 18:55:51 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-11-27 17:54:15 +0300 |
commit | 7959dcd4f6316ade726209f2452323406f3672ea (patch) | |
tree | dd8b3080bd155416e3b5a02540708257ebfcdf30 /source/blender/makesdna | |
parent | 9d7f65630b206385c03d997aa308dbe36c60298f (diff) |
RenderViewport: Texture Format
When doing viewport rendering the color management happens on the CPU.
This has overhead in downloading a float texture from the gpu and
performing color management on the CPU.
Based on the scene fileformat bit depth the result will be rendered to
a byte texture where the colormanagement happens on the GPU or a float
texture where the colormanagement happens on the CPU.
This is only done during `Viewport Render Animation` in other
cases a float texture is being used.
Baseline (HD render of wanderer.blend workbench engine no samples) 15.688038 s
After changes: 9.412880s
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6195
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 0de43c1632f..ce0c7319ce5 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -483,13 +483,23 @@ typedef struct ImageFormatData { #define R_IMF_FLAG_PREVIEW_JPG (1 << 1) /* was R_PREVIEW_JPG */ /* return values from BKE_imtype_valid_depths, note this is depts per channel */ -#define R_IMF_CHAN_DEPTH_1 (1 << 0) /* 1bits (unused) */ -#define R_IMF_CHAN_DEPTH_8 (1 << 1) /* 8bits (default) */ -#define R_IMF_CHAN_DEPTH_10 (1 << 2) /* 10bits (uncommon, Cineon/DPX support) */ -#define R_IMF_CHAN_DEPTH_12 (1 << 3) /* 12bits (uncommon, jp2/DPX support) */ -#define R_IMF_CHAN_DEPTH_16 (1 << 4) /* 16bits (tiff, halff float exr) */ -#define R_IMF_CHAN_DEPTH_24 (1 << 5) /* 24bits (unused) */ -#define R_IMF_CHAN_DEPTH_32 (1 << 6) /* 32bits (full float exr) */ +/* ImageFormatData.depth */ +typedef enum eImageFormatDepth { + /* 1bits (unused) */ + R_IMF_CHAN_DEPTH_1 = (1 << 0), + /* 8bits (default) */ + R_IMF_CHAN_DEPTH_8 = (1 << 1), + /* 10bits (uncommon, Cineon/DPX support) */ + R_IMF_CHAN_DEPTH_10 = (1 << 2), + /* 12bits (uncommon, jp2/DPX support) */ + R_IMF_CHAN_DEPTH_12 = (1 << 3), + /* 16bits (tiff, half float exr) */ + R_IMF_CHAN_DEPTH_16 = (1 << 4), + /* 24bits (unused) */ + R_IMF_CHAN_DEPTH_24 = (1 << 5), + /* 32bits (full float exr) */ + R_IMF_CHAN_DEPTH_32 = (1 << 6), +} eImageFormatDepth; /* ImageFormatData.planes */ #define R_IMF_PLANES_RGB 24 |