HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_Utils.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RV_Utils.h ( RV Library, C++)
7  *
8  * COMMENTS:
9  * Utility functions for RV.
10  */
11 #ifndef RV_Utils_h
12 #define RV_Utils_h
13 
14 #include "RV_API.h"
15 
16 #include "RV_TypePtrs.h"
17 
18 #include <UT/UT_Vector3.h>
19 #include <UT/UT_Matrix4.h>
20 #include <UT/UT_UniquePtr.h>
21 #include <SYS/SYS_Types.h>
22 
23 class RV_Render;
24 class RV_ShaderBlock;
25 class RV_ShaderProgram;
27 class RV_VKImage;
28 class PXL_Lookup;
29 
31 
32 namespace RV_Utils
33 {
34 /// Returns an 8b RGBA 64x64 texture with 0-1 random values in all comps.
36  unsigned int seed,
37  bool interp,
38  int size = 64);
39 /// Returns an 8b RGBA size^3 3D texture with 0-1 random values
41  unsigned int seed,
42  bool interp,
43  int size = 32);
44 /// Returns an 8b RGBA size^2 2D texture array of size 'num_layers'
46  unsigned int seed,
47  bool interp,
48  int num_layers,
49  int size = 64 );
50 /// Create a new 2D image from a 2D multisample image by increasing the
51 /// resolution of the 2D image to show all samples.
53  RV_VKImage *ms_image);
54 
55 /// Create resources for color correction in HOUcolorCorrect().
57  RV_ShaderProgram *sh,
58  int set_number,
59  const PXL_Lookup *lut,
60  fpreal brightness,
61  fpreal bright_shift,
62  fpreal gamma,
63  fpreal alpha_scale,
64  exint &lut_version,
67  UT_UniquePtr<RV_VKImage> &main_lut_image,
68  UT_UniquePtr<RV_VKImage> &pre_lut_image);
69 
70 extern RV_API void
72  const PXL_Lookup *lut,
73  UT_UniquePtr<RV_VKImage> &main_lut,
74  UT_UniquePtr<RV_VKImage> &pre); // optionally generated prelut
75 
76 };
77 
78 #endif
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
RV_API RV_VKImagePtr getRandomTextureArray(RV_Render *r, unsigned int seed, bool interp, int num_layers, int size=64)
Returns an 8b RGBA size^2 2D texture array of size 'num_layers'.
int64 exint
Definition: SYS_Types.h:125
UT_UniquePtr< RV_VKImage > RV_VKImagePtr
Definition: RV_TypePtrs.h:51
RV_API void createLUTTexture(RV_Render *r, const PXL_Lookup *lut, UT_UniquePtr< RV_VKImage > &main_lut, UT_UniquePtr< RV_VKImage > &pre)
RV_API UT_UniquePtr< RV_VKImage > resolveMSTexture(RV_Render *r, RV_VKImage *ms_image)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
RV_API bool setupColorCorrection(RV_Render *r, RV_ShaderProgram *sh, int set_number, const PXL_Lookup *lut, fpreal brightness, fpreal bright_shift, fpreal gamma, fpreal alpha_scale, exint &lut_version, UT_UniquePtr< RV_ShaderVariableSet > &set, UT_UniquePtr< RV_ShaderBlock > &block, UT_UniquePtr< RV_VKImage > &main_lut_image, UT_UniquePtr< RV_VKImage > &pre_lut_image)
Create resources for color correction in HOUcolorCorrect().
#define RV_API
Definition: RV_API.h:10
GLsizeiptr size
Definition: glcorearb.h:664
UT_UniquePtr< RV_VKImage > RV_VKImagePtr
Definition: RV_Utils.h:28
fpreal64 fpreal
Definition: SYS_Types.h:277
RV_API RV_VKImagePtr getRandomTexture(RV_Render *r, unsigned int seed, bool interp, int size=64)
Returns an 8b RGBA 64x64 texture with 0-1 random values in all comps.
GLboolean r
Definition: glcorearb.h:1222
RV_API RV_VKImagePtr getRandomTexture3D(RV_Render *r, unsigned int seed, bool interp, int size=32)
Returns an 8b RGBA size^3 3D texture with 0-1 random values.