You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is a demo for customized AOV lookup color :
107
+
// For AOV representing ID ( like RPR_AOV_OBJECT_ID, RPR_AOV_MATERIAL_ID ), we can set custom colors for each ID instead of using the random colors assigned by the renderer.
108
+
{
109
+
std::cout<<"Demo for AOV lookup color..."<<std::endl;
110
+
111
+
// assign red to ID=0, green to ID=1 ... etc...
112
+
CHECK( rprContextSetAOVindexLookup(context, 0, 1.0, 0.0, 0.0, 0.0) ); // red
113
+
CHECK( rprContextSetAOVindexLookup(context, 1, 0.0, 1.0, 0.0, 0.0) ); // green
114
+
CHECK( rprContextSetAOVindexLookup(context, 2, 0.0, 0.0, 1.0, 0.0) ); // blue
// in this rendering, the inner ball will be rendered as mangenta inside the RPR_AOV_OBJECT_ID AOV. this is because the index 99 has been assigned to the magenta color
121
+
CHECK( rprShapeSetObjectID(matBall0.inner, 99) );
122
+
123
+
// clear the framebuffers before starting a new rendering
// You will notice that colors from 33_obj_id_2.png are different compared to 33_obj_id.png.
140
+
// Same thing for 33_mat_id.
141
+
}
142
+
143
+
144
+
// This is a demo for integer framebuffer
145
+
// For AOV representing ID ( like RPR_AOV_OBJECT_ID, RPR_AOV_MATERIAL_ID ), we can choose to export them as 32bits integer format framebuffer instead of 3-float colors.
146
+
{
147
+
std::cout<<"Demo for integer framebuffer..."<<std::endl;
0 commit comments