From 0ce3a755f83b047f49f78da1729a73b56b9c9d55 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 13 Jun 2014 23:40:39 +0200 Subject: Cycles: Add support for uchar4 attributes. * Added support for uchar4 attributes to Cycles' attribute system. * This is used for Vertex Colors now, which saves some memory (4 unsigned characters, instead of 4 floats). * GPU Texture Limit on sm_20 and sm_21 decreased from 95 to 94, because we need a new texture for the uchar4 attributes. This is no problem for sm_30 or newer. Part of my GSoC 2014. --- intern/cycles/render/attribute.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/render/attribute.h') diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h index 9fc32db8444..f5227ebde52 100644 --- a/intern/cycles/render/attribute.h +++ b/intern/cycles/render/attribute.h @@ -68,6 +68,7 @@ public: float3 *data_float3() { return (float3*)data(); } float4 *data_float4() { return (float4*)data(); } float *data_float() { return (float*)data(); } + uchar4 *data_uchar4() { return (uchar4*)data(); } Transform *data_transform() { return (Transform*)data(); } VoxelAttribute *data_voxel() { return ( VoxelAttribute*)data(); } @@ -80,6 +81,7 @@ public: void add(const float& f); void add(const float3& f); + void add(const uchar4& f); void add(const Transform& f); void add(const VoxelAttribute& f); void add(const char *data); -- cgit v1.2.3