HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_Utils Namespace Reference

Functions

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. More...
 
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. More...
 
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'. More...
 
RV_API UT_UniquePtr< RV_VKImageresolveMSTexture (RV_Render *r, RV_VKImage *ms_image)
 
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(). More...
 
RV_API bool matchesRaster (const RV_VKImage &img, const PXL_Raster &raster)
 
RV_API void setupRaster (RV_VKImage &img, PXL_Raster &raster, bool alloc=true)
 
RV_API void createLUTTexture (RV_Render *r, const PXL_Lookup *lut, UT_UniquePtr< RV_VKImage > &main_lut, UT_UniquePtr< RV_VKImage > &pre)
 
RV_API void generateCubeMips (RV_Render *r, UT_UniquePtr< PXL_Raster > &latlong_image, RV_VKImage *tex, RV_GPUType format_type, int vsize)
 Create lower mipmaps for a cubemap texture. image must be a latlong map. More...
 
RV_API bool initShaders (RV_Instance *inst)
 
RV_API void cleanupShaders ()
 

Function Documentation

RV_API void RV_Utils::cleanupShaders ( )
RV_API void RV_Utils::createLUTTexture ( RV_Render r,
const PXL_Lookup lut,
UT_UniquePtr< RV_VKImage > &  main_lut,
UT_UniquePtr< RV_VKImage > &  pre 
)
RV_API void RV_Utils::generateCubeMips ( RV_Render r,
UT_UniquePtr< PXL_Raster > &  latlong_image,
RV_VKImage tex,
RV_GPUType  format_type,
int  vsize 
)

Create lower mipmaps for a cubemap texture. image must be a latlong map.

RV_API RV_VKImagePtr RV_Utils::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.

RV_API RV_VKImagePtr RV_Utils::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.

RV_API RV_VKImagePtr RV_Utils::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'.

RV_API bool RV_Utils::initShaders ( RV_Instance inst)
RV_API bool RV_Utils::matchesRaster ( const RV_VKImage img,
const PXL_Raster raster 
)
RV_API UT_UniquePtr<RV_VKImage> RV_Utils::resolveMSTexture ( RV_Render r,
RV_VKImage ms_image 
)

Create a new 2D image from a 2D multisample image by increasing the resolution of the 2D image to show all samples.

RV_API bool RV_Utils::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().

RV_API void RV_Utils::setupRaster ( RV_VKImage img,
PXL_Raster raster,
bool  alloc = true 
)