Cycles: Initial support of 3D textures for CUDA rendering
Supports both smoke/fire and point density textures now. Reduces number of textures available for sm_20 and sm_21, but you have to compromise somewhere on such a limited hardware. Currently limited to linear interpolation only, and decoupled ray marching is not supported yet. Think those could be considered just a further improvement. Some quick example: https://developer.blender.org/F282934 Code is minimal and we can fully consider it a fix for missing support of 3D textures with CUDA. Reviewers: lukasstockner97, brecht, juicyfruit, dingto Reviewed By: brecht, juicyfruit, dingto Subscribers: mib2berlin Differential Revision: https://developer.blender.org/D1806
This commit is contained in:
@@ -62,6 +62,7 @@ typedef texture<int, 1> texture_int;
|
||||
typedef texture<uint4, 1> texture_uint4;
|
||||
typedef texture<uchar4, 1> texture_uchar4;
|
||||
typedef texture<float4, 2> texture_image_float4;
|
||||
typedef texture<float4, 3> texture_image3d_float4;
|
||||
typedef texture<uchar4, 2, cudaReadModeNormalizedFloat> texture_image_uchar4;
|
||||
|
||||
/* Macros to handle different memory storage on different devices */
|
||||
@@ -79,6 +80,7 @@ typedef texture<uchar4, 2, cudaReadModeNormalizedFloat> texture_image_uchar4;
|
||||
#define kernel_tex_fetch(t, index) t[(index)]
|
||||
#endif
|
||||
#define kernel_tex_image_interp(t, x, y) tex2D(t, x, y)
|
||||
#define kernel_tex_image_interp_3d(t, x, y, z) tex3D(t, x, y, z)
|
||||
|
||||
#define kernel_data __data
|
||||
|
||||
|
Reference in New Issue
Block a user