VPP  0.8
A high-level modern C++ API for Vulkan
vpp Namespace Reference

The VPP namespace. More...

Namespaces

 ct
 The VPP Computation Toolkit namespace.
 

Classes

class  arrayOf
 Template allowing to construct arrays of binding points. More...
 
class  Attachment
 Represents attachment graph node. More...
 
struct  Attribute
 Template for defining vertex or instance data fields. More...
 
class  Bar
 Utility base class for barrier classes. More...
 
class  BarrierList
 Multiple barriers with default parameters. More...
 
class  Barriers
 General class encapsulating description of a set of pipeline barriers. More...
 
class  Bool
 Shader (GPU-side) data type for boolean values. More...
 
class  Buf
 Generic class representing Vulkan buffers. More...
 
class  Buffer
 Typed Vulkan buffer of specified purpose. Most functions operating on buffers require typed buffer, therefore this is the class you want to use most of the time. More...
 
class  BufferMemoryBarrier
 Single buffer barrier. More...
 
class  BVec2
 Shader (GPU-side) data type for 2-element boolean vectors. More...
 
class  BVec3
 Shader (GPU-side) data type for 3-element boolean vectors. More...
 
class  BVec4
 Shader (GPU-side) data type for 4-element boolean vectors. More...
 
class  CommandBuffer
 Represents a sequence of Vulkan commands. More...
 
class  CommandBufferRecorder
 Interface to the automatic command recording framework. More...
 
class  CommandPool
 Allocates and manages the lifetime of command buffers. More...
 
class  CompiledProcedures
 
class  Computation
 Base class for single computation routine. More...
 
class  ComputationEngine
 Base class for computation engines. More...
 
class  ComputePass
 Represents compute pass. More...
 
class  ComputePipeline
 Compiled pipeline class for compute pipelines. More...
 
class  ComputePipelineConfig
 Base class for custom compute pipelines. More...
 
class  ComputePipelineLayout
 Pipeline layout template for a compute pipeline. Use to create actual pipeline layout (Vulkan objects) from abstract representation in the form of ComputePipelineConfig object. More...
 
class  ComputeShader
 Compute shader interface. More...
 
class  computeShader
 Binding point class for compute shaders. Place in your pipeline configuration class to declare a compute shader. More...
 
class  createInstance
 Instance factory class. More...
 
class  DebugReporter
 Base class for debug report generators. More...
 
class  Device
 Represents logical rendering device. More...
 
class  DeviceFeatures
 Utility class for dealing with device features and known extensions. More...
 
class  DeviceMemory
 
class  dgvector
 Array allocated entirely on GPU side, without any mapping to the CPU side. More...
 
class  DispatchIndirectCommands
 Utility subclass representing a vector of indirect dispatch ranges. More...
 
class  Display
 Represents display attachment graph node. More...
 
class  Double
 Shader (GPU-side) data type for 64-bit floating point values. More...
 
class  DVec2
 Shader (GPU-side) data type for 2-element 64-bit floating point vectors. More...
 
class  DVec3
 Shader (GPU-side) data type for 3-element 64-bit floating point vectors. More...
 
class  DVec4
 Shader (GPU-side) data type for 4-element 64-bit floating point vectors. More...
 
class  Event
 Allows the GPU to wait for certain condition on CPU or GPU side to occur. More...
 
class  ExtendedCommands
 
class  Fence
 Allows the CPU to wait for GPU operation to finish. More...
 
class  Field
 Template for defining local structure data fields. More...
 
class  Float
 Shader (GPU-side) data type for 32-bit floating point values. More...
 
class  FragmentShader
 Fragment shader interface. More...
 
class  fragmentShader
 Binding point class for fragment shaders. Place in your pipeline configuration class to declare a fragment shader. More...
 
class  FrameBuffer
 Defines a vector of physical images to be used as targets for rendering attachments. More...
 
class  FrameImageView
 Untyped image view class. Useful for constructing FrameBuffer objects. More...
 
struct  Function
 Creates shader-level function. More...
 
class  geometryShader
 Binding point class for geometry shaders. Place in your pipeline configuration class to declare a geometry shader. More...
 
class  GeometryShader
 Geometry shader interface. More...
 
struct  gl_perVertex
 Auxiliary structure holding basic vertex attributes. More...
 
class  gvector
 Generic STL-style vector allocating memory on the GPU. More...
 
class  Image
 Class representing typed Vulkan image. More...
 
struct  ImageAttributes
 A template containing image attributes inside C++ type. More...
 
struct  ImageInfo
 A structure containing image parameters. More...
 
class  ImageMemoryBarrier
 Single image barrier. More...
 
class  ImageView
 Typed image view. More...
 
struct  ImageViewAttributes
 A template encoding image view attributes inside C++ type. More...
 
class  IMat2
 Shader (GPU-side) data type for 2x2 32-bit integer matrices. More...
 
class  IMat2x3
 Shader (GPU-side) data type for 2 columns, 3 rows 32-bit integer matrices. More...
 
class  IMat2x4
 Shader (GPU-side) data type for 2 columns, 4 rows 32-bit integer matrices. More...
 
class  IMat3
 Shader (GPU-side) data type for 3x3 32-bit integer matrices. More...
 
class  IMat3x2
 Shader (GPU-side) data type for 3 columns, 2 rows 32-bit integer matrices. More...
 
class  IMat3x4
 Shader (GPU-side) data type for 3 columns, 4 rows 32-bit integer matrices. More...
 
class  IMat4
 Shader (GPU-side) data type for 4x4 32-bit integer matrices. More...
 
class  IMat4x2
 Shader (GPU-side) data type for 4 columns, 2 rows 32-bit integer matrices. More...
 
class  IMat4x3
 Shader (GPU-side) data type for 4 columns, 3 rows 32-bit integer matrices. More...
 
class  Img
 Class representing generic (untyped) Vulkan image. More...
 
class  inAttachment
 Input attachment binding point. More...
 
class  inConstSampledTexture
 A binding point for read-only texture with predefined (constant) sampler. More...
 
class  inConstSampler
 Static sampler binding point. More...
 
class  IndexedIndirectCommands
 Utility subclass representing a vector of indexed indirect draw ranges. More...
 
class  Indices
 Utility subclass representing a vector of indices for indexed draws. More...
 
class  IndirectBufferView
 
class  IndirectCommands
 Utility subclass representing a vector of indirect draw ranges. More...
 
class  inPushConstant
 Binding point class for push constant data input to shaders. Place in your pipeline configuration class to declare a push constant. More...
 
class  Input
 Provides input access to communication variable binding point from shader code. More...
 
class  inSampledTexture
 A binding point for read-only texture with associated sampler. More...
 
class  inSampler
 Sampler binding point. More...
 
class  Instance
 Represents the instance of Vulkan system. More...
 
struct  InstanceStruct
 Base class for instance data structures. More...
 
class  Int
 Shader (GPU-side) data type for 32-bit signed integer values. More...
 
class  Int64
 Shader (GPU-side) data type for 64-bit signed integer values. More...
 
class  inTexture
 Texture (read-only) image binding point. More...
 
class  inTextureBuffer
 Uniform (read-only) texel buffer binding point. More...
 
class  inUniformBuffer
 Binding point class for uniform (read-only) data input to shaders. Place in your pipeline configuration class to declare a uniform data source. More...
 
class  inUniformBufferDyn
 Currently not implemented. More...
 
struct  inVertexData
 Binding point class for vertex and instance input to shaders. Place in your pipeline configuration class to declare a vertex or instance data source. More...
 
class  ioBuffer
 Binding point class for storage (read-write) data buffer to shaders. Place in your pipeline configuration class to declare a storage data buffer. More...
 
class  ioBufferDyn
 Currently not implemented. More...
 
class  ioImage
 Storage (read-write) image binding point. More...
 
class  ioImageBuffer
 Storage (read-write) texel buffer binding point. More...
 
class  ioStructure
 Binding point class for inter-shader communication variable of structural type. Place in your pipeline configuration class to declare an inter-shader communication variable. More...
 
class  ioVariable
 Binding point class for inter-shader communication variable of simple type (scalar, vector or matrix). Place in your pipeline configuration class to declare an inter-shader communication variable. More...
 
class  IVec2
 Shader (GPU-side) data type for 2-element 32-bit integer vectors. More...
 
class  IVec3
 Shader (GPU-side) data type for 3-element 32-bit integer vectors. More...
 
class  IVec4
 Shader (GPU-side) data type for 4-element 32-bit integer vectors. More...
 
class  LocalStruct
 Base class for local data structures. More...
 
class  MappableDeviceMemory
 
class  Mat2
 Shader (GPU-side) data type for 2x2 32-bit float matrices. More...
 
class  Mat2x3
 Shader (GPU-side) data type for 2 columns, 3 rows 32-bit float matrices. More...
 
class  Mat2x4
 Shader (GPU-side) data type for 2 columns, 4 rows 32-bit float matrices. More...
 
class  Mat3
 Shader (GPU-side) data type for 3x3 32-bit float matrices. More...
 
class  Mat3x2
 Shader (GPU-side) data type for 3 columns, 2 rows 32-bit float matrices. More...
 
class  Mat3x4
 Shader (GPU-side) data type for 3 columns, 4 rows 32-bit float matrices. More...
 
class  Mat4
 Shader (GPU-side) data type for 4x4 32-bit float matrices. More...
 
class  Mat4x2
 Shader (GPU-side) data type for 4 columns, 2 rows 32-bit float matrices. More...
 
class  Mat4x3
 Shader (GPU-side) data type for 4 columns, 3 rows 32-bit float matrices. More...
 
class  MemoryBarrier
 Single global memory barrier. More...
 
class  MemoryBinding
 A compound object containing references to a buffer and memory bound to it. More...
 
class  MemProfile
 Abstraction of GPU-interoperable memory types. More...
 
class  NonRenderingCommands
 Set of commands that may be used outside rendering context. More...
 
class  NormalizedSampler
 Texture sampler object (normalized). More...
 
struct  outAttachment
 Output attachment binding point. More...
 
class  Output
 Provides output access to communication variable binding point from shader code. More...
 
struct  Par
 Defines a function parameter. More...
 
class  PHVec4
 
class  PhysicalDevice
 Represents physical rendering device. More...
 
class  Pipeline
 Compiled pipeline class for graphics pipelines. More...
 
class  PipelineCache
 
class  PipelineConfig
 Base class for custom rendering pipelines. More...
 
class  PipelineLayout
 Pipeline layout template for a graphics pipeline. Use to create actual pipeline layout (Vulkan objects) from abstract representation in the form of PipelineConfig object. More...
 
class  Pointer
 Shader (GPU-side) data type for pointers to workgroup and global scoped variables. More...
 
class  Postprocess
 Represents finalization process graph node. More...
 
class  Preprocess
 Represents preparation process graph node. More...
 
class  Procedure
 
class  Process
 Represents process graph node. More...
 
class  Queue
 Command queue for execution of commands. More...
 
class  RenderGraph
 Base class for render graphs. More...
 
struct  RenderingCommandContext
 
class  RenderingOptions
 A container for various rendering parameters. More...
 
class  RenderManager
 Simple rendering manager. More...
 
class  RenderPass
 Represents Vulkan render pass. More...
 
class  Semaphore
 Allows the GPU to wait for another GPU operation to finish. More...
 
struct  SGatherOffsets
 
class  Shader
 Base class for shader interfaces. More...
 
class  ShaderDataBlock
 Represents a group of resources bound to rendering or compute pipeline. More...
 
struct  SNormalizedSampler
 Structure describing normalized sampler parameters. More...
 
class  StorageBufferView
 
class  StreamDebugReporter
 A debug reporter class working with C++ output streams. More...
 
struct  SUnnormalizedSampler
 Structure describing unnormalized sampler parameters. More...
 
class  Surface
 Represents a surface visible on the screen. More...
 
struct  SurfaceInfo
 A platform-dependent structure containing information required to create a surface. More...
 
struct  SVulkanVersion
 Structure holding information about Vulkan version. More...
 
class  SwapChain
 Represents a set of swappable on-screen images. More...
 
class  TessControlShader
 Tessellation control shader interface. More...
 
class  tessControlShader
 Binding point class for tessellation control shaders. Place in your pipeline configuration class to declare a tessellation control shader. More...
 
class  tessEvalShader
 Binding point class for tessellation evaluation shaders. Place in your pipeline configuration class to declare a tessellation evaluation shader. More...
 
class  TessEvalShader
 Tessellation evaluation shader interface. More...
 
struct  TexelArray
 Provides shader code access to a binding point for a buffer holding array of formatted texels. These data objects are either simple scalars or vectors, defined by vpp::format object. More...
 
class  TexelBufferView
 Buffer view for texel buffers. More...
 
class  UInt
 Shader (GPU-side) data type for 32-bit unsigned integer values. More...
 
class  UInt64
 Shader (GPU-side) data type for 64-bit unsigned integer values. More...
 
class  UniformArray
 Provides shader code access to a binding point for buffer holding array of structures. More...
 
class  UniformBufferView
 
struct  UniformFld
 Template for defining uniform data fields. More...
 
class  UniformSimpleArray
 Provides shader code access to a binding point for buffer holding array of simple scalars, vectors or matrices. More...
 
class  UniformStruct
 Base class for uniform data structures. More...
 
class  UniformVar
 Provides access to scalar or arrayed buffer binding point from shader code. More...
 
class  UniversalCommands
 Set of commands that may be used anywhere (inside or outside rendering context). More...
 
class  UnnormalizedSampler
 Texture sampler object (normalized). More...
 
class  UVec2
 Shader (GPU-side) data type for 2-element 32-bit unsigned integer vectors. More...
 
class  UVec3
 Shader (GPU-side) data type for 3-element 32-bit unsigned integer vectors. More...
 
class  UVec4
 Shader (GPU-side) data type for 4-element 32-bit unsigned integer vectors. More...
 
class  VArray
 Declares mutable shader local variable of array type. More...
 
class  VBool
 Shader (GPU-side) data type for mutable variables of boolean type. More...
 
class  VBVec2
 Shader (GPU-side) data type for mutable variables of 2-element boolean vector type. More...
 
class  VBVec3
 Shader (GPU-side) data type for mutable variables of 3-element boolean vector type. More...
 
class  VBVec4
 Shader (GPU-side) data type for mutable variables of 4-element boolean vector type. More...
 
class  VDouble
 Shader (GPU-side) data type for mutable variables of 64-bit floating point type. More...
 
class  VDVec2
 Shader (GPU-side) data type for mutable variables of 2-element 64-bit float vector type. More...
 
class  VDVec3
 Shader (GPU-side) data type for mutable variables of 3-element 64-bit float vector type. More...
 
class  VDVec4
 Shader (GPU-side) data type for mutable variables of 4-element 64-bit float vector type. More...
 
class  Vec2
 Shader (GPU-side) data type for 2-element 32-bit float vectors. More...
 
class  Vec3
 Shader (GPU-side) data type for 3-element 32-bit float vectors. More...
 
class  Vec4
 Shader (GPU-side) data type for 4-element 32-bit float vectors. More...
 
class  VertexBufferView
 Buffer view for vertex buffers. More...
 
class  VertexIndexBufferView
 
class  vertexShader
 Binding point class for vertex shaders. Place in your pipeline configuration class to declare a vertex shader. More...
 
class  VertexShader
 Vertex shader interface. More...
 
struct  VertexStruct
 Base class for vertex data structures. More...
 
class  VFloat
 Shader (GPU-side) data type for mutable variables of 32-bit floating point type. More...
 
struct  Viewport
 Helper class to define simple Vulkan viewport. More...
 
class  VInt
 Shader (GPU-side) data type for mutable variables of 32-bit signed integer type. More...
 
class  VInt64
 Shader (GPU-side) data type for mutable variables of 64-bit signed integer type. More...
 
class  VIVec2
 Shader (GPU-side) data type for mutable variables of 2-element 32-bit integer vector type. More...
 
class  VIVec3
 Shader (GPU-side) data type for mutable variables of 3-element 32-bit integer vector type. More...
 
class  VIVec4
 Shader (GPU-side) data type for mutable variables of 4-element 32-bit integer vector type. More...
 
class  VMat2
 Shader (GPU-side) data type for mutable variables of 2x2 32-bit float matrix type. More...
 
class  VMat2x3
 Shader (GPU-side) data type for mutable variables of 2 columns, 3 rows 32-bit float matrix type. More...
 
class  VMat2x4
 Shader (GPU-side) data type for mutable variables of 2 columns, 4 rows 32-bit float matrix type. More...
 
class  VMat3
 Shader (GPU-side) data type for mutable variables of 3x3 32-bit float matrix type. More...
 
class  VMat3x2
 Shader (GPU-side) data type for mutable variables of 3 columns, 2 rows 32-bit float matrix type. More...
 
class  VMat3x4
 Shader (GPU-side) data type for mutable variables of 3 columns, 4 rows 32-bit float matrix type. More...
 
class  VMat4
 Shader (GPU-side) data type for mutable variables of 4x4 32-bit floating point matrix type. More...
 
class  VMat4x2
 Shader (GPU-side) data type for mutable variables of 4 columns, 2 rows 32-bit float matrix type. More...
 
class  VMat4x3
 Shader (GPU-side) data type for mutable variables of 4 columns, 3 rows 32-bit float matrix type. More...
 
class  Void
 Shader (GPU-side) void data type. More...
 
class  VUInt
 Shader (GPU-side) data type for mutable variables of 32-bit unsigned integer type. More...
 
class  VUInt64
 Shader (GPU-side) data type for mutable variables of 64-bit unsigned integer type. More...
 
class  VUVec2
 Shader (GPU-side) data type for mutable variables of 2-element 32-bit unsigned integer vector type. More...
 
class  VUVec3
 Shader (GPU-side) data type for mutable variables of 3-element 32-bit unsigned integer vector type. More...
 
class  VUVec4
 Shader (GPU-side) data type for mutable variables of 4-element 32-bit unsigned integer vector type. More...
 
class  VVec2
 Shader (GPU-side) data type for mutable variables of 2-element 32-bit float vector type. More...
 
class  VVec3
 Shader (GPU-side) data type for mutable variables of 3-element 32-bit float vector type. More...
 
class  VVec4
 Shader (GPU-side) data type for mutable variables of 4-element 32-bit float vector type. More...
 
class  WArray
 Declares workgroup-scoped variable of array type. More...
 
class  WArray2
 Declares workgroup-scoped variable of two-dimensional array type. More...
 
class  WArray3
 
class  WBool
 Shader (GPU-side) data type for workgroup variables of boolean type. More...
 
class  WDouble
 Shader (GPU-side) data type for workgroup variables of 64-bit floating point type. More...
 
class  WFloat
 Shader (GPU-side) data type for workgroup variables of 32-bit floating point type. More...
 
class  WInt
 Shader (GPU-side) data type for workgroup variables of 32-bit signed integer type. More...
 
class  WInt64
 Shader (GPU-side) data type for workgroup variables of 64-bit unsigned integer type. More...
 
class  WUInt
 Shader (GPU-side) data type for workgroup variables of 32-bit unsigned integer type. More...
 
class  WUInt64
 Shader (GPU-side) data type for workgroup variables of 64-bit unsigned integer type. More...
 

Typedefs

typedef Buffer< Buf::INDEXIndexBuffer
 Predefined class for index buffers, used in indexed draws.
 
typedef Buffer< Buf::VERTEXVertexBuffer
 Predefined class for vertex buffers.
 
typedef Buffer< Buf::INDIRECTIndirectBuffer
 Predefined class for indirect buffers, used in indirect draws.
 
template<class FormatT >
using ImgTexture1D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_1D, VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgTexture2D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_2D, VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgTexture3D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_3D, VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgTextureCube = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_CUBE_2D, VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgStorage1D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_1D, VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgStorage2D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_2D, VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgStorage3D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_3D, VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgStorageCube = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_CUBE_2D, VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT > >
 
template<class FormatT >
using ImgAttachment2D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_2D, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT|VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT > >
 
template<class FormatT >
using ImgDepthAttachment2D = Image< ImageAttributes< FormatT, RENDER, IMG_TYPE_2D, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT|VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT > >
 
typedef std::vector< PhysicalDevicePhysicalDevices
 Array of physical devices.
 

Enumerations

enum  EImagePurpose { RENDER, DISPLAY, SWAPCHAIN, RENDER_DEBUG }
 Enumeration specifying general purpose of an image. More...
 
enum  EImageType {
  IMG_TYPE_1D, IMG_TYPE_2D, IMG_TYPE_3D, IMG_TYPE_CUBE_2D,
  IMG_TYPE_RECT_2D
}
 
enum  ESamplingMode { SAMPLER_NORMALIZED, SAMPLER_UNNORMALIZED }
 
enum  ETag { CPU, GPU, DEF }
 Enumeration type allowing to select the flavor of shader structural type: the CPU or GPU version. More...
 
enum  EMemorySemantics {
  MSM_NONE, MSM_ACQ, MSM_REL, MSM_ACQREL,
  MSM_UNIFORM, MSM_SUBGROUP, MSM_WORKGROUP, MSM_IMAGE
}
 
enum  EFeature {
  fRobustBufferAccess, fFullDrawIndexUint32, fImageCubeArray, fIndependentBlend,
  fGeometryShader, fTessellationShader, fSampleRateShading, fDualSrcBlend,
  fLogicOp, fMultiDrawIndirect, fDrawIndirectFirstInstance, fDepthClamp,
  fDepthBiasClamp, fFillModeNonSolid, fDepthBounds, fWideLines,
  fLargePoints, fAlphaToOne, fMultiViewport, fSamplerAnisotropy,
  fTextureCompressionETC2, fTextureCompressionASTC_LDR, fTextureCompressionBC, fOcclusionQueryPrecise,
  fPipelineStatisticsQuery, fVertexPipelineStoresAndAtomics, fFragmentStoresAndAtomics, fShaderTessellationAndGeometryPointSize,
  fShaderImageGatherExtended, fShaderStorageImageExtendedFormats, fShaderStorageImageMultisample, fShaderStorageImageReadWithoutFormat,
  fShaderStorageImageWriteWithoutFormat, fShaderUniformBufferArrayDynamicIndexing, fShaderSampledImageArrayDynamicIndexing, fShaderStorageBufferArrayDynamicIndexing,
  fShaderStorageImageArrayDynamicIndexing, fShaderClipDistance, fShaderCullDistance, fShaderFloat64,
  fShaderInt64, fShaderInt16, fShaderResourceResidency, fShaderResourceMinLod,
  fSparseBinding, fSparseResidencyBuffer, fSparseResidencyImage2D, fSparseResidencyImage3D,
  fSparseResidency2Samples, fSparseResidency4Samples, fSparseResidency8Samples, fSparseResidency16Samples,
  fSparseResidencyAliased, fVariableMultisampleRate, fInheritedQueries, fMultiview,
  fMultiviewGeometryShader, fMultiviewTessellationShader, fVariablePointersStorageBuffer, fVariablePointers,
  fStorageBuffer8BitAccess, fUniformAndStorageBuffer8BitAccess, fStoragePushConstant8, fShaderBufferInt64Atomics,
  fShaderSharedInt64Atomics, fStorageBuffer16BitAccess, fUniformAndStorageBuffer16BitAccess, fStoragePushConstant16,
  fStorageInputOutput16, fShaderFloat16, fShaderInt8, fSamplerYcbcrConversion,
  fProtectedMemory, fAdvancedBlendCoherentOperations, fConditionalRendering, fInheritedConditionalRendering,
  fShaderDrawParameters, fShaderInputAttachmentArrayDynamicIndexing, fShaderUniformTexelBufferArrayDynamicIndexing, fShaderStorageTexelBufferArrayDynamicIndexing,
  fShaderUniformBufferArrayNonUniformIndexing, fShaderSampledImageArrayNonUniformIndexing, fShaderStorageBufferArrayNonUniformIndexing, fShaderStorageImageArrayNonUniformIndexing,
  fShaderInputAttachmentArrayNonUniformIndexing, fShaderUniformTexelBufferArrayNonUniformIndexing, fShaderStorageTexelBufferArrayNonUniformIndexing, fDescriptorBindingUniformBufferUpdateAfterBind,
  fDescriptorBindingSampledImageUpdateAfterBind, fDescriptorBindingStorageImageUpdateAfterBind, fDescriptorBindingStorageBufferUpdateAfterBind, fDescriptorBindingUniformTexelBufferUpdateAfterBind,
  fDescriptorBindingStorageTexelBufferUpdateAfterBind, fDescriptorBindingUpdateUnusedWhilePending, fDescriptorBindingPartiallyBound, fDescriptorBindingVariableDescriptorCount,
  fRuntimeDescriptorArray, fDecodeModeSharedExponent, fVertexAttributeInstanceRateDivisor, fVertexAttributeInstanceRateZeroDivisor,
  fTransformFeedback, fGeometryStreams, fVulkanMemoryModel, fVulkanMemoryModelDeviceScope,
  fVulkanMemoryModelAvailabilityVisibilityChains, fInlineUniformBlock, fDescriptorBindingInlineUniformBlockUpdateAfterBind, fFragmentDensityMap,
  fFragmentDensityMapDynamic, fFragmentDensityMapNonSubsampledImages, fScalarBlockLayout, fDepthClipEnable,
  fMemoryPriority, fBufferDeviceAddress, fBufferDeviceAddressCaptureReplay, fBufferDeviceAddressMultiDevice,
  fExtBlendOperationAdvanced, fExtConditionalRendering, fExtConservativeRasterization, fExtDepthRangeUnrestricted,
  fExtDescriptorIndexing, fExtDiscardRectangles, fExtExternalMemoryHost, fExtHdrMetadata,
  fExtInlineUniformBlock, fExtPostDepthCoverage, fExtSampleLocations, fExtSamplerFilterMinmax,
  fExtScalarBlockLayout, fExtShaderSubgroupBallot, fExtShaderSubgroupVote, fExtShaderViewportIndexLayer,
  fExtTransformFeedback, fExtVertexAttributeDivisor, fExtStorage16bit, fExtStorage8bit,
  fExtBindMemory2, fExtCreateRenderpass2, fExtDedicatedAllocation, fExtDepthStencilResolve,
  fExtDescriptorUpdateTemplate, fExtDeviceGroup, fExtDrawIndirectCount, fExtDriverProperties,
  fExtExternalFence, fExtExternalFenceWin32, fExtExternalMemory, fExtExternalMemoryWin32,
  fExtExternalSemaphore, fExtExternalSemaphoreWin32, fExtGetMemoryRequirements2, fExtImageFormatList,
  fExtMultiview, fExtPushDescriptor, fExtRelaxedBlockLayout, fExtSamplerMirrorClampToEdge,
  fExtSamplerYcbcrConversion, fExtShaderAtomicInt64, fExtShaderDrawParameters, fExtShaderFloat16Int8,
  fExtShaderFloatControls, fExtStorageBufferStorageClass, fExtSwapchain, fExtSwapchainMutableFormat,
  fExtVariablePointers, fExtVulkanMemoryModel, fExtWin32KeyedMutex, fExtFragmentDensityMap,
  fExtAstcDecodeMode, fExtDepthClipEnable, fExtMemoryPriority, fExtBufferDeviceAddress
}
 Optional device feature enumeration. More...
 

Functions

template<typename ... Args>
BarrierList barriers (VkPipelineStageFlags sourceStage, VkPipelineStageFlags targetStage, Args &&... args)
 Creates a BarrierList object for specified resources. More...
 
BarrierList barriers (const Img &hImage, const std::vector< VkImageSubresourceRange > &regions, VkPipelineStageFlags sourceStage, VkPipelineStageFlags targetStage)
 Creates a BarrierList object for specified regions of an image. More...
 
template<class ResourceT >
MemoryBinding< ResourceT, DeviceMemorybindDeviceMemory (const ResourceT &res, const MemProfile &memProfile)
 Binds specified buffer to a DeviceMemory memory, and returns MemoryBinding object. More...
 
template<class ResourceT >
MemoryBinding< ResourceT, MappableDeviceMemorybindMappableMemory (const ResourceT &res, const MemProfile &memProfile)
 Binds specified buffer to a MappableDeviceMemory memory, and returns MemoryBinding object. More...
 
template<class AttributesT >
auto bind (const ImageView< AttributesT > &view, VkImageLayout layout=VK_IMAGE_LAYOUT_UNDEFINED)
 Helper function to bind specified image view to a binding point in a pipeline. More...
 
template<class AttributesT , class SamplerT >
auto bind (const SamplerT &sampler, const ImageView< AttributesT > &view, VkImageLayout layout=VK_IMAGE_LAYOUT_UNDEFINED)
 Helper function to bind specified image view and a sampler to a binding point in a pipeline. More...
 
void If (Bool v)
 Creates the if clause of the conditional construct. More...
 
void Else ()
 Creates the else clause of the conditional construct. More...
 
void Fi ()
 Creates the ending clause of the conditional construct. More...
 
void Do ()
 Creates the do clause of the loop construct. More...
 
void While (Bool v)
 Creates the while clause of the loop construct. More...
 
void Od ()
 Creates the closing clause of the loop construct. More...
 
void For (VInt &variable, Int begin, Int end, Int step=1)
 Creates the for clause of the 'for' loop construct. More...
 
void For (VUInt &variable, UInt begin, UInt end, UInt step=1)
 
void Rof ()
 Creates the closing clause of the 'for' loop construct. More...
 
void Switch (Int expr)
 Creates the switch construct. More...
 
void Case (int value)
 Creates the case clause of the switch construct.
 
void Default ()
 Creates the default clause of the switch construct.
 
void Break ()
 Creates the break clause of the switch construct.
 
void EndSwitch ()
 Creates the closing clause of the switch construct.
 
void Begin ()
 Marks the start of function body. More...
 
void End ()
 Marks the end of function body. More...
 
void Return ()
 Immediately returns from the function. More...
 
template<typename ValueT >
void Return (const ValueT &value)
 Returns the value from the function.
 
template<class CondT , class Arg1T , class Arg2T >
auto Select (const CondT &cond, const Arg1T &argIfTrue, const Arg2T &argIfFalse)
 A conditional expression. More...
 
void WorkgroupBarrier (EMemorySemantics msClass=MSM_WORKGROUP, EMemorySemantics msSem=MSM_ACQREL)
 Creates control and memory barrier affecting threads in a workgroup.
 
void SubgroupBarrier (EMemorySemantics msClass=MSM_SUBGROUP, EMemorySemantics msSem=MSM_ACQREL)
 Creates control and memory barrier affecting threads in a subgroup.
 
template<typename TargetT , typename SourceT >
TargetT StaticCast (const SourceT &source)
 General type conversion function. More...
 
template<typename TargetT , typename SourceT >
TargetT ReinterpretCast (const SourceT &source)
 Bit pattern type conversion function. More...
 
Float Round (const Float &x)
 Computes nearest whole number to x. More...
 
Vec2 Round (const Vec2 &x)
 
Vec3 Round (const Vec3 &x)
 
Vec4 Round (const Vec4 &x)
 
Double Round (const Double &x)
 
DVec2 Round (const DVec2 &x)
 
DVec3 Round (const DVec3 &x)
 
DVec4 Round (const DVec4 &x)
 
Float RoundEven (const Float &x)
 Computes nearest whole number to x. More...
 
Vec2 RoundEven (const Vec2 &x)
 
Vec3 RoundEven (const Vec3 &x)
 
Vec4 RoundEven (const Vec4 &x)
 
Double RoundEven (const Double &x)
 
DVec2 RoundEven (const DVec2 &x)
 
DVec3 RoundEven (const DVec3 &x)
 
DVec4 RoundEven (const DVec4 &x)
 
Float Trunc (const Float &x)
 Computes nearest whole number to x whose absolute value is not larger than the absolute value of x.
 
Vec2 Trunc (const Vec2 &x)
 
Vec3 Trunc (const Vec3 &x)
 
Vec4 Trunc (const Vec4 &x)
 
Double Trunc (const Double &x)
 
DVec2 Trunc (const DVec2 &x)
 
DVec3 Trunc (const DVec3 &x)
 
DVec4 Trunc (const DVec4 &x)
 
Int Abs (const Int &x)
 Result is x if x >= 0. Otherwise result is -x.
 
IVec2 Abs (const IVec2 &x)
 
IVec3 Abs (const IVec3 &x)
 
IVec4 Abs (const IVec4 &x)
 
Float Abs (const Float &x)
 
Vec2 Abs (const Vec2 &x)
 
Vec3 Abs (const Vec3 &x)
 
Vec4 Abs (const Vec4 &x)
 
Double Abs (const Double &x)
 
DVec2 Abs (const DVec2 &x)
 
DVec3 Abs (const DVec3 &x)
 
DVec4 Abs (const DVec4 &x)
 
Int Sign (const Int &x)
 Result is 1 if x > 0, 0 if x == 0, or -1 if x < 0.
 
IVec2 Sign (const IVec2 &x)
 
IVec3 Sign (const IVec3 &x)
 
IVec4 Sign (const IVec4 &x)
 
Float Sign (const Float &x)
 
Vec2 Sign (const Vec2 &x)
 
Vec3 Sign (const Vec3 &x)
 
Vec4 Sign (const Vec4 &x)
 
Double Sign (const Double &x)
 
DVec2 Sign (const DVec2 &x)
 
DVec3 Sign (const DVec3 &x)
 
DVec4 Sign (const DVec4 &x)
 
Float Floor (const Float &x)
 Computes nearest whole number that is less than or equal to x.
 
Vec2 Floor (const Vec2 &x)
 
Vec3 Floor (const Vec3 &x)
 
Vec4 Floor (const Vec4 &x)
 
Double Floor (const Double &x)
 
DVec2 Floor (const DVec2 &x)
 
DVec3 Floor (const DVec3 &x)
 
DVec4 Floor (const DVec4 &x)
 
Float Ceil (const Float &x)
 Computes nearest whole number that is greater than or equal to x.
 
Vec2 Ceil (const Vec2 &x)
 
Vec3 Ceil (const Vec3 &x)
 
Vec4 Ceil (const Vec4 &x)
 
Double Ceil (const Double &x)
 
DVec2 Ceil (const DVec2 &x)
 
DVec3 Ceil (const DVec3 &x)
 
DVec4 Ceil (const DVec4 &x)
 
Float Fract (const Float &x)
 Computes x - Floor(x).
 
Vec2 Fract (const Vec2 &x)
 
Vec3 Fract (const Vec3 &x)
 
Vec4 Fract (const Vec4 &x)
 
Double Fract (const Double &x)
 
DVec2 Fract (const DVec2 &x)
 
DVec3 Fract (const DVec3 &x)
 
DVec4 Fract (const DVec4 &x)
 
Float Radians (const Float &x)
 Converts degrees to radians.
 
Vec2 Radians (const Vec2 &x)
 
Vec3 Radians (const Vec3 &x)
 
Vec4 Radians (const Vec4 &x)
 
Float Degrees (const Float &x)
 Converts radians to degrees.
 
Vec2 Degrees (const Vec2 &x)
 
Vec3 Degrees (const Vec3 &x)
 
Vec4 Degrees (const Vec4 &x)
 
Float Sin (const Float &x)
 The standard trigonometric sine of x radians.
 
Vec2 Sin (const Vec2 &x)
 
Vec3 Sin (const Vec3 &x)
 
Vec4 Sin (const Vec4 &x)
 
Float Cos (const Float &x)
 The standard trigonometric cosine of x radians.
 
Vec2 Cos (const Vec2 &x)
 
Vec3 Cos (const Vec3 &x)
 
Vec4 Cos (const Vec4 &x)
 
Float Tan (const Float &x)
 The standard trigonometric tangent of x radians.
 
Vec2 Tan (const Vec2 &x)
 
Vec3 Tan (const Vec3 &x)
 
Vec4 Tan (const Vec4 &x)
 
Float Asin (const Float &x)
 Arc sine. Result is an angle, in radians, whose sine is x. More...
 
Vec2 Asin (const Vec2 &x)
 
Vec3 Asin (const Vec3 &x)
 
Vec4 Asin (const Vec4 &x)
 
Float Acos (const Float &x)
 Arc cosine. Result is an angle, in radians, whose cosine is x. More...
 
Vec2 Acos (const Vec2 &x)
 
Vec3 Acos (const Vec3 &x)
 
Vec4 Acos (const Vec4 &x)
 
Float Atan (const Float &x)
 Arc tangent. Result is an angle, in radians, whose tangent is x. The range of result values is [-pi, pi].
 
Vec2 Atan (const Vec2 &x)
 
Vec3 Atan (const Vec3 &x)
 
Vec4 Atan (const Vec4 &x)
 
Float Sinh (const Float &x)
 Hyperbolic sine of x radians.
 
Vec2 Sinh (const Vec2 &x)
 
Vec3 Sinh (const Vec3 &x)
 
Vec4 Sinh (const Vec4 &x)
 
Float Cosh (const Float &x)
 Hyperbolic cosine of x radians.
 
Vec2 Cosh (const Vec2 &x)
 
Vec3 Cosh (const Vec3 &x)
 
Vec4 Cosh (const Vec4 &x)
 
Float Tanh (const Float &x)
 Hyperbolic tangent of x radians.
 
Vec2 Tanh (const Vec2 &x)
 
Vec3 Tanh (const Vec3 &x)
 
Vec4 Tanh (const Vec4 &x)
 
Float Asinh (const Float &x)
 Arc hyperbolic sine. More...
 
Vec2 Asinh (const Vec2 &x)
 
Vec3 Asinh (const Vec3 &x)
 
Vec4 Asinh (const Vec4 &x)
 
Float Acosh (const Float &x)
 Arc hyperbolic cosine. More...
 
Vec2 Acosh (const Vec2 &x)
 
Vec3 Acosh (const Vec3 &x)
 
Vec4 Acosh (const Vec4 &x)
 
Float Atanh (const Float &x)
 Arc hyperbolic tangent. More...
 
Vec2 Atanh (const Vec2 &x)
 
Vec3 Atanh (const Vec3 &x)
 
Vec4 Atanh (const Vec4 &x)
 
Float Atan2 (const Float &y, const Float &x)
 Arc tangent. More...
 
Vec2 Atan2 (const Vec2 &y, const Vec2 &x)
 
Vec3 Atan2 (const Vec3 &y, const Vec3 &x)
 
Vec4 Atan2 (const Vec4 &y, const Vec4 &x)
 
Float Pow (const Float &x, const Float &y)
 Computes x raised to the y power. More...
 
Vec2 Pow (const Vec2 &x, const Vec2 &y)
 
Vec3 Pow (const Vec3 &x, const Vec3 &y)
 
Vec4 Pow (const Vec4 &x, const Vec4 &y)
 
Float Exp (const Float &x)
 Computes the natural exponentiation of x (e^x).
 
Vec2 Exp (const Vec2 &x)
 
Vec3 Exp (const Vec3 &x)
 
Vec4 Exp (const Vec4 &x)
 
Float Log (const Float &x)
 Computes the natural logarithm of x. More...
 
Vec2 Log (const Vec2 &x)
 
Vec3 Log (const Vec3 &x)
 
Vec4 Log (const Vec4 &x)
 
Float Exp2 (const Float &x)
 Computes 2 raised to the x power (2^x).
 
Vec2 Exp2 (const Vec2 &x)
 
Vec3 Exp2 (const Vec3 &x)
 
Vec4 Exp2 (const Vec4 &x)
 
Float Log2 (const Float &x)
 Computes the base-2 logarithm of x. More...
 
Vec2 Log2 (const Vec2 &x)
 
Vec3 Log2 (const Vec3 &x)
 
Vec4 Log2 (const Vec4 &x)
 
Float Sqrt (const Float &x)
 Computes the square root of x. More...
 
Vec2 Sqrt (const Vec2 &x)
 
Vec3 Sqrt (const Vec3 &x)
 
Vec4 Sqrt (const Vec4 &x)
 
Double Sqrt (const Double &x)
 
DVec2 Sqrt (const DVec2 &x)
 
DVec3 Sqrt (const DVec3 &x)
 
DVec4 Sqrt (const DVec4 &x)
 
Float InverseSqrt (const Float &x)
 Computes the reciprocal of Sqrt(x). More...
 
Vec2 InverseSqrt (const Vec2 &x)
 
Vec3 InverseSqrt (const Vec3 &x)
 
Vec4 InverseSqrt (const Vec4 &x)
 
Double InverseSqrt (const Double &value)
 
DVec2 InverseSqrt (const DVec2 &value)
 
DVec3 InverseSqrt (const DVec3 &value)
 
DVec4 InverseSqrt (const DVec4 &value)
 
Float Determinant (const Mat2 &x)
 Computes the determinant of x.
 
Float Determinant (const Mat3 &x)
 
Float Determinant (const Mat4 &x)
 
Double Determinant (const DMat2 &x)
 
Double Determinant (const DMat3 &x)
 
Double Determinant (const DMat4 &x)
 
Mat2 MatrixInverse (const Mat2 &x)
 Computes a matrix that is the inverse of x. More...
 
Mat3 MatrixInverse (const Mat3 &x)
 
Mat4 MatrixInverse (const Mat4 &x)
 
DMat2 MatrixInverse (const DMat2 &x)
 
DMat3 MatrixInverse (const DMat3 &x)
 
DMat4 MatrixInverse (const DMat4 &x)
 
template<typename ScalarT , size_t COLS, size_t ROWS>
Matrix< ScalarT, ROWS, COLS > Transpose (const Matrix< ScalarT, COLS, ROWS > &value)
 Computes the transposition of a matrix.
 
Int Min (const Int &x, const Int &y)
 Result is y if y < x, otherwise result is x. More...
 
IVec2 Min (const IVec2 &x, const IVec2 &y)
 
IVec3 Min (const IVec3 &x, const IVec3 &y)
 
IVec4 Min (const IVec4 &x, const IVec4 &y)
 
UInt Min (const UInt &x, const UInt &y)
 
UVec2 Min (const UVec2 &x, const UVec2 &y)
 
UVec3 Min (const UVec3 &x, const UVec3 &y)
 
UVec4 Min (const UVec4 &x, const UVec4 &y)
 
Float Min (const Float &x, const Float &y)
 
Vec2 Min (const Vec2 &x, const Vec2 &y)
 
Vec3 Min (const Vec3 &x, const Vec3 &y)
 
Vec4 Min (const Vec4 &x, const Vec4 &y)
 
Double Min (const Double &x, const Double &y)
 
DVec2 Min (const DVec2 &x, const DVec2 &y)
 
DVec3 Min (const DVec3 &x, const DVec3 &y)
 
DVec4 Min (const DVec4 &x, const DVec4 &y)
 
Int Max (const Int &x, const Int &y)
 Result is y if x < y, otherwise result is x. More...
 
IVec2 Max (const IVec2 &x, const IVec2 &y)
 
IVec3 Max (const IVec3 &x, const IVec3 &y)
 
IVec4 Max (const IVec4 &x, const IVec4 &y)
 
UInt Max (const UInt &x, const UInt &y)
 
UVec2 Max (const UVec2 &x, const UVec2 &y)
 
UVec3 Max (const UVec3 &x, const UVec3 &y)
 
UVec4 Max (const UVec4 &x, const UVec4 &y)
 
Float Max (const Float &x, const Float &y)
 
Vec2 Max (const Vec2 &x, const Vec2 &y)
 
Vec3 Max (const Vec3 &x, const Vec3 &y)
 
Vec4 Max (const Vec4 &x, const Vec4 &y)
 
Double Max (const Double &x, const Double &y)
 
DVec2 Max (const DVec2 &x, const DVec2 &y)
 
DVec3 Max (const DVec3 &x, const DVec3 &y)
 
DVec4 Max (const DVec4 &x, const DVec4 &y)
 
Int Clamp (const Int &x, const Int &minVal, const Int &maxVal)
 Computes the value of Min ( Max ( x, minVal ), maxVal ). More...
 
IVec2 Clamp (const IVec2 &x, const IVec2 &minVal, const IVec2 &maxVal)
 
IVec3 Clamp (const IVec3 &x, const IVec3 &minVal, const IVec3 &maxVal)
 
IVec4 Clamp (const IVec4 &x, const IVec4 &minVal, const IVec4 &maxVal)
 
UInt Clamp (const UInt &x, const UInt &minVal, const UInt &maxVal)
 
UVec2 Clamp (const UVec2 &x, const UVec2 &minVal, const UVec2 &maxVal)
 
UVec3 Clamp (const UVec3 &x, const UVec3 &minVal, const UVec3 &maxVal)
 
UVec4 Clamp (const UVec4 &x, const UVec4 &minVal, const UVec4 &maxVal)
 
Float Clamp (const Float &x, const Float &minVal, const Float &maxVal)
 
Vec2 Clamp (const Vec2 &x, const Vec2 &minVal, const Vec2 &maxVal)
 
Vec3 Clamp (const Vec3 &x, const Vec3 &minVal, const Vec3 &maxVal)
 
Vec4 Clamp (const Vec4 &x, const Vec4 &minVal, const Vec4 &maxVal)
 
Double Clamp (const Double &x, const Double &minVal, const Double &maxVal)
 
DVec2 Clamp (const DVec2 &x, const DVec2 &minVal, const DVec2 &maxVal)
 
DVec3 Clamp (const DVec3 &x, const DVec3 &minVal, const DVec3 &maxVal)
 
DVec4 Clamp (const DVec4 &x, const DVec4 &minVal, const DVec4 &maxVal)
 
Float Mix (const Float &x, const Float &y, const Float &a)
 Computes the linear blend of x and y, i.e., x * (1 - a) + y * a.
 
Vec2 Mix (const Vec2 &x, const Vec2 &y, const Vec2 &a)
 
Vec3 Mix (const Vec3 &x, const Vec3 &y, const Vec3 &a)
 
Vec4 Mix (const Vec4 &x, const Vec4 &y, const Vec4 &a)
 
Double Mix (const Double &x, const Double &y, const Double &a)
 
DVec2 Mix (const DVec2 &x, const DVec2 &y, const DVec2 &a)
 
DVec3 Mix (const DVec3 &x, const DVec3 &y, const DVec3 &a)
 
DVec4 Mix (const DVec4 &x, const DVec4 &y, const DVec4 &a)
 
Float Step (const Float &edge, const Float &x)
 Result is 0 if x < edge. Otherwise result is 1.
 
Vec2 Step (const Vec2 &edge, const Vec2 &x)
 
Vec3 Step (const Vec3 &edge, const Vec3 &x)
 
Vec4 Step (const Vec4 &edge, const Vec4 &x)
 
Double Step (const Double &edge, const Double &x)
 
DVec2 Step (const DVec2 &edge, const DVec2 &x)
 
DVec3 Step (const DVec3 &edge, const DVec3 &x)
 
DVec4 Step (const DVec4 &edge, const DVec4 &x)
 
Float SmoothStep (const Float &edge0, const Float &edge1, const Float &x)
 Result is 0 if x <= edge0, 1 if x >= edge1, or smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. More...
 
Vec2 SmoothStep (const Vec2 &edge0, const Vec2 &edge1, const Vec2 &x)
 
Vec3 SmoothStep (const Vec3 &edge0, const Vec3 &edge1, const Vec3 &x)
 
Vec4 SmoothStep (const Vec4 &edge0, const Vec4 &edge1, const Vec4 &x)
 
Double SmoothStep (const Double &edge0, const Double &edge1, const Double &x)
 
DVec2 SmoothStep (const DVec2 &edge0, const DVec2 &edge1, const DVec2 &x)
 
DVec3 SmoothStep (const DVec3 &edge0, const DVec3 &edge1, const DVec3 &x)
 
DVec4 SmoothStep (const DVec4 &edge0, const DVec4 &edge1, const DVec4 &x)
 
Float Fma (const Float &edge0, const Float &edge1, const Float &x)
 Computes a * b + c.
 
Vec2 Fma (const Vec2 &edge0, const Vec2 &edge1, const Vec2 &x)
 
Vec3 Fma (const Vec3 &edge0, const Vec3 &edge1, const Vec3 &x)
 
Vec4 Fma (const Vec4 &edge0, const Vec4 &edge1, const Vec4 &x)
 
Double Fma (const Double &a, const Double &b, const Double &c)
 
DVec2 Fma (const DVec2 &a, const DVec2 &b, const DVec2 &c)
 
DVec3 Fma (const DVec3 &a, const DVec3 &b, const DVec3 &c)
 
DVec4 Fma (const DVec4 &a, const DVec4 &b, const DVec4 &c)
 
UInt PackSnorm4x8 (const Vec4 &v)
 Converts each component of the signed normalized floating-point value v into 8-bit integer values and packs them into the result. More...
 
UInt PackUnorm4x8 (const Vec4 &v)
 Converts each component of the positive normalized floating-point value v into 8-bit integer values and packs them into the result. More...
 
UInt PackSnorm2x16 (const Vec2 &v)
 Converts each component of the signed normalized floating-point value v into 16-bit integer values and packs them into the result. More...
 
UInt PackUnorm2x16 (const Vec2 &v)
 Converts each component of the positive normalized floating-point value v into 16-bit integer values and packs them into the result. More...
 
UInt PackHalf2x16 (const Vec2 &v)
 Converts the components of a two-component floating-point vector to the 16-bit float, then packs them into a 32-bit unsigned integer. More...
 
Double PackDouble2x32 (const UVec2 &v)
 Packs the components of v into a 64-bit value. More...
 
Vec2 UnpackSnorm2x16 (const UInt &p)
 Unpacks a single 32-bit unsigned integer p into a pair of 16-bit signed integers and converts them to normalized floating-point values. More...
 
Vec2 UnpackUnorm2x16 (const UInt &p)
 Unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers. and converts them to normalized floating-point values. More...
 
Vec2 UnpackHalf2x16 (const UInt &v)
 Unpacks a 32-bit unsigned integer into a pair of 16-bit values, interpreted as 16-bit floating-point numbers, and converts them to 32-bit floating-point values. More...
 
Vec4 UnpackSnorm4x8 (const UInt &p)
 Unpacks a single 32-bit unsigned integer p into four 8-bit signed integers and converts them to normalized floating-point values. More...
 
Vec4 UnpackUnorm4x8 (const UInt &p)
 Unpacks a single 32-bit unsigned integer p into four 8-bit unsigned integers and converts them to normalized floating-point values. More...
 
UVec2 UnpackDouble2x32 (const Double &value)
 Computes the two-component unsigned integer vector representation of v. The bit-level representation of v is preserved. More...
 
Float Dot (const Vec2 &lhs, const Vec2 &rhs)
 Computes dot product of two vectors.
 
Float Dot (const Vec3 &lhs, const Vec3 &rhs)
 
Float Dot (const Vec4 &lhs, const Vec4 &rhs)
 
Double Dot (const DVec2 &lhs, const DVec2 &rhs)
 
Double Dot (const DVec3 &lhs, const DVec3 &rhs)
 
Double Dot (const DVec4 &lhs, const DVec4 &rhs)
 
template<size_t COLS, size_t ROWS>
TRMatrix< Float, COLS, ROWS > OuterProduct (const TRVector< Float, ROWS > &lhs, const TRVector< Float, COLS > &rhs)
 Computes linear-algebraic outer product of two vectors.
 
template<size_t COLS, size_t ROWS>
TRMatrix< Double, COLS, ROWS > OuterProduct (const TRVector< Double, ROWS > &lhs, const TRVector< Double, COLS > &rhs)
 
Float Length (const Float &value)
 Computes the length of a vector.
 
Float Length (const Vec2 &value)
 
Float Length (const Vec3 &value)
 
Float Length (const Vec4 &value)
 
Double Length (const Double &value)
 
Double Length (const DVec2 &value)
 
Double Length (const DVec3 &value)
 
Double Length (const DVec4 &value)
 
Float Distance (const Float &v1, const Float &v2)
 Computes the distance between v1 and v2.
 
Float Distance (const Vec2 &v1, const Vec2 &v2)
 
Float Distance (const Vec3 &v1, const Vec3 &v2)
 
Float Distance (const Vec4 &v1, const Vec4 &v2)
 
Double Distance (const Double &v1, const Double &v2)
 
Double Distance (const DVec2 &v1, const DVec2 &v2)
 
Double Distance (const DVec3 &v1, const DVec3 &v2)
 
Double Distance (const DVec4 &v1, const DVec4 &v2)
 
Vec3 Cross (const Vec3 &x, const Vec3 &y)
 Computes the cross product of x and y.
 
DVec3 Cross (const DVec3 &x, const DVec3 &y)
 
Float Normalize (const Float &x)
 Computes the vector in the same direction as x but with a length of 1.
 
Vec2 Normalize (const Vec2 &x)
 
Vec3 Normalize (const Vec3 &x)
 
Vec4 Normalize (const Vec4 &x)
 
Double Normalize (const Double &x)
 
DVec2 Normalize (const DVec2 &x)
 
DVec3 Normalize (const DVec3 &x)
 
DVec4 Normalize (const DVec4 &x)
 
Float FaceForward (const Float &n, const Float &i, const Float &nref)
 If the dot product of nref and i is negative, the result is n, otherwise it is -n.
 
Vec2 FaceForward (const Vec2 &n, const Vec2 &i, const Vec2 &nref)
 
Vec3 FaceForward (const Vec3 &n, const Vec3 &i, const Vec3 &nref)
 
Vec4 FaceForward (const Vec4 &n, const Vec4 &i, const Vec4 &nref)
 
Double FaceForward (const Double &n, const Double &i, const Double &nref)
 
DVec2 FaceForward (const DVec2 &n, const DVec2 &i, const DVec2 &nref)
 
DVec3 FaceForward (const DVec3 &n, const DVec3 &i, const DVec3 &nref)
 
DVec4 FaceForward (const DVec4 &n, const DVec4 &i, const DVec4 &nref)
 
Float Reflect (const Float &i, const Float &n)
 Computes reflected vector to the vector i. More...
 
Vec2 Reflect (const Vec2 &i, const Vec2 &n)
 
Vec3 Reflect (const Vec3 &i, const Vec3 &n)
 
Vec4 Reflect (const Vec4 &i, const Vec4 &n)
 
Double Reflect (const Double &i, const Double &n)
 
DVec2 Reflect (const DVec2 &i, const DVec2 &n)
 
DVec3 Reflect (const DVec3 &i, const DVec3 &n)
 
DVec4 Reflect (const DVec4 &i, const DVec4 &n)
 
Float Refract (const Float &i, const Float &n, const Float &eta)
 Computes refracted vector to the vector i. More...
 
Vec2 Refract (const Vec2 &i, const Vec2 &n, const Float &eta)
 
Vec3 Refract (const Vec3 &i, const Vec3 &n, const Float &eta)
 
Vec4 Refract (const Vec4 &i, const Vec4 &n, const Float &eta)
 
Double Refract (const Double &i, const Double &n, const Float &eta)
 
DVec2 Refract (const DVec2 &i, const DVec2 &n, const Float &eta)
 
DVec3 Refract (const DVec3 &i, const DVec3 &n, const Float &eta)
 
DVec4 Refract (const DVec4 &i, const DVec4 &n, const Float &eta)
 
Int FindLsb (const Int &v)
 Computes the bit number of the least-significant 1-bit in the binary representation of v. More...
 
IVec2 FindLsb (const IVec2 &v)
 
IVec3 FindLsb (const IVec3 &v)
 
IVec4 FindLsb (const IVec4 &v)
 
UInt FindLsb (const UInt &v)
 
UVec2 FindLsb (const UVec2 &v)
 
UVec3 FindLsb (const UVec3 &v)
 
UVec4 FindLsb (const UVec4 &v)
 
Int FindMsb (const Int &value)
 Computes the bit number of the most-significant 1-bit in the binary representation of v. More...
 
IVec2 FindMsb (const IVec2 &value)
 
IVec3 FindMsb (const IVec3 &value)
 
IVec4 FindMsb (const IVec4 &value)
 
UInt FindMsb (const UInt &value)
 
UVec2 FindMsb (const UVec2 &value)
 
UVec3 FindMsb (const UVec3 &value)
 
UVec4 FindMsb (const UVec4 &value)
 
Float NMin (const Float &x, const Float &y)
 Result is y if y < x, otherwise result is x. More...
 
Vec2 NMin (const Vec2 &x, const Vec2 &y)
 
Vec3 NMin (const Vec3 &x, const Vec3 &y)
 
Vec4 NMin (const Vec4 &x, const Vec4 &y)
 
Double NMin (const Double &x, const Double &y)
 
DVec2 NMin (const DVec2 &x, const DVec2 &y)
 
DVec3 NMin (const DVec3 &x, const DVec3 &y)
 
DVec4 NMin (const DVec4 &x, const DVec4 &y)
 
Float NMax (const Float &x, const Float &y)
 Result is y if x < y, otherwise result is x. More...
 
Vec2 NMax (const Vec2 &x, const Vec2 &y)
 
Vec3 NMax (const Vec3 &x, const Vec3 &y)
 
Vec4 NMax (const Vec4 &x, const Vec4 &y)
 
Double NMax (const Double &x, const Double &y)
 
DVec2 NMax (const DVec2 &x, const DVec2 &y)
 
DVec3 NMax (const DVec3 &x, const DVec3 &y)
 
DVec4 NMax (const DVec4 &x, const DVec4 &y)
 
Float NClamp (const Float &x, const Float &minVal, const Float &maxVal)
 Result is min ( max ( x, minVal), maxVal ). More...
 
Vec2 NClamp (const Vec2 &x, const Vec2 &minVal, const Vec2 &maxVal)
 
Vec3 NClamp (const Vec3 &x, const Vec3 &minVal, const Vec3 &maxVal)
 
Vec4 NClamp (const Vec4 &x, const Vec4 &minVal, const Vec4 &maxVal)
 
Double NClamp (const Double &x, const Double &minVal, const Double &maxVal)
 
DVec2 NClamp (const DVec2 &x, const DVec2 &minVal, const DVec2 &maxVal)
 
DVec3 NClamp (const DVec3 &x, const DVec3 &minVal, const DVec3 &maxVal)
 
DVec4 NClamp (const DVec4 &x, const DVec4 &minVal, const DVec4 &maxVal)
 
Int Mod (const Int &lhs, const Int &rhs)
 Modulo operation of lhs modulo rhs. More...
 
IVec2 Mod (const IVec2 &lhs, const IVec2 &rhs)
 
IVec3 Mod (const IVec3 &lhs, const IVec3 &rhs)
 
IVec4 Mod (const IVec4 &lhs, const IVec4 &rhs)
 
IMat2 Mod (const IMat2 &lhs, const IMat2 &rhs)
 
IMat3 Mod (const IMat3 &lhs, const IMat3 &rhs)
 
IMat4 Mod (const IMat4 &lhs, const IMat4 &rhs)
 
UInt Mod (const UInt &lhs, const UInt &rhs)
 
UVec2 Mod (const UVec2 &lhs, const UVec2 &rhs)
 
UVec3 Mod (const UVec3 &lhs, const UVec3 &rhs)
 
UVec4 Mod (const UVec4 &lhs, const UVec4 &rhs)
 
UMat2 Mod (const UMat2 &lhs, const UMat2 &rhs)
 
UMat3 Mod (const UMat3 &lhs, const UMat3 &rhs)
 
UMat4 Mod (const UMat4 &lhs, const UMat4 &rhs)
 
Float Mod (const Float &lhs, const Float &rhs)
 
Vec2 Mod (const Vec2 &lhs, const Vec2 &rhs)
 
Vec3 Mod (const Vec3 &lhs, const Vec3 &rhs)
 
Vec4 Mod (const Vec4 &lhs, const Vec4 &rhs)
 
Mat2 Mod (const Mat2 &lhs, const Mat2 &rhs)
 
Mat3 Mod (const Mat3 &lhs, const Mat3 &rhs)
 
Mat4 Mod (const Mat4 &lhs, const Mat4 &rhs)
 
Double Mod (const Double &lhs, const Double &rhs)
 
DVec2 Mod (const DVec2 &lhs, const DVec2 &rhs)
 
DVec3 Mod (const DVec3 &lhs, const DVec3 &rhs)
 
DVec4 Mod (const DVec4 &lhs, const DVec4 &rhs)
 
DMat2 Mod (const DMat2 &lhs, const DMat2 &rhs)
 
DMat3 Mod (const DMat3 &lhs, const DMat3 &rhs)
 
DMat4 Mod (const DMat4 &lhs, const DMat4 &rhs)
 
std::pair< Float, FloatModf (const Float &x)
 Computes the fractional part of x (as the first result) and the whole number part (second result). More...
 
std::pair< Vec2, Vec2Modf (const Vec2 &x)
 
std::pair< Vec3, Vec3Modf (const Vec3 &x)
 
std::pair< Vec4, Vec4Modf (const Vec4 &x)
 
std::pair< Double, DoubleModf (const Double &x)
 
std::pair< DVec2, DVec2Modf (const DVec2 &x)
 
std::pair< DVec3, DVec3Modf (const DVec3 &x)
 
std::pair< DVec4, DVec4Modf (const DVec4 &x)
 
Float Ldexp (const Float &x, const Int &exp)
 Builds a floating-point number from x and the corresponding integral exponent of two in exp. More...
 
Vec2 Ldexp (const Vec2 &x, const IVec2 &exp)
 
Vec3 Ldexp (const Vec3 &x, const IVec3 &exp)
 
Vec4 Ldexp (const Vec4 &x, const IVec4 &exp)
 
Double Ldexp (const Double &x, const Int &exp)
 
DVec2 Ldexp (const DVec2 &x, const IVec2 &exp)
 
DVec3 Ldexp (const DVec3 &x, const IVec3 &exp)
 
DVec4 Ldexp (const DVec4 &x, const IVec4 &exp)
 
std::pair< Float, IntFrexp (const Float &x)
 Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two,. More...
 
std::pair< Vec2, IVec2Frexp (const Vec2 &x)
 
std::pair< Vec3, IVec3Frexp (const Vec3 &x)
 
std::pair< Vec4, IVec4Frexp (const Vec4 &x)
 
std::pair< Double, IntFrexp (const Double &x)
 
std::pair< DVec2, IVec2Frexp (const DVec2 &x)
 
std::pair< DVec3, IVec3Frexp (const DVec3 &x)
 
std::pair< DVec4, IVec4Frexp (const DVec4 &x)
 
Bool IsNaN (const Float &x)
 Result is true if x is an IEEE NaN, otherwise result is false.
 
BVec2 IsNaN (const Vec2 &x)
 
BVec3 IsNaN (const Vec3 &x)
 
BVec4 IsNaN (const Vec4 &x)
 
Bool IsNaN (const Double &x)
 
BVec2 IsNaN (const DVec2 &x)
 
BVec3 IsNaN (const DVec3 &x)
 
BVec4 IsNaN (const DVec4 &x)
 
Bool IsInf (const Float &value)
 Result is true if x is an IEEE Inf, otherwise result is false.
 
BVec2 IsInf (const Vec2 &value)
 
BVec3 IsInf (const Vec3 &value)
 
BVec4 IsInf (const Vec4 &value)
 
Bool IsInf (const Double &value)
 
BVec2 IsInf (const DVec2 &value)
 
BVec3 IsInf (const DVec3 &value)
 
BVec4 IsInf (const DVec4 &value)
 
Bool IsAnyComponentTrue (const BVec2 &v)
 Result is true if any component of the vector is true, otherwise false.
 
Bool IsAnyComponentTrue (const BVec3 &v)
 
Bool IsAnyComponentTrue (const BVec4 &v)
 
Bool IsAllComponentsTrue (const BVec2 &v)
 Result is true if all components of the vector are true, otherwise false.
 
Bool IsAllComponentsTrue (const BVec3 &v)
 
Bool IsAllComponentsTrue (const BVec4 &v)
 
Int BitCount (const Int &value)
 Reverses the bits in specified value. More...
 
IVec2 BitCount (const IVec2 &value)
 
IVec3 BitCount (const IVec3 &value)
 
IVec4 BitCount (const IVec4 &value)
 
Int BitCount (const UInt &value)
 
IVec2 BitCount (const UVec2 &value)
 
IVec3 BitCount (const UVec3 &value)
 
IVec4 BitCount (const UVec4 &value)
 
Int BitReverse (const Int &value)
 Counts the number of set bits in specified value. More...
 
IVec2 BitReverse (const IVec2 &value)
 
IVec3 BitReverse (const IVec3 &value)
 
IVec4 BitReverse (const IVec4 &value)
 
UInt BitReverse (const UInt &value)
 
UVec2 BitReverse (const UVec2 &value)
 
UVec3 BitReverse (const UVec3 &value)
 
UVec4 BitReverse (const UVec4 &value)
 
template<class ImageT >
void UseImage (const ImageT &img)
 Declares image binding point as used in the shader. More...
 
template<class ValueT >
void Ignore (const ValueT &value)
 Computes the expression given as argument and ignores the result. More...
 
template<class TextureT , class SamplerT >
auto MakeSampledTexture (const TextureT &texture, const SamplerT &sampler)
 Converts texture and sampler pair to combined sampled texture. More...
 
template<class TextureT >
auto ExtractSampledTexture (const TextureT &texture)
 Extracts the texture part from combined sampled texture. More...
 
template<class ImageT >
auto ImageSize (const ImageT &image)
 Retrieves the extent of specified image. More...
 
template<class ImageT , class LodT >
auto TextureSize (const ImageT &image, const Int &lod)
 Retrieves the extent of specified MIP image level. More...
 
template<class ImageT >
Int ImageQuerySamples (const ImageT &image)
 Retrieves the number of samples per pixel in the image. More...
 
template<class ImageT >
Int ImageQueryLevels (const ImageT &image)
 Retrieves the number of MIP levels in the image. More...
 
template<class ImageT , class CoordsT >
Vec2 TextureQueryLod (const ImageT &image, const CoordsT &coords)
 Retrieves the mipmap level and the level of detail for a hypothetical sampling of image at coordinate using an implicit level of detail. More...
 
template<class ImageT >
auto SubpassLoad (const ImageT &image)
 Reads a pixel from input attachment. More...
 
template<class ImageT >
auto SubpassLoad (const ImageT &image, const IVec2 &coords)
 Reads a pixel from input attachment, with offset. More...
 
template<class ImageT >
auto SubpassLoad (const ImageT &image, const Int &nSample)
 Reads a sample from multisampled input attachment. More...
 
template<class ImageT >
auto SubpassLoad (const ImageT &image, const IVec2 &coords, const Int &nSample)
 Reads a sample from multisampled input attachment, with offset. More...
 
template<class ImageT , class CoordsT >
auto ImageLoad (const ImageT &image, const CoordsT &coords)
 Reads a pixel from a storage image. More...
 
template<class ImageT , class CoordsT >
auto ImageLoad (const ImageT &image, const CoordsT &coords, const Int &nSample)
 Reads a sample from multisampled storage image. More...
 
template<class ImageT , class CoordsT , class ValueT >
void ImageStore (const ImageT &image, const CoordsT &coords, const ValueT &value)
 Writes a pixel to a storage image. More...
 
template<class ImageT , class CoordsT , class ValueT >
void ImageStore (const ImageT &image, const CoordsT &coords, const ValueT &value, const Int &nSample)
 Writes a sample to multisampled storage image. More...
 
template<class TextureT , class CoordsT >
auto TexelFetch (const TextureT &texture, const CoordsT &coords)
 Reads a texel from a texture without sampling. More...
 
template<class TextureT , class CoordsT >
auto TexelFetch (const TextureT &texture, const CoordsT &coords, const Int &nSample)
 Reads a texel from multisampled texture without sampling. More...
 
template<class TextureT , class CoordsT >
auto TexelFetchLod (const TextureT &texture, const CoordsT &coords, const Int &nLevel)
 Reads a texel from a specified MIP level of texture without sampling. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TexelFetchOffset (const TextureT &texture, const CoordsT &coords, const OffsetT &offset)
 Reads a texel (with coordinate offset) from a texture without sampling. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TexelFetchLodOffset (const TextureT &texture, const CoordsT &coords, const Int &nLevel, const OffsetT &offset)
 Reads a texel from a specified MIP level (with coordinate offset) of texture without sampling. More...
 
template<class TextureT , class CoordsT >
auto Texture (const TextureT &texture, const CoordsT &coords)
 Samples a texel from a texture. More...
 
template<class TextureT , class CoordsT >
auto Texture (const TextureT &texture, const CoordsT &coords, const Float &bias)
 Samples a texel from a texture with LOD bias. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto Texture (const TextureT &texture, const CoordsT &coords, const OffsetT &offset)
 Samples a texel from a texture with coordinate offset. More...
 
template<class TextureT , class CoordsT , class GradT >
auto Texture (const TextureT &texture, const CoordsT &coords, const GradT &gradX, const GradT &gradY)
 Samples a texel from a texture with LOD gradient. More...
 
template<class TextureT , class CoordsT , class OffsetT , class GradT >
auto Texture (const TextureT &texture, const CoordsT &coords, const OffsetT &offset, const GradT &gradX, const GradT &gradY)
 Samples a texel from a texture with coordinate offset and LOD gradient. More...
 
template<class TextureT , class CoordsT >
auto TextureLod (const TextureT &texture, const CoordsT &coords, const Float &lod)
 Samples a texel from a texture with explicit MIP levels selection. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TextureLod (const TextureT &texture, const CoordsT &coords, const OffsetT &offset, const Float &lod)
 Samples a texel from a texture with coordinate offset and explicit MIP levels selection. More...
 
template<class TextureT , class CoordsT >
auto TextureProj (const TextureT &texture, const CoordsT &coords)
 Samples a texel from a texture with perspective division. More...
 
template<class TextureT , class CoordsT >
auto TextureProj (const TextureT &texture, const CoordsT &coords, const Float &bias)
 Samples a texel from a texture with perspective division and LOD bias. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TextureProj (const TextureT &texture, const CoordsT &coords, const OffsetT &offset)
 Samples a texel from a texture with perspective division and coordinate offset. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TextureProj (const TextureT &texture, const CoordsT &coords, const OffsetT &offset, const Float &bias)
 Samples a texel from a texture with perspective division, coordinate offset and LOD bias. More...
 
template<class TextureT , class CoordsT , class GradT >
auto TextureProj (const TextureT &texture, const CoordsT &coords, const GradT &gradX, const GradT &gradY)
 Samples a texel from a texture with perspective division, and LOD gradient. More...
 
template<class TextureT , class CoordsT , class OffsetT , class GradT >
auto TextureProj (const TextureT &texture, const CoordsT &coords, const OffsetT &offset, const GradT &gradX, const GradT &gradY)
 Samples a texel from a texture with perspective division, coordinate offset and LOD gradient. More...
 
template<class TextureT , class CoordsT >
auto TextureLodProj (const TextureT &texture, const CoordsT &coords, const Float &lod)
 Samples a texel from a texture with perspective division and explicit MIP levels selection. More...
 
template<class TextureT , class CoordsT , class OffsetT >
auto TextureLodProj (const TextureT &texture, const CoordsT &coords, const OffsetT &offset, const Float &lod)
 Samples a texel from a texture with perspective division, coordinate offset and explicit MIP levels selection. More...
 
template<class TextureT , class Arg1T , class Arg2T >
auto TextureDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto TextureDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T >
auto TextureDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4, const Arg5T &arg5)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureLodDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto TextureLodDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4)
 
template<class TextureT , class Arg1T , class Arg2T >
auto TextureProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto TextureProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T >
auto TextureProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4, const Arg5T &arg5)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureLodProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto TextureLodProjDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4)
 
template<class TextureT , class Arg1T , class Arg2T >
auto TextureGather (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureGather (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto TextureGatherDref (const TextureT &texture, const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 
template<class ValueT >
TUpdateMultipleDescriptors< ValueT > multi (const ValueT &value, std::uint32_t startIdx=0)
 Resource binding helper for binding items or ranges of resource arrays.
 
void operator<< (const Process &target, const std::function< void() > &cmds)
 Defines a command sequence for rendering process.
 
void operator<< (const Preprocess &target, const std::function< void() > &cmds)
 Defines a command sequence for preparation process.
 
void operator<< (const Postprocess &target, const std::function< void() > &cmds)
 Defines a command sequence for finalization process.
 

Detailed Description

The VPP namespace.

Enumeration Type Documentation

◆ EFeature

Optional device feature enumeration.

VPP offers unified interface to deal with both device features and known device extensions. Thus, extensions are listed as features in this enumeration and are being enabled in the same fashion. VPP automatically handles dependencies between features and extensions. For example, if you enable the fShaderSharedInt64Atomics feature (e.g. to use Int64 in a shader), VPP will automatically enable fExtShaderAtomicInt64 extension.

Extensions correspond to values with fExt prefix. Other values are for features.

See section 30.1 in the official Vulkan docs for complete description of base features. For extension-specific features, you can find separate edition of Vulkan spec document augmented with a description of each extension.

Caution: values of this type listed below are intended to be used only as arguments to methods accepting EFeature type. Do not declare your own EFeature variables nor use the values in other contexts, as you will likely encounter C++ errors if you do so.

Extensions which are listed in the enumeration below are being referred to as known extensions. Those are mostly Khronos and multivendor extensions. Some of these extensions are also integrated into VPP API, but not all. Integration of extensions is a work in progress. Currently the following ones have explicit support in the VPP API:

  • fExtShaderAtomicInt64

Vendor-specific extensions are currently unsupported. Subsequent versions of VPP will make possible to enable them and use though mixing of VPP and core Vulkan API.

◆ EImagePurpose

Enumeration specifying general purpose of an image.

This is more general distinction than Img::EUsageFlags.

Enumerator
RENDER 

All images used for normal rendering.

DISPLAY 

Tags an attachment to be associated with a swapchain image view.

SWAPCHAIN 

Special image created as a part of the swapchain.

RENDER_DEBUG 

Internally created image for debugging purposes.

◆ ETag

enum vpp::ETag

Enumeration type allowing to select the flavor of shader structural type: the CPU or GPU version.

Use as a template argument to instantiate wanted version. This applies to subclass templates of the following: VertexStruct, InstanceStruct, UniformStruct, LocalStruct. Also the value of ETag type is passed to members of these structures: Attribute, UniformFld, Field.

Enumerator
CPU 

Selects CPU version of the structure.

GPU 

Selects GPU version of the structure.

DEF 

Internal use only.

Function Documentation

◆ Abs() [1/11]

IVec2 vpp::Abs ( const IVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [2/11]

IVec3 vpp::Abs ( const IVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [3/11]

IVec4 vpp::Abs ( const IVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [4/11]

Float vpp::Abs ( const Float x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [5/11]

Vec2 vpp::Abs ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [6/11]

Vec3 vpp::Abs ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [7/11]

Vec4 vpp::Abs ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [8/11]

Double vpp::Abs ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [9/11]

DVec2 vpp::Abs ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [10/11]

DVec3 vpp::Abs ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Abs() [11/11]

DVec4 vpp::Abs ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acos() [1/4]

Float vpp::Acos ( const Float x)

Arc cosine. Result is an angle, in radians, whose cosine is x.

The range of result values is [0, pi]. Result is undefined if Abs(x) > 1.

◆ Acos() [2/4]

Vec2 vpp::Acos ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acos() [3/4]

Vec3 vpp::Acos ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acos() [4/4]

Vec4 vpp::Acos ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acosh() [1/4]

Float vpp::Acosh ( const Float x)

Arc hyperbolic cosine.

Result is the non-negative inverse of Cosh. Result is undefined if x < 1.

◆ Acosh() [2/4]

Vec2 vpp::Acosh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acosh() [3/4]

Vec3 vpp::Acosh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Acosh() [4/4]

Vec4 vpp::Acosh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asin() [1/4]

Float vpp::Asin ( const Float x)

Arc sine. Result is an angle, in radians, whose sine is x.

The range of result values is [-pi/2, pi/2]. Result is undefined if Abs(x) > 1.

◆ Asin() [2/4]

Vec2 vpp::Asin ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asin() [3/4]

Vec3 vpp::Asin ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asin() [4/4]

Vec4 vpp::Asin ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asinh() [1/4]

Float vpp::Asinh ( const Float x)

Arc hyperbolic sine.

Result is the inverse of Sinh.

◆ Asinh() [2/4]

Vec2 vpp::Asinh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asinh() [3/4]

Vec3 vpp::Asinh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Asinh() [4/4]

Vec4 vpp::Asinh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan() [1/3]

Vec2 vpp::Atan ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan() [2/3]

Vec3 vpp::Atan ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan() [3/3]

Vec4 vpp::Atan ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan2() [1/4]

Float vpp::Atan2 ( const Float y,
const Float x 
)

Arc tangent.

Result is an angle, in radians, whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of result values is [-pi, pi]. Result is undefined if x and y are both 0.

◆ Atan2() [2/4]

Vec2 vpp::Atan2 ( const Vec2 y,
const Vec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan2() [3/4]

Vec3 vpp::Atan2 ( const Vec3 y,
const Vec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atan2() [4/4]

Vec4 vpp::Atan2 ( const Vec4 y,
const Vec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atanh() [1/4]

Float vpp::Atanh ( const Float x)

Arc hyperbolic tangent.

Result is the inverse of Tanh. Result is undefined if Abs(x) >= 1.

◆ Atanh() [2/4]

Vec2 vpp::Atanh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atanh() [3/4]

Vec3 vpp::Atanh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Atanh() [4/4]

Vec4 vpp::Atanh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ barriers() [1/2]

template<typename ... Args>
BarrierList vpp::barriers ( VkPipelineStageFlags  sourceStage,
VkPipelineStageFlags  targetStage,
Args &&...  args 
)

Creates a BarrierList object for specified resources.

This function requires only source and destination stages, and also a list of resource references (vpp::Buf or vpp::Img). You can provide vpp::Bar::EStage values as the stages (they are equivalent to Vulkan enumeration).

Caution: this function throws vpp::XInvalidBarrier exception when it detects an error like invalid stage for particular type of resource, or lack of required usage flags on the resource. This situation indicates a bug in your program.

An example:

DataBuffer m_sortResultBuffer;
DataBuffer m_generateResultBuffer;
DataBuffer m_reduceResultBuffer;
// ...
// inside the command sequence lambda:
// this computation kernel fills the buffers:
m_dataBlock.cmdBind();
pipeline ( 0 ).cmdBind();
cmdDispatch ( 64, 1, 1 );
// this barrier ensures data is ready
cmdPipelineBarrier ( barriers (
m_sortResultBuffer, m_generateResultBuffer, m_reduceResultBuffer ) );
// these calls transfer buffers back to the host
m_sortResultBuffer.cmdLoadAll();
m_generateResultBuffer.cmdLoadAll();
m_reduceResultBuffer.cmdLoadAll();

◆ barriers() [2/2]

BarrierList vpp::barriers ( const Img hImage,
const std::vector< VkImageSubresourceRange > &  regions,
VkPipelineStageFlags  sourceStage,
VkPipelineStageFlags  targetStage 
)

Creates a BarrierList object for specified regions of an image.

This function requires source and destination stages, the image and a list of its regions. You can provide vpp::Bar::EStage values as the stages (they are equivalent to Vulkan enumeration).

For each provided region, separate barrier will be created.

Caution: this function throws vpp::XInvalidBarrier exception when it detects an error like invalid stage for particular type of resource, or lack of required usage flags on the resource. This situation indicates a bug in your program.

◆ Begin()

void vpp::Begin ( )

Marks the start of function body.

Caution: C++ scope is required between Begin() and End().

◆ bind() [1/2]

template<class AttributesT >
auto vpp::bind ( const ImageView< AttributesT > &  view,
VkImageLayout  layout = VK_IMAGE_LAYOUT_UNDEFINED 
)

Helper function to bind specified image view to a binding point in a pipeline.

When you call ShaderDataBlock::update method in order to bind actual resources (buffers, images) to shader data blocks, you provide a list of assignments. In each assignment, the binding point name comes on the left hand side, and on the right hand side usually there is the name of the image or buffer object. You can use the bind() function call in this place, to provide additional parameters.

Currently you can specify the layout in which the resource will be when being accessed by the shader. This is applicable only for binding points of the following types: inTexture, inSampledTexture, inConstSampledTexture, inAttachment. Allowed values are:

  • VK_IMAGE_LAYOUT_GENERAL,
  • VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
  • VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.

In any case, if you do not use the bind function at all, one of the values listed above, appropriate for the binding point, will be assumed.

◆ bind() [2/2]

template<class AttributesT , class SamplerT >
auto vpp::bind ( const SamplerT &  sampler,
const ImageView< AttributesT > &  view,
VkImageLayout  layout = VK_IMAGE_LAYOUT_UNDEFINED 
)

Helper function to bind specified image view and a sampler to a binding point in a pipeline.

When you call ShaderDataBlock::update method in order to bind actual resources (buffers, images) to shader data blocks, you provide a list of assignments. In each assignment, the binding point name comes on the left hand side, and on the right hand side usually there is the name of the image or buffer object. You can use the bind() function call in this place, to provide additional parameters.

This variant of the bind() function allows to bind a sampler along with an image. You must use it for inSampledTexture binding points (and for anything else). This is because inSampledTexture represents a texture image with predefined sampler, although not statically associated (as with inConstSampledTexture).

You can also specify the layout in which the resource will be when being accessed by the shader. This is applicable only for binding points of the following types: inTexture, inSampledTexture, inConstSampledTexture, inAttachment. Allowed values are:

  • VK_IMAGE_LAYOUT_GENERAL,
  • VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
  • VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.

If you do not provide this parameter, one of the values listed above, appropriate for the binding point, will be assumed.

◆ bindDeviceMemory()

template<class ResourceT >
MemoryBinding< ResourceT, DeviceMemory > vpp::bindDeviceMemory ( const ResourceT &  res,
const MemProfile memProfile 
)

Binds specified buffer to a DeviceMemory memory, and returns MemoryBinding object.

The buffer (vpp::Buf or vpp::Buffer subclass) is specified a the res parameter.

It is a convenient practice to use C++ auto type inference to declare the result for this function.

◆ bindMappableMemory()

template<class ResourceT >
MemoryBinding< ResourceT, MappableDeviceMemory > vpp::bindMappableMemory ( const ResourceT &  res,
const MemProfile memProfile 
)

Binds specified buffer to a MappableDeviceMemory memory, and returns MemoryBinding object.

The buffer (vpp::Buf or vpp::Buffer subclass) is specified a the res parameter.

It is a convenient practice to use C++ auto type inference to declare the result for this function.

◆ BitCount() [1/8]

Int vpp::BitCount ( const Int value)

Reverses the bits in specified value.

Results are computed per component.

◆ BitCount() [2/8]

IVec2 vpp::BitCount ( const IVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [3/8]

IVec3 vpp::BitCount ( const IVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [4/8]

IVec4 vpp::BitCount ( const IVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [5/8]

Int vpp::BitCount ( const UInt value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [6/8]

IVec2 vpp::BitCount ( const UVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [7/8]

IVec3 vpp::BitCount ( const UVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitCount() [8/8]

IVec4 vpp::BitCount ( const UVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [1/8]

Int vpp::BitReverse ( const Int value)

Counts the number of set bits in specified value.

Results are computed per component.

◆ BitReverse() [2/8]

IVec2 vpp::BitReverse ( const IVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [3/8]

IVec3 vpp::BitReverse ( const IVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [4/8]

IVec4 vpp::BitReverse ( const IVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [5/8]

UInt vpp::BitReverse ( const UInt value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [6/8]

UVec2 vpp::BitReverse ( const UVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [7/8]

UVec3 vpp::BitReverse ( const UVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ BitReverse() [8/8]

UVec4 vpp::BitReverse ( const UVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [1/7]

Vec2 vpp::Ceil ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [2/7]

Vec3 vpp::Ceil ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [3/7]

Vec4 vpp::Ceil ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [4/7]

Double vpp::Ceil ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [5/7]

DVec2 vpp::Ceil ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [6/7]

DVec3 vpp::Ceil ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ceil() [7/7]

DVec4 vpp::Ceil ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [1/16]

Int vpp::Clamp ( const Int x,
const Int minVal,
const Int maxVal 
)

Computes the value of Min ( Max ( x, minVal ), maxVal ).

Result is undefined if minVal > maxVal.

◆ Clamp() [2/16]

IVec2 vpp::Clamp ( const IVec2 x,
const IVec2 minVal,
const IVec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [3/16]

IVec3 vpp::Clamp ( const IVec3 x,
const IVec3 minVal,
const IVec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [4/16]

IVec4 vpp::Clamp ( const IVec4 x,
const IVec4 minVal,
const IVec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [5/16]

UInt vpp::Clamp ( const UInt x,
const UInt minVal,
const UInt maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [6/16]

UVec2 vpp::Clamp ( const UVec2 x,
const UVec2 minVal,
const UVec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [7/16]

UVec3 vpp::Clamp ( const UVec3 x,
const UVec3 minVal,
const UVec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [8/16]

UVec4 vpp::Clamp ( const UVec4 x,
const UVec4 minVal,
const UVec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [9/16]

Float vpp::Clamp ( const Float x,
const Float minVal,
const Float maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [10/16]

Vec2 vpp::Clamp ( const Vec2 x,
const Vec2 minVal,
const Vec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [11/16]

Vec3 vpp::Clamp ( const Vec3 x,
const Vec3 minVal,
const Vec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [12/16]

Vec4 vpp::Clamp ( const Vec4 x,
const Vec4 minVal,
const Vec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [13/16]

Double vpp::Clamp ( const Double x,
const Double minVal,
const Double maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [14/16]

DVec2 vpp::Clamp ( const DVec2 x,
const DVec2 minVal,
const DVec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [15/16]

DVec3 vpp::Clamp ( const DVec3 x,
const DVec3 minVal,
const DVec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Clamp() [16/16]

DVec4 vpp::Clamp ( const DVec4 x,
const DVec4 minVal,
const DVec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cos() [1/3]

Vec2 vpp::Cos ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cos() [2/3]

Vec3 vpp::Cos ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cos() [3/3]

Vec4 vpp::Cos ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cosh() [1/3]

Vec2 vpp::Cosh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cosh() [2/3]

Vec3 vpp::Cosh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cosh() [3/3]

Vec4 vpp::Cosh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Cross()

DVec3 vpp::Cross ( const DVec3 x,
const DVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Degrees() [1/3]

Vec2 vpp::Degrees ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Degrees() [2/3]

Vec3 vpp::Degrees ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Degrees() [3/3]

Vec4 vpp::Degrees ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Determinant() [1/5]

Float vpp::Determinant ( const Mat3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Determinant() [2/5]

Float vpp::Determinant ( const Mat4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Determinant() [3/5]

Double vpp::Determinant ( const DMat2 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Determinant() [4/5]

Double vpp::Determinant ( const DMat3 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Determinant() [5/5]

Double vpp::Determinant ( const DMat4 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [1/7]

Float vpp::Distance ( const Vec2 v1,
const Vec2 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [2/7]

Float vpp::Distance ( const Vec3 v1,
const Vec3 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [3/7]

Float vpp::Distance ( const Vec4 v1,
const Vec4 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [4/7]

Double vpp::Distance ( const Double v1,
const Double v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [5/7]

Double vpp::Distance ( const DVec2 v1,
const DVec2 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [6/7]

Double vpp::Distance ( const DVec3 v1,
const DVec3 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Distance() [7/7]

Double vpp::Distance ( const DVec4 v1,
const DVec4 v2 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Do()

void vpp::Do ( )

Creates the do clause of the loop construct.

Place in the shader code to create a loop construct. Always use with While() clause. At the end of the looped block, place the closing clause Od(). All instructions between While() and Od() will be executed as long as the expression in While() evaluates to true.

Usually a loop control variable is used to limit iterations. You must declare the variable explicitly, somewhere before the Do() clause. Also do not forget to increment the variable, or make the loop finish by other means. Infinite loop will cause unpredictable behavior, most likely the GPU driver will restart. In case you program hangs due to infinite loop on GPU, kill it explicitly (e.g. with Task Manager).

Note that Do(), While() and Od() are actually function calls (as C++ instructions cannot be overloaded). You must put semicolon after them. Also pay attention to the fact that the code block between While() and Od() does not create C++ scope. If you want to have C++ scope there, you must put the braces explicitly around the code. It is recommended if you create new identifiers inside the block, although not required.

VInt i;
// without scope
i = 0; Do(); While ( i < nr_iterations );
// instructions...
// instructions...
++i;
Od();
// with scope
i = 0; Do(); While ( i < nr_iterations );
{
// instructions...
// instructions...
++i;
}
Od();

◆ Dot() [1/5]

Float vpp::Dot ( const Vec3 lhs,
const Vec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Dot() [2/5]

Float vpp::Dot ( const Vec4 lhs,
const Vec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Dot() [3/5]

Double vpp::Dot ( const DVec2 lhs,
const DVec2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Dot() [4/5]

Double vpp::Dot ( const DVec3 lhs,
const DVec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Dot() [5/5]

Double vpp::Dot ( const DVec4 lhs,
const DVec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Else()

void vpp::Else ( )

Creates the else clause of the conditional construct.

Place in the shader code between If() and Fi() clauses to create a conditional construct with else branch. All instructions between If() and Else() will be executed only if the expression evaluates to true. Instructions between Else() and Fi() will be executed only if the expression evaluates to false.

// without scope
If ( booleanExpression );
// instructions...
// instructions...
Else();
// instructions...
// instructions...
Fi();
// with scope
If ( booleanExpression );
{
// instructions...
// instructions...
}
Else();
{
// instructions...
// instructions...
}
Fi();

◆ End()

void vpp::End ( )

Marks the end of function body.

Caution: C++ scope is required between Begin() and End().

◆ Exp() [1/3]

Vec2 vpp::Exp ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Exp() [2/3]

Vec3 vpp::Exp ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Exp() [3/3]

Vec4 vpp::Exp ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Exp2() [1/3]

Vec2 vpp::Exp2 ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Exp2() [2/3]

Vec3 vpp::Exp2 ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Exp2() [3/3]

Vec4 vpp::Exp2 ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ ExtractSampledTexture()

template<class TextureT >
auto vpp::ExtractSampledTexture ( const TextureT &  texture)

Extracts the texture part from combined sampled texture.

As the argument, provide inSampledTexture, inConstSampledTexture or inTextureBuffer object.

Returns an equivalent of inTexture object.

◆ FaceForward() [1/7]

Vec2 vpp::FaceForward ( const Vec2 n,
const Vec2 i,
const Vec2 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [2/7]

Vec3 vpp::FaceForward ( const Vec3 n,
const Vec3 i,
const Vec3 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [3/7]

Vec4 vpp::FaceForward ( const Vec4 n,
const Vec4 i,
const Vec4 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [4/7]

Double vpp::FaceForward ( const Double n,
const Double i,
const Double nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [5/7]

DVec2 vpp::FaceForward ( const DVec2 n,
const DVec2 i,
const DVec2 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [6/7]

DVec3 vpp::FaceForward ( const DVec3 n,
const DVec3 i,
const DVec3 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FaceForward() [7/7]

DVec4 vpp::FaceForward ( const DVec4 n,
const DVec4 i,
const DVec4 nref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fi()

void vpp::Fi ( )

Creates the ending clause of the conditional construct.

Place in the shader code to end the conditional construct: If() ... Fi() or If() ... Else() ... Fi().

◆ FindLsb() [1/8]

Int vpp::FindLsb ( const Int v)

Computes the bit number of the least-significant 1-bit in the binary representation of v.

If v is 0, the result is -1.

◆ FindLsb() [2/8]

IVec2 vpp::FindLsb ( const IVec2 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [3/8]

IVec3 vpp::FindLsb ( const IVec3 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [4/8]

IVec4 vpp::FindLsb ( const IVec4 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [5/8]

UInt vpp::FindLsb ( const UInt v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [6/8]

UVec2 vpp::FindLsb ( const UVec2 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [7/8]

UVec3 vpp::FindLsb ( const UVec3 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindLsb() [8/8]

UVec4 vpp::FindLsb ( const UVec4 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [1/8]

Int vpp::FindMsb ( const Int value)

Computes the bit number of the most-significant 1-bit in the binary representation of v.

For unsigned or or positive numbers, the result will be the bit number of the most significant 1-bit. For signed negative numbers, the result will be the bit number of the most significant 0-bit. For a value of 0 or -1, the result is -1.

◆ FindMsb() [2/8]

IVec2 vpp::FindMsb ( const IVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [3/8]

IVec3 vpp::FindMsb ( const IVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [4/8]

IVec4 vpp::FindMsb ( const IVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [5/8]

UInt vpp::FindMsb ( const UInt value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [6/8]

UVec2 vpp::FindMsb ( const UVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [7/8]

UVec3 vpp::FindMsb ( const UVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ FindMsb() [8/8]

UVec4 vpp::FindMsb ( const UVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [1/7]

Vec2 vpp::Floor ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [2/7]

Vec3 vpp::Floor ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [3/7]

Vec4 vpp::Floor ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [4/7]

Double vpp::Floor ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [5/7]

DVec2 vpp::Floor ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [6/7]

DVec3 vpp::Floor ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Floor() [7/7]

DVec4 vpp::Floor ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [1/7]

Vec2 vpp::Fma ( const Vec2 edge0,
const Vec2 edge1,
const Vec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [2/7]

Vec3 vpp::Fma ( const Vec3 edge0,
const Vec3 edge1,
const Vec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [3/7]

Vec4 vpp::Fma ( const Vec4 edge0,
const Vec4 edge1,
const Vec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [4/7]

Double vpp::Fma ( const Double a,
const Double b,
const Double c 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [5/7]

DVec2 vpp::Fma ( const DVec2 a,
const DVec2 b,
const DVec2 c 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [6/7]

DVec3 vpp::Fma ( const DVec3 a,
const DVec3 b,
const DVec3 c 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fma() [7/7]

DVec4 vpp::Fma ( const DVec4 a,
const DVec4 b,
const DVec4 c 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ For() [1/2]

void vpp::For ( VInt variable,
Int  begin,
Int  end,
Int  step = 1 
)

Creates the for clause of the 'for' loop construct.

Place in the shader code to create a 'for' loop construct. At the end of the looped block, always place the closing clause Rof().

The For() loop is simplified, specialized version of While(). It takes a single integer variable reference to the loop control variable. The variable must be declared earlier. The loop will initialize the variable to begin value and before executing each iteration it will check whether the variable is less than end. At the end of each iteration, the step value will be added to the control variable.

This kind of 'for' loop is more similar to languages like Fortran, but is still useful in many scenarios. For C++ like 'for' (with arbitrary condition), use the While() loop.

Note that For(), and Rof() are actually function calls (as C++ instructions cannot be overloaded). You must put semicolon after them. Also pay attention to the fact that the code block between For() and Rof() does not create C++ scope. If you want to have C++ scope there, you must put the braces explicitly around the code. It is recommended if you create new identifiers inside the block, although not required.

VInt i;
// without scope
For ( i, 0, nr_iterations );
// instructions...
// instructions...
Rof();
// with scope
For ( i, 0, nr_iterations );
{
// instructions...
// instructions...
}
Rof();

Caution: pay attention to the fact that For() automatically increments the control variable, unlike While(). This is important thing to be aware of when converting between For() and While() constructs.

◆ For() [2/2]

void vpp::For ( VUInt variable,
UInt  begin,
UInt  end,
UInt  step = 1 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [1/7]

Vec2 vpp::Fract ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [2/7]

Vec3 vpp::Fract ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [3/7]

Vec4 vpp::Fract ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [4/7]

Double vpp::Fract ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [5/7]

DVec2 vpp::Fract ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [6/7]

DVec3 vpp::Fract ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Fract() [7/7]

DVec4 vpp::Fract ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [1/8]

std::pair< Float, Int > vpp::Frexp ( const Float x)

Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two,.

The computation is being performed according to the formula:

x = significand * 2^exponent

The significand is the first result and the exponent is the second result.

For a floating-point value of zero, the significand and exponent are both zero.

For a floating-point value that is an infinity or is not a number, the result is undefined.

If an implementation supports negative 0, Frexp (-0) should result in -0. Otherwise it will result in 0.

◆ Frexp() [2/8]

std::pair< Vec2, IVec2 > vpp::Frexp ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [3/8]

std::pair< Vec3, IVec3 > vpp::Frexp ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [4/8]

std::pair< Vec4, IVec4 > vpp::Frexp ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [5/8]

std::pair< Double, Int > vpp::Frexp ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [6/8]

std::pair< DVec2, IVec2 > vpp::Frexp ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [7/8]

std::pair< DVec3, IVec3 > vpp::Frexp ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Frexp() [8/8]

std::pair< DVec4, IVec4 > vpp::Frexp ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ If()

void vpp::If ( Bool  v)

Creates the if clause of the conditional construct.

Place in the shader code to create a conditional construct. Use a conditional expression as the argument of If(). At the end of conditional block, place the closing clause Fi(). All instructions between If() and Fi() will be executed only if the expression evaluates to true.

Note that If() and Fi() are actually function calls (as C++ instructions cannot be overloaded). You must put semicolon after them. Also pay attention to the fact that the code block between If() and Fi() does not create C++ scope. If you want to have C++ scope there, you must put the braces explicitly around the code. It is recommended if you create new identifiers inside the block, although not required.

// without scope
If ( booleanExpression );
// instructions...
// instructions...
Fi();
// with scope
If ( booleanExpression );
{
// instructions...
// instructions...
}
Fi();

◆ Ignore()

template<class ValueT >
void vpp::Ignore ( const ValueT &  value)

Computes the expression given as argument and ignores the result.

This is useful to suppress validation warnings about unused objects (e.g. buffer accessors). Can be handy if you temporarily comment out some code to pinpoint a bug.

◆ ImageLoad() [1/2]

template<class ImageT , class CoordsT >
auto vpp::ImageLoad ( const ImageT &  image,
const CoordsT &  coords 
)

Reads a pixel from a storage image.

As the first argument, provide an object of ioImage or ioImageBuffer type.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

◆ ImageLoad() [2/2]

template<class ImageT , class CoordsT >
auto vpp::ImageLoad ( const ImageT &  image,
const CoordsT &  coords,
const Int nSample 
)

Reads a sample from multisampled storage image.

As the first argument, provide an object of ioImage or ioImageBuffer type.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, specify the sample index.

◆ ImageQueryLevels()

template<class ImageT >
Int vpp::ImageQueryLevels ( const ImageT &  image)

Retrieves the number of MIP levels in the image.

As the argument, you may provide an object of the following types: ioImage, inTexture, inSampledTexture, inConstSampledTexture.

◆ ImageQuerySamples()

template<class ImageT >
Int vpp::ImageQuerySamples ( const ImageT &  image)

Retrieves the number of samples per pixel in the image.

As the argument, you may provide an object of the following types: ioImage, inTexture, inSampledTexture, inConstSampledTexture. It must be a 2D image.

◆ ImageSize()

template<class ImageT >
auto vpp::ImageSize ( const ImageT &  image)

Retrieves the extent of specified image.

As the argument, you may provide an object of the following types: ioImage, inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer, ioImageBuffer.

This function returns either Int or integer vector of size appropriate for the number of dimensions in the image (e.g. IVec2 for 2D image).

◆ ImageStore() [1/2]

template<class ImageT , class CoordsT , class ValueT >
void vpp::ImageStore ( const ImageT &  image,
const CoordsT &  coords,
const ValueT &  value 
)

Writes a pixel to a storage image.

As the first argument, provide an object of ioImage or ioImageBuffer type.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, provide a scalar or vector compatible with image format (e.g. Int for I32 format, Vec4 for normalized RGBA formats, etc.).

◆ ImageStore() [2/2]

template<class ImageT , class CoordsT , class ValueT >
void vpp::ImageStore ( const ImageT &  image,
const CoordsT &  coords,
const ValueT &  value,
const Int nSample 
)

Writes a sample to multisampled storage image.

As the first argument, provide an object of ioImage or ioImageBuffer type.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, provide a scalar or vector compatible with image format (e.g. Int for I32 format, Vec4 for normalized RGBA formats, etc.).

As the fourth argument, specify the destination sample index.

◆ InverseSqrt() [1/8]

Float vpp::InverseSqrt ( const Float x)

Computes the reciprocal of Sqrt(x).

Result is undefined if x <= 0.

◆ InverseSqrt() [2/8]

Vec2 vpp::InverseSqrt ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [3/8]

Vec3 vpp::InverseSqrt ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [4/8]

Vec4 vpp::InverseSqrt ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [5/8]

Double vpp::InverseSqrt ( const Double value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [6/8]

DVec2 vpp::InverseSqrt ( const DVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [7/8]

DVec3 vpp::InverseSqrt ( const DVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ InverseSqrt() [8/8]

DVec4 vpp::InverseSqrt ( const DVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsAllComponentsTrue() [1/2]

Bool vpp::IsAllComponentsTrue ( const BVec3 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsAllComponentsTrue() [2/2]

Bool vpp::IsAllComponentsTrue ( const BVec4 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsAnyComponentTrue() [1/2]

Bool vpp::IsAnyComponentTrue ( const BVec3 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsAnyComponentTrue() [2/2]

Bool vpp::IsAnyComponentTrue ( const BVec4 v)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [1/7]

BVec2 vpp::IsInf ( const Vec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [2/7]

BVec3 vpp::IsInf ( const Vec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [3/7]

BVec4 vpp::IsInf ( const Vec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [4/7]

Bool vpp::IsInf ( const Double value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [5/7]

BVec2 vpp::IsInf ( const DVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [6/7]

BVec3 vpp::IsInf ( const DVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsInf() [7/7]

BVec4 vpp::IsInf ( const DVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [1/7]

BVec2 vpp::IsNaN ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [2/7]

BVec3 vpp::IsNaN ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [3/7]

BVec4 vpp::IsNaN ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [4/7]

Bool vpp::IsNaN ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [5/7]

BVec2 vpp::IsNaN ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [6/7]

BVec3 vpp::IsNaN ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsNaN() [7/7]

BVec4 vpp::IsNaN ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [1/8]

Float vpp::Ldexp ( const Float x,
const Int exp 
)

Builds a floating-point number from x and the corresponding integral exponent of two in exp.

Computes the result as:

x * 2^exp

If this product is too large to be represented in the floating-point type, the result is undefined. If exp is greater than +128 (single precision) or +1024 (double precision), the result undefined. If exp is less than -126 (single precision) or -1022 (double precision), the result may be flushed to zero. Additionally, splitting the value into a significand and exponent using Frexp and then reconstructing a floating-point value using Ldexp should yield the original input for zero and all finite non-denormalized values.

◆ Ldexp() [2/8]

Vec2 vpp::Ldexp ( const Vec2 x,
const IVec2 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [3/8]

Vec3 vpp::Ldexp ( const Vec3 x,
const IVec3 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [4/8]

Vec4 vpp::Ldexp ( const Vec4 x,
const IVec4 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [5/8]

Double vpp::Ldexp ( const Double x,
const Int exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [6/8]

DVec2 vpp::Ldexp ( const DVec2 x,
const IVec2 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [7/8]

DVec3 vpp::Ldexp ( const DVec3 x,
const IVec3 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Ldexp() [8/8]

DVec4 vpp::Ldexp ( const DVec4 x,
const IVec4 exp 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [1/7]

Float vpp::Length ( const Vec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [2/7]

Float vpp::Length ( const Vec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [3/7]

Float vpp::Length ( const Vec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [4/7]

Double vpp::Length ( const Double value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [5/7]

Double vpp::Length ( const DVec2 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [6/7]

Double vpp::Length ( const DVec3 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Length() [7/7]

Double vpp::Length ( const DVec4 value)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log() [1/4]

Float vpp::Log ( const Float x)

Computes the natural logarithm of x.

Result is undefined if x <= 0.

◆ Log() [2/4]

Vec2 vpp::Log ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log() [3/4]

Vec3 vpp::Log ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log() [4/4]

Vec4 vpp::Log ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log2() [1/4]

Float vpp::Log2 ( const Float x)

Computes the base-2 logarithm of x.

Result is undefined if x <= 0.

◆ Log2() [2/4]

Vec2 vpp::Log2 ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log2() [3/4]

Vec3 vpp::Log2 ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Log2() [4/4]

Vec4 vpp::Log2 ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ MakeSampledTexture()

template<class TextureT , class SamplerT >
auto vpp::MakeSampledTexture ( const TextureT &  texture,
const SamplerT &  sampler 
)

Converts texture and sampler pair to combined sampled texture.

As the first argument, provide inTexture object.

As the second argument you may use inSampler or inConstSampler object.

This function creates and returns combined texture-sampler object, which is equivalent to inSampledTexture.

◆ MatrixInverse() [1/6]

Mat2 vpp::MatrixInverse ( const Mat2 x)

Computes a matrix that is the inverse of x.

The values in the result are undefined if x is singular or poorly conditioned (nearly singular).

◆ MatrixInverse() [2/6]

Mat3 vpp::MatrixInverse ( const Mat3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ MatrixInverse() [3/6]

Mat4 vpp::MatrixInverse ( const Mat4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ MatrixInverse() [4/6]

DMat2 vpp::MatrixInverse ( const DMat2 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ MatrixInverse() [5/6]

DMat3 vpp::MatrixInverse ( const DMat3 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ MatrixInverse() [6/6]

DMat4 vpp::MatrixInverse ( const DMat4 &  x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [1/16]

Int vpp::Max ( const Int x,
const Int y 
)

Result is y if x < y, otherwise result is x.

Result is undefined if one of the operands is a NaN.

◆ Max() [2/16]

IVec2 vpp::Max ( const IVec2 x,
const IVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [3/16]

IVec3 vpp::Max ( const IVec3 x,
const IVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [4/16]

IVec4 vpp::Max ( const IVec4 x,
const IVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [5/16]

UInt vpp::Max ( const UInt x,
const UInt y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [6/16]

UVec2 vpp::Max ( const UVec2 x,
const UVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [7/16]

UVec3 vpp::Max ( const UVec3 x,
const UVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [8/16]

UVec4 vpp::Max ( const UVec4 x,
const UVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [9/16]

Float vpp::Max ( const Float x,
const Float y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [10/16]

Vec2 vpp::Max ( const Vec2 x,
const Vec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [11/16]

Vec3 vpp::Max ( const Vec3 x,
const Vec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [12/16]

Vec4 vpp::Max ( const Vec4 x,
const Vec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [13/16]

Double vpp::Max ( const Double x,
const Double y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [14/16]

DVec2 vpp::Max ( const DVec2 x,
const DVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [15/16]

DVec3 vpp::Max ( const DVec3 x,
const DVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Max() [16/16]

DVec4 vpp::Max ( const DVec4 x,
const DVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [1/16]

Int vpp::Min ( const Int x,
const Int y 
)

Result is y if y < x, otherwise result is x.

Result is undefined if one of the operands is a NaN.

◆ Min() [2/16]

IVec2 vpp::Min ( const IVec2 x,
const IVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [3/16]

IVec3 vpp::Min ( const IVec3 x,
const IVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [4/16]

IVec4 vpp::Min ( const IVec4 x,
const IVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [5/16]

UInt vpp::Min ( const UInt x,
const UInt y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [6/16]

UVec2 vpp::Min ( const UVec2 x,
const UVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [7/16]

UVec3 vpp::Min ( const UVec3 x,
const UVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [8/16]

UVec4 vpp::Min ( const UVec4 x,
const UVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [9/16]

Float vpp::Min ( const Float x,
const Float y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [10/16]

Vec2 vpp::Min ( const Vec2 x,
const Vec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [11/16]

Vec3 vpp::Min ( const Vec3 x,
const Vec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [12/16]

Vec4 vpp::Min ( const Vec4 x,
const Vec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [13/16]

Double vpp::Min ( const Double x,
const Double y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [14/16]

DVec2 vpp::Min ( const DVec2 x,
const DVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [15/16]

DVec3 vpp::Min ( const DVec3 x,
const DVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Min() [16/16]

DVec4 vpp::Min ( const DVec4 x,
const DVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [1/7]

Vec2 vpp::Mix ( const Vec2 x,
const Vec2 y,
const Vec2 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [2/7]

Vec3 vpp::Mix ( const Vec3 x,
const Vec3 y,
const Vec3 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [3/7]

Vec4 vpp::Mix ( const Vec4 x,
const Vec4 y,
const Vec4 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [4/7]

Double vpp::Mix ( const Double x,
const Double y,
const Double a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [5/7]

DVec2 vpp::Mix ( const DVec2 x,
const DVec2 y,
const DVec2 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [6/7]

DVec3 vpp::Mix ( const DVec3 x,
const DVec3 y,
const DVec3 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mix() [7/7]

DVec4 vpp::Mix ( const DVec4 x,
const DVec4 y,
const DVec4 a 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [1/28]

Int vpp::Mod ( const Int lhs,
const Int rhs 
)

Modulo operation of lhs modulo rhs.

The sign of a non-zero result comes from the right operand.

◆ Mod() [2/28]

IVec2 vpp::Mod ( const IVec2 lhs,
const IVec2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [3/28]

IVec3 vpp::Mod ( const IVec3 lhs,
const IVec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [4/28]

IVec4 vpp::Mod ( const IVec4 lhs,
const IVec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [5/28]

IMat2 vpp::Mod ( const IMat2 lhs,
const IMat2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [6/28]

IMat3 vpp::Mod ( const IMat3 lhs,
const IMat3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [7/28]

IMat4 vpp::Mod ( const IMat4 lhs,
const IMat4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [8/28]

UInt vpp::Mod ( const UInt lhs,
const UInt rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [9/28]

UVec2 vpp::Mod ( const UVec2 lhs,
const UVec2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [10/28]

UVec3 vpp::Mod ( const UVec3 lhs,
const UVec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [11/28]

UVec4 vpp::Mod ( const UVec4 lhs,
const UVec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [12/28]

UMat2 vpp::Mod ( const UMat2 &  lhs,
const UMat2 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [13/28]

UMat3 vpp::Mod ( const UMat3 &  lhs,
const UMat3 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [14/28]

UMat4 vpp::Mod ( const UMat4 &  lhs,
const UMat4 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [15/28]

Float vpp::Mod ( const Float lhs,
const Float rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [16/28]

Vec2 vpp::Mod ( const Vec2 lhs,
const Vec2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [17/28]

Vec3 vpp::Mod ( const Vec3 lhs,
const Vec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [18/28]

Vec4 vpp::Mod ( const Vec4 lhs,
const Vec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [19/28]

Mat2 vpp::Mod ( const Mat2 lhs,
const Mat2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [20/28]

Mat3 vpp::Mod ( const Mat3 lhs,
const Mat3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [21/28]

Mat4 vpp::Mod ( const Mat4 lhs,
const Mat4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [22/28]

Double vpp::Mod ( const Double lhs,
const Double rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [23/28]

DVec2 vpp::Mod ( const DVec2 lhs,
const DVec2 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [24/28]

DVec3 vpp::Mod ( const DVec3 lhs,
const DVec3 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [25/28]

DVec4 vpp::Mod ( const DVec4 lhs,
const DVec4 rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [26/28]

DMat2 vpp::Mod ( const DMat2 &  lhs,
const DMat2 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [27/28]

DMat3 vpp::Mod ( const DMat3 &  lhs,
const DMat3 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Mod() [28/28]

DMat4 vpp::Mod ( const DMat4 &  lhs,
const DMat4 &  rhs 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [1/8]

std::pair< Float, Float > vpp::Modf ( const Float x)

Computes the fractional part of x (as the first result) and the whole number part (second result).

Both results will have the same sign as x.

◆ Modf() [2/8]

std::pair< Vec2, Vec2 > vpp::Modf ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [3/8]

std::pair< Vec3, Vec3 > vpp::Modf ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [4/8]

std::pair< Vec4, Vec4 > vpp::Modf ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [5/8]

std::pair< Double, Double > vpp::Modf ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [6/8]

std::pair< DVec2, DVec2 > vpp::Modf ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [7/8]

std::pair< DVec3, DVec3 > vpp::Modf ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Modf() [8/8]

std::pair< DVec4, DVec4 > vpp::Modf ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [1/8]

Float vpp::NClamp ( const Float x,
const Float minVal,
const Float maxVal 
)

Result is min ( max ( x, minVal), maxVal ).

Result is undefined if minVal > maxVal.The semantics used by min() and max() are those of NMin and NMax.

◆ NClamp() [2/8]

Vec2 vpp::NClamp ( const Vec2 x,
const Vec2 minVal,
const Vec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [3/8]

Vec3 vpp::NClamp ( const Vec3 x,
const Vec3 minVal,
const Vec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [4/8]

Vec4 vpp::NClamp ( const Vec4 x,
const Vec4 minVal,
const Vec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [5/8]

Double vpp::NClamp ( const Double x,
const Double minVal,
const Double maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [6/8]

DVec2 vpp::NClamp ( const DVec2 x,
const DVec2 minVal,
const DVec2 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [7/8]

DVec3 vpp::NClamp ( const DVec3 x,
const DVec3 minVal,
const DVec3 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NClamp() [8/8]

DVec4 vpp::NClamp ( const DVec4 x,
const DVec4 minVal,
const DVec4 maxVal 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [1/8]

Float vpp::NMax ( const Float x,
const Float y 
)

Result is y if x < y, otherwise result is x.

If one operand is a NaN, the other operand is the result. If both operands are NaN, the result is a NaN.

◆ NMax() [2/8]

Vec2 vpp::NMax ( const Vec2 x,
const Vec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [3/8]

Vec3 vpp::NMax ( const Vec3 x,
const Vec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [4/8]

Vec4 vpp::NMax ( const Vec4 x,
const Vec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [5/8]

Double vpp::NMax ( const Double x,
const Double y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [6/8]

DVec2 vpp::NMax ( const DVec2 x,
const DVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [7/8]

DVec3 vpp::NMax ( const DVec3 x,
const DVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMax() [8/8]

DVec4 vpp::NMax ( const DVec4 x,
const DVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [1/8]

Float vpp::NMin ( const Float x,
const Float y 
)

Result is y if y < x, otherwise result is x.

If one operand is a NaN, the other operand is the result. If both operands are NaN, the result is a NaN.

◆ NMin() [2/8]

Vec2 vpp::NMin ( const Vec2 x,
const Vec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [3/8]

Vec3 vpp::NMin ( const Vec3 x,
const Vec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [4/8]

Vec4 vpp::NMin ( const Vec4 x,
const Vec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [5/8]

Double vpp::NMin ( const Double x,
const Double y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [6/8]

DVec2 vpp::NMin ( const DVec2 x,
const DVec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [7/8]

DVec3 vpp::NMin ( const DVec3 x,
const DVec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ NMin() [8/8]

DVec4 vpp::NMin ( const DVec4 x,
const DVec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [1/7]

Vec2 vpp::Normalize ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [2/7]

Vec3 vpp::Normalize ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [3/7]

Vec4 vpp::Normalize ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [4/7]

Double vpp::Normalize ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [5/7]

DVec2 vpp::Normalize ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [6/7]

DVec3 vpp::Normalize ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Normalize() [7/7]

DVec4 vpp::Normalize ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Od()

void vpp::Od ( )

Creates the closing clause of the loop construct.

Place in the shader code to create a loop construct. Always use with Do() .. While() clauses. Place Od() at the end of the looped block. All instructions between While() and Od() will be executed as long as the expression in While() evaluates to true.

See Do() documentation for more details.

◆ OuterProduct()

template<size_t COLS, size_t ROWS>
TRMatrix< Double, COLS, ROWS > vpp::OuterProduct ( const TRVector< Double, ROWS > &  lhs,
const TRVector< Double, COLS > &  rhs 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ PackDouble2x32()

Double vpp::PackDouble2x32 ( const UVec2 v)

Packs the components of v into a 64-bit value.

If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating-point value is unspecified. Otherwise, the bit-level representation of v is preserved.

The first vector component specifies the 32 least significant bits. The second component specifies the 32 most significant bits.

◆ PackHalf2x16()

UInt vpp::PackHalf2x16 ( const Vec2 v)

Converts the components of a two-component floating-point vector to the 16-bit float, then packs them into a 32-bit unsigned integer.

The first vector component specifies the 16 least-significant bits of the result. The second component specifies the 16 most-significant bits.

◆ PackSnorm2x16()

UInt vpp::PackSnorm2x16 ( const Vec2 v)

Converts each component of the signed normalized floating-point value v into 16-bit integer values and packs them into the result.

The conversion for component c of v to fixed point is done as follows:

Round ( Clamp ( c, -1, +1 ) * 32767.0 )

The first component of the vector will be written to the least significant bits of the output. The last component will be written to the most significant bits.

◆ PackSnorm4x8()

UInt vpp::PackSnorm4x8 ( const Vec4 v)

Converts each component of the signed normalized floating-point value v into 8-bit integer values and packs them into the result.

The conversion for component c of v to fixed point is done as follows:

Round ( Clamp ( c, -1, +1 ) * 127.0 )

The first component of the vector will be written to the least significant bits of the output. The last component will be written to the most significant bits.

◆ PackUnorm2x16()

UInt vpp::PackUnorm2x16 ( const Vec2 v)

Converts each component of the positive normalized floating-point value v into 16-bit integer values and packs them into the result.

The conversion for component c of v to fixed point is done as follows:

Round ( Clamp ( c, 0, +1 ) * 65535.0 )

The first component of the vector will be written to the least significant bits of the output. The last component will be written to the most significant bits.

◆ PackUnorm4x8()

UInt vpp::PackUnorm4x8 ( const Vec4 v)

Converts each component of the positive normalized floating-point value v into 8-bit integer values and packs them into the result.

The conversion for component c of v to fixed point is done as follows:

Round ( Clamp ( c, 0, +1 ) * 255.0 )

The first component of the vector will be written to the least significant bits of the output. The last component will be written to the most significant bits.

◆ Pow() [1/4]

Float vpp::Pow ( const Float x,
const Float y 
)

Computes x raised to the y power.

Result is undefined if x < 0. Result is undefined if x = 0 and y <= 0.

◆ Pow() [2/4]

Vec2 vpp::Pow ( const Vec2 x,
const Vec2 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Pow() [3/4]

Vec3 vpp::Pow ( const Vec3 x,
const Vec3 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Pow() [4/4]

Vec4 vpp::Pow ( const Vec4 x,
const Vec4 y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Radians() [1/3]

Vec2 vpp::Radians ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Radians() [2/3]

Vec3 vpp::Radians ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Radians() [3/3]

Vec4 vpp::Radians ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [1/8]

Float vpp::Reflect ( const Float i,
const Float n 
)

Computes reflected vector to the vector i.

For the incident vector i and surface orientation n, the result is the reflection direction:

i - 2 * Dot ( n, i ) * n

Vector n must already be normalized in order to achieve the desired result.

◆ Reflect() [2/8]

Vec2 vpp::Reflect ( const Vec2 i,
const Vec2 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [3/8]

Vec3 vpp::Reflect ( const Vec3 i,
const Vec3 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [4/8]

Vec4 vpp::Reflect ( const Vec4 i,
const Vec4 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [5/8]

Double vpp::Reflect ( const Double i,
const Double n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [6/8]

DVec2 vpp::Reflect ( const DVec2 i,
const DVec2 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [7/8]

DVec3 vpp::Reflect ( const DVec3 i,
const DVec3 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Reflect() [8/8]

DVec4 vpp::Reflect ( const DVec4 i,
const DVec4 n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [1/8]

Float vpp::Refract ( const Float i,
const Float n,
const Float eta 
)

Computes refracted vector to the vector i.

For the incident vector i and surface normal n, and the ratio of indices of refraction eta, the result is the refraction vector. The result is computed by:

k = 1.0 - eta * eta * ( 1.0 - Dot ( n, i ) * Dot ( n, i ) )

If k < 0 the result is 0, otherwise, the result is:

eta * i - ( eta * Dot ( n, i ) + Sqrt(k) ) * n

The input parameters for the incident vector i and the surface normal n must already be normalized to get the desired results.

◆ Refract() [2/8]

Vec2 vpp::Refract ( const Vec2 i,
const Vec2 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [3/8]

Vec3 vpp::Refract ( const Vec3 i,
const Vec3 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [4/8]

Vec4 vpp::Refract ( const Vec4 i,
const Vec4 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [5/8]

Double vpp::Refract ( const Double i,
const Double n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [6/8]

DVec2 vpp::Refract ( const DVec2 i,
const DVec2 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [7/8]

DVec3 vpp::Refract ( const DVec3 i,
const DVec3 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Refract() [8/8]

DVec4 vpp::Refract ( const DVec4 i,
const DVec4 n,
const Float eta 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ ReinterpretCast()

template<typename TargetT , typename SourceT >
TargetT vpp::ReinterpretCast ( const SourceT &  source)

Bit pattern type conversion function.

ReinterpretCast() works much like C++ reinterpret_cast operator. It can convert between scalars or vectors made from scalars of same size. This operator preserves bit pattern but not value. One of possible uses is to convert between floating-point and integer types, in order to utilise various bit tricks to speed up floating point approximations.

◆ Return()

void vpp::Return ( )

Immediately returns from the function.

Use when the erturn type is Void.

◆ Rof()

void vpp::Rof ( )

Creates the closing clause of the 'for' loop construct.

See For() documentation for more details.

◆ Round() [1/8]

Float vpp::Round ( const Float x)

Computes nearest whole number to x.

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that Round x is the same value as RoundEven x for all values of x.

◆ Round() [2/8]

Vec2 vpp::Round ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [3/8]

Vec3 vpp::Round ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [4/8]

Vec4 vpp::Round ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [5/8]

Double vpp::Round ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [6/8]

DVec2 vpp::Round ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [7/8]

DVec3 vpp::Round ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Round() [8/8]

DVec4 vpp::Round ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [1/8]

Float vpp::RoundEven ( const Float x)

Computes nearest whole number to x.

A fractional part of 0.5 will round toward the nearest even whole number.

◆ RoundEven() [2/8]

Vec2 vpp::RoundEven ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [3/8]

Vec3 vpp::RoundEven ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [4/8]

Vec4 vpp::RoundEven ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [5/8]

Double vpp::RoundEven ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [6/8]

DVec2 vpp::RoundEven ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [7/8]

DVec3 vpp::RoundEven ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ RoundEven() [8/8]

DVec4 vpp::RoundEven ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Select()

template<class CondT , class Arg1T , class Arg2T >
auto vpp::Select ( const CondT &  cond,
const Arg1T &  argIfTrue,
const Arg2T &  argIfFalse 
)

A conditional expression.

Since the operator ?: in C++ can not be overloaded, VPP offers a counterpart as a function.

Select() takes three arguments.

The first argument should be the condition to check. It must be one of two following cases:

  • a scalar expression which evaluates to Bool,
  • a vector expression which evaluates to BVec2, BVec3 or BVec4 and the vector size is the same as operand vector size.

The second and third argument can be any two expressions, but evaluating to common type. If the condition is true, the expression given as second argument will be the result. Otherwise, the third expression will be the result. It matches semantics of the ?: C++ operator.

In case if you specify a vector as the condition, you can select vector components individually. This feature does not exist in C++.

◆ Sign() [1/11]

IVec2 vpp::Sign ( const IVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [2/11]

IVec3 vpp::Sign ( const IVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [3/11]

IVec4 vpp::Sign ( const IVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [4/11]

Float vpp::Sign ( const Float x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [5/11]

Vec2 vpp::Sign ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [6/11]

Vec3 vpp::Sign ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [7/11]

Vec4 vpp::Sign ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [8/11]

Double vpp::Sign ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [9/11]

DVec2 vpp::Sign ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [10/11]

DVec3 vpp::Sign ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sign() [11/11]

DVec4 vpp::Sign ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sin() [1/3]

Vec2 vpp::Sin ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sin() [2/3]

Vec3 vpp::Sin ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sin() [3/3]

Vec4 vpp::Sin ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sinh() [1/3]

Vec2 vpp::Sinh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sinh() [2/3]

Vec3 vpp::Sinh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sinh() [3/3]

Vec4 vpp::Sinh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [1/8]

Float vpp::SmoothStep ( const Float edge0,
const Float edge1,
const Float x 
)

Result is 0 if x <= edge0, 1 if x >= edge1, or smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1.

This is equivalent to: t*t*(3 - 2*t), where t = Clamp ( (x-edge0) / (edge1-edge0), 0, 1 )

Result is undefined if edge0 >= edge1.

◆ SmoothStep() [2/8]

Vec2 vpp::SmoothStep ( const Vec2 edge0,
const Vec2 edge1,
const Vec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [3/8]

Vec3 vpp::SmoothStep ( const Vec3 edge0,
const Vec3 edge1,
const Vec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [4/8]

Vec4 vpp::SmoothStep ( const Vec4 edge0,
const Vec4 edge1,
const Vec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [5/8]

Double vpp::SmoothStep ( const Double edge0,
const Double edge1,
const Double x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [6/8]

DVec2 vpp::SmoothStep ( const DVec2 edge0,
const DVec2 edge1,
const DVec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [7/8]

DVec3 vpp::SmoothStep ( const DVec3 edge0,
const DVec3 edge1,
const DVec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SmoothStep() [8/8]

DVec4 vpp::SmoothStep ( const DVec4 edge0,
const DVec4 edge1,
const DVec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [1/8]

Float vpp::Sqrt ( const Float x)

Computes the square root of x.

Result is undefined if x < 0.

◆ Sqrt() [2/8]

Vec2 vpp::Sqrt ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [3/8]

Vec3 vpp::Sqrt ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [4/8]

Vec4 vpp::Sqrt ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [5/8]

Double vpp::Sqrt ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [6/8]

DVec2 vpp::Sqrt ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [7/8]

DVec3 vpp::Sqrt ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Sqrt() [8/8]

DVec4 vpp::Sqrt ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ StaticCast()

template<typename TargetT , typename SourceT >
TargetT vpp::StaticCast ( const SourceT &  source)

General type conversion function.

StaticCast() is the analog of C++ static_cast operator. In VPP it can (and must) be used to convert between simple types. It can handle scalar types as well as vector and matrix types of same sizes. Some examples:

Int vint = ...;
UInt vuint = ...;
Float vfloat = ...;
Int64 vint64 = ...;
UInt64 vuint64 = ...;
IVec4 vivec4 = ...;
Vec4 vfvec4 = ...;
Int vint2 = StaticCast< Int >( vuint );
Int vint3 = StaticCast< Int >( vfloat );
Int vint4 = StaticCast< Int >( vint64 );
Int vint5 = StaticCast< Int >( vuint64 );
UInt vuint2 = StaticCast< UInt >( vint );
Float vfloat2 = StaticCast< Float >( vuint );
Int64 vint642 = StaticCast< Int64 >( vuint );
Vec4 vfvec42 = StaticCast< Vec4 >( vivec4 );
// ...

It generally works in similar fashion as in C++. However, in VPP usage of this operator is much more frequent because VPP deliberately does not implement automatic type conversions of C++. This is to minimize code complexity, avoid possible compiler problems and cryptic error messages as well as reduce confusion and "surprise" to the user. Generally VPP will not convert different types (even if they only differ in signedness) unless you ask it to do so.

For scalar types (but not vectors) VPP offers a shorthand on the form of additional constructor for a scalar type. For example:

Int vint2 = Int ( vuint );
Int vint3 = Int ( vfloat );
Int vint4 = Int ( vint64 );
Int vint5 = Int ( vuint64 );
UInt vuint2 = UInt ( vint );
Float vfloat2 = Float ( vuint );
Int64 vint642 = Int64 ( vuint );
// ...

These constructors are equivalent to calling StaticCast() on their argument. They are declared as explicit.

◆ Step() [1/7]

Vec2 vpp::Step ( const Vec2 edge,
const Vec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [2/7]

Vec3 vpp::Step ( const Vec3 edge,
const Vec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [3/7]

Vec4 vpp::Step ( const Vec4 edge,
const Vec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [4/7]

Double vpp::Step ( const Double edge,
const Double x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [5/7]

DVec2 vpp::Step ( const DVec2 edge,
const DVec2 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [6/7]

DVec3 vpp::Step ( const DVec3 edge,
const DVec3 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Step() [7/7]

DVec4 vpp::Step ( const DVec4 edge,
const DVec4 x 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SubpassLoad() [1/4]

template<class ImageT >
auto vpp::SubpassLoad ( const ImageT &  image)

Reads a pixel from input attachment.

Call only inside fragment shaders.

As the argument, provide an object of inAttachment type.

This function returns 4-element vector of type compatible with image format. For example, Vec4 or IVec4. For images where the format uses less than 4 components, unused components will be equal to 0.

The function reads a pixel from currently processed location. It is implicitly maintained by the fragment shader.

◆ SubpassLoad() [2/4]

template<class ImageT >
auto vpp::SubpassLoad ( const ImageT &  image,
const IVec2 coords 
)

Reads a pixel from input attachment, with offset.

Call only inside fragment shaders.

As the first argument, provide an object of inAttachment type.

As the second argument, provide a vector of coordinates which will be added to the currently processed location, in order to compute source pixel location.

This function returns 4-element vector of type compatible with image format. For example, Vec4 or IVec4. For images where the format uses less than 4 components, unused components will be equal to 0.

◆ SubpassLoad() [3/4]

template<class ImageT >
auto vpp::SubpassLoad ( const ImageT &  image,
const Int nSample 
)

Reads a sample from multisampled input attachment.

Call only inside fragment shaders.

As the first argument, provide an object of inAttachment type.

As the second argument, provide an index of the sample.

This function returns 4-element vector of type compatible with image format. For example, Vec4 or IVec4. For images where the format uses less than 4 components, unused components will be equal to 0.

◆ SubpassLoad() [4/4]

template<class ImageT >
auto vpp::SubpassLoad ( const ImageT &  image,
const IVec2 coords,
const Int nSample 
)

Reads a sample from multisampled input attachment, with offset.

Call only inside fragment shaders.

As the first argument, provide an object of inAttachment type.

As the second argument, provide a vector of coordinates which will be added to the currently processed location, in order to compute source pixel location.

As the third argument, provide an index of the sample.

This function returns 4-element vector of type compatible with image format. For example, Vec4 or IVec4. For images where the format uses less than 4 components, unused components will be equal to 0.

◆ Switch()

void vpp::Switch ( Int  expr)

Creates the switch construct.

Place in the shader code to create a switch ... case construct. Provide switch expression as the argument. Always use with Case() and EndSwitch(). Optionally use also Default() and Break().

The semantics of the Switch() instruction is identical to the C++ counterpart. Particluarly, the fall-through behavior is the same, so you need Break() clause to break control flow just as in C++. Also Default() works the same as in C++.

◆ Tan() [1/3]

Vec2 vpp::Tan ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Tan() [2/3]

Vec3 vpp::Tan ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Tan() [3/3]

Vec4 vpp::Tan ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Tanh() [1/3]

Vec2 vpp::Tanh ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Tanh() [2/3]

Vec3 vpp::Tanh ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Tanh() [3/3]

Vec4 vpp::Tanh ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ TexelFetch() [1/2]

template<class TextureT , class CoordsT >
auto vpp::TexelFetch ( const TextureT &  texture,
const CoordsT &  coords 
)

Reads a texel from a texture without sampling.

This function allows to read raw texel, without any sampling or filtering. It is a counterpart of ImageLoad(), but working on textures instead of storage images.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The source image must not be a cube map.

◆ TexelFetch() [2/2]

template<class TextureT , class CoordsT >
auto vpp::TexelFetch ( const TextureT &  texture,
const CoordsT &  coords,
const Int nSample 
)

Reads a texel from multisampled texture without sampling.

This function allows to read raw texel, without any sampling or filtering. It is a counterpart of ImageLoad(), but working on textures instead of storage images.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, specify the sample index.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The source image must not be a cube map.

◆ TexelFetchLod()

template<class TextureT , class CoordsT >
auto vpp::TexelFetchLod ( const TextureT &  texture,
const CoordsT &  coords,
const Int nLevel 
)

Reads a texel from a specified MIP level of texture without sampling.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, specify the MIP level.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The source image must not be a cube map nor a multisampled image.

◆ TexelFetchLodOffset()

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TexelFetchLodOffset ( const TextureT &  texture,
const CoordsT &  coords,
const Int nLevel,
const OffsetT &  offset 
)

Reads a texel from a specified MIP level (with coordinate offset) of texture without sampling.

This function allows to read raw texel, without any sampling or filtering. It is a counterpart of ImageLoad(), but working on textures instead of storage images.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, specify the MIP level.

As the fourth argument, provide additional offset which will be added to coords coordinate vector. Note that the offset vector does not have additional coordinate for the array level.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The source image must not be a cube map.

◆ TexelFetchOffset()

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TexelFetchOffset ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset 
)

Reads a texel (with coordinate offset) from a texture without sampling.

This function allows to read raw texel, without any sampling or filtering. It is a counterpart of ImageLoad(), but working on textures instead of storage images.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, provide a vector of integer type and the number of components appropriate for the image dimensionality (e.g. IVec2 for 2D image, Int for a buffer, IVec3 for arrayed 2D image, etc.). Note that arrayed images require extra coordinate to specify the array level.

As the third argument, provide additional offset which will be added to coords coordinate vector. Note that the offset vector does not have additional coordinate for the array level.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The source image must not be a cube map.

◆ Texture() [1/5]

template<class TextureT , class CoordsT >
auto vpp::Texture ( const TextureT &  texture,
const CoordsT &  coords 
)

Samples a texel from a texture.

This function allows to read a texel with sampling and filtering. It is a primary method to read from textures.

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

As the second argument, provide a vector of floating point type and the number of components appropriate for the image dimensionality, taking into account whether the image is arrayed and/or cube map.

Arrayed image always adds single coordinate at the end. Since entire vector is floating point, you must convert an integer array index to floating point.

Cube maps are very specific case. They are essentially layered 2D textures treated like they were 3D textures. A cube map has 6 layers corresponding to different faces of a cube. Imagine that we are positioned in the middle of the cube (this is an origin of our coordinate system) and we have a 3D vector of (s, r, t) coordinates which starts at origin and points away from it in some direction. A line along this direction will intersect one of cube faces at some point and we take our texel color from this point (with sampling and filtering). Therefore for cube maps, you need to specify 3D vector to Texture function, and for arrayed cube maps - 4D vector.

The function returns 4-element vector of type determined by the image format. It can be either floating point type (Vec4) or integer type (IVec4, UVec4).

The function may be only used within fragment shaders.

◆ Texture() [2/5]

template<class TextureT , class CoordsT >
auto vpp::Texture ( const TextureT &  texture,
const CoordsT &  coords,
const Float bias 
)

Samples a texel from a texture with LOD bias.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify a bias to be added to the parameter affecting selection of MIP levels from which the texel will be taken.

The image must not be multisampled.

Remaining details are identical as in the base Texture function.

◆ Texture() [3/5]

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::Texture ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset 
)

Samples a texel from a texture with coordinate offset.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify an offset to be added to the coordinates from where the texel will be sampled.

The image must not be a cube map.

Remaining details are identical as in the base Texture function.

◆ Texture() [4/5]

template<class TextureT , class CoordsT , class GradT >
auto vpp::Texture ( const TextureT &  texture,
const CoordsT &  coords,
const GradT &  gradX,
const GradT &  gradY 
)

Samples a texel from a texture with LOD gradient.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify a gradient which affects selection of MIP levels from which the texel will be taken.

This is more advanced function. See section 15.6.2 of the Vulkan docs for more information.

The image must not be multisampled.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base Texture function.

◆ Texture() [5/5]

template<class TextureT , class CoordsT , class OffsetT , class GradT >
auto vpp::Texture ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset,
const GradT &  gradX,
const GradT &  gradY 
)

Samples a texel from a texture with coordinate offset and LOD gradient.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify both a coordinate offset and a gradient which affects selection of MIP levels from which the texel will be taken.

This is more advanced function. See section 15.6.2 of the Vulkan docs for more information.

The image must not be multisampled.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base Texture function.

◆ TextureDref() [1/4]

template<class TextureT , class Arg1T , class Arg2T >
auto vpp::TextureDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureDref() [2/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureDref() [3/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto vpp::TextureDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureDref() [4/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T >
auto vpp::TextureDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4,
const Arg5T &  arg5 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureGather() [1/2]

template<class TextureT , class Arg1T , class Arg2T >
auto vpp::TextureGather ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureGather() [2/2]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureGather ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureGatherDref()

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureGatherDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureLod() [1/2]

template<class TextureT , class CoordsT >
auto vpp::TextureLod ( const TextureT &  texture,
const CoordsT &  coords,
const Float lod 
)

Samples a texel from a texture with explicit MIP levels selection.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify a parameter which selects the MIP levels in more direct way, as described in section 15.6.7 of the official Vulkan spec.

The image must not be multisampled.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base Texture function.

◆ TextureLod() [2/2]

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TextureLod ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset,
const Float lod 
)

Samples a texel from a texture with coordinate offset and explicit MIP levels selection.

This function allows to read a texel with sampling and filtering. It differs from the base version in that you specify a coordinate offset as well as a parameter which selects the MIP levels in more direct way, as described in section 15.6.7 of the official Vulkan spec.

The image must not be multisampled.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base Texture function.

◆ TextureLodDref() [1/2]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureLodDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureLodDref() [2/2]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto vpp::TextureLodDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureLodProj() [1/2]

template<class TextureT , class CoordsT >
auto vpp::TextureLodProj ( const TextureT &  texture,
const CoordsT &  coords,
const Float lod 
)

Samples a texel from a texture with perspective division and explicit MIP levels selection.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies perspective division and MIP levels selection.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base TextureProj function.

◆ TextureLodProj() [2/2]

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TextureLodProj ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset,
const Float lod 
)

Samples a texel from a texture with perspective division, coordinate offset and explicit MIP levels selection.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies all of these operations: perspective division, coordinate offset and LOD level selection. The offset is being applied after the division. See the descriptions of respective Texture variants for more detail.

The function may be used also in other shaders than fragment.

Remaining details are identical as in the base TextureProj function.

◆ TextureLodProjDref() [1/2]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureLodProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureLodProjDref() [2/2]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto vpp::TextureLodProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureProj() [1/6]

template<class TextureT , class CoordsT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords 
)

Samples a texel from a texture with perspective division.

This function allows to read a texel with sampling and filtering. It differs from the base version in that the coordinate vector has one more component at the end. Remaining components will be divided by this extra component, just as in the prespective division.

The image must not be multisampled, arrayed nor cube map.

The image sampler must be a normalized sampler.

Remaining details are identical as in the base Texture function.

◆ TextureProj() [2/6]

template<class TextureT , class CoordsT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords,
const Float bias 
)

Samples a texel from a texture with perspective division and LOD bias.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies both perspective division and LOD bias. See the descriptions of respective Texture variants for more detail.

Remaining details are identical as in the base TextureProj function.

◆ TextureProj() [3/6]

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset 
)

Samples a texel from a texture with perspective division and coordinate offset.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies both perspective division and coordinate offset. The offset is being applied after the division. See the descriptions of respective Texture variants for more detail.

Remaining details are identical as in the base TextureProj function.

◆ TextureProj() [4/6]

template<class TextureT , class CoordsT , class OffsetT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset,
const Float bias 
)

Samples a texel from a texture with perspective division, coordinate offset and LOD bias.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies all of these operations: perspective division, coordinate offset and LOD bias. The offset is being applied after the division. See the descriptions of respective Texture variants for more detail.

Remaining details are identical as in the base TextureProj function.

◆ TextureProj() [5/6]

template<class TextureT , class CoordsT , class GradT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords,
const GradT &  gradX,
const GradT &  gradY 
)

Samples a texel from a texture with perspective division, and LOD gradient.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies both perspective and LOD gradient. See the descriptions of respective Texture variants for more detail.

Remaining details are identical as in the base TextureProj function.

◆ TextureProj() [6/6]

template<class TextureT , class CoordsT , class OffsetT , class GradT >
auto vpp::TextureProj ( const TextureT &  texture,
const CoordsT &  coords,
const OffsetT &  offset,
const GradT &  gradX,
const GradT &  gradY 
)

Samples a texel from a texture with perspective division, coordinate offset and LOD gradient.

This function allows to read a texel with sampling and filtering. It differs from the base version in that it applies all of these operations: perspective division, coordinate offset and LOD gradient. The offset is being applied after the division. See the descriptions of respective Texture variants for more detail.

Remaining details are identical as in the base TextureProj function.

◆ TextureProjDref() [1/4]

template<class TextureT , class Arg1T , class Arg2T >
auto vpp::TextureProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureProjDref() [2/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T >
auto vpp::TextureProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureProjDref() [3/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T >
auto vpp::TextureProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureProjDref() [4/4]

template<class TextureT , class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T >
auto vpp::TextureProjDref ( const TextureT &  texture,
const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4,
const Arg5T &  arg5 
)

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

◆ TextureQueryLod()

template<class ImageT , class CoordsT >
Vec2 vpp::TextureQueryLod ( const ImageT &  image,
const CoordsT &  coords 
)

Retrieves the mipmap level and the level of detail for a hypothetical sampling of image at coordinate using an implicit level of detail.

As the first argument, you may provide an object of the following types: inSampledTexture, inConstSampledTexture.

As the second argument, specify a vector of floating point values of the size appropriate for image dimensionality (e.g. Vec2 for 2D image).

This function may be called only in fragment shaders.

◆ TextureSize()

template<class ImageT , class LodT >
auto vpp::TextureSize ( const ImageT &  image,
const Int lod 
)

Retrieves the extent of specified MIP image level.

As the first argument, you may provide an object of the following types: inTexture, inSampledTexture, inConstSampledTexture, inTextureBuffer.

As the second argument, specify the MIP level index.

This function returns either Int or integer vector of size appropriate for the number of dimensions in the image (e.g. IVec2 for 2D image).

◆ Trunc() [1/7]

Vec2 vpp::Trunc ( const Vec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [2/7]

Vec3 vpp::Trunc ( const Vec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [3/7]

Vec4 vpp::Trunc ( const Vec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [4/7]

Double vpp::Trunc ( const Double x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [5/7]

DVec2 vpp::Trunc ( const DVec2 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [6/7]

DVec3 vpp::Trunc ( const DVec3 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Trunc() [7/7]

DVec4 vpp::Trunc ( const DVec4 x)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ UnpackDouble2x32()

UVec2 vpp::UnpackDouble2x32 ( const Double value)

Computes the two-component unsigned integer vector representation of v. The bit-level representation of v is preserved.

The first component of the vector contains the 32 least significant bits of the double. The second component consists of the 32 most significant bits.

◆ UnpackHalf2x16()

Vec2 vpp::UnpackHalf2x16 ( const UInt v)

Unpacks a 32-bit unsigned integer into a pair of 16-bit values, interpreted as 16-bit floating-point numbers, and converts them to 32-bit floating-point values.

Subnormal numbers are either preserved or flushed to zero, consistently within an implemenation.

The first component of the vector is obtained from the 16 least-significant bits of v. The second component is obtained from the 16 most-significant bits of v.

◆ UnpackSnorm2x16()

Vec2 vpp::UnpackSnorm2x16 ( const UInt p)

Unpacks a single 32-bit unsigned integer p into a pair of 16-bit signed integers and converts them to normalized floating-point values.

The conversion for unpacked fixed-point value f to floating point is done as follows:

Clamp ( f / 32767.0, -1, +1 )

The first component of the result will be extracted from the least significant bits of the input. The last component will be extracted from the most significant bits.

◆ UnpackSnorm4x8()

Vec4 vpp::UnpackSnorm4x8 ( const UInt p)

Unpacks a single 32-bit unsigned integer p into four 8-bit signed integers and converts them to normalized floating-point values.

The conversion for unpacked fixed-point value f to floating point is done as follows:

Clamp ( f / 127.0, -1, +1 )

The first component of the result will be extracted from the least significant bits of the input. The last component will be extracted from the most significant bits.

◆ UnpackUnorm2x16()

Vec2 vpp::UnpackUnorm2x16 ( const UInt p)

Unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers. and converts them to normalized floating-point values.

The conversion for unpacked fixed-point value f to floating point is done as follows:

f / 65535.0

The first component of the result will be extracted from the least significant bits of the input. The last component will be extracted from the most significant bits.

◆ UnpackUnorm4x8()

Vec4 vpp::UnpackUnorm4x8 ( const UInt p)

Unpacks a single 32-bit unsigned integer p into four 8-bit unsigned integers and converts them to normalized floating-point values.

The conversion for unpacked fixed-point value f to floating point is done as follows:

f / 255.0

The first component of the result will be extracted from the least significant bits of the input. The last component will be extracted from the most significant bits.

◆ UseImage()

template<class ImageT >
void vpp::UseImage ( const ImageT &  img)

Declares image binding point as used in the shader.

In general, image binding points do not require to be declared before accessing them. There is one exception, though: if the first access to the image binding point is inside conditional block, then it must be declared earlier in the code to prevent SPIR-V error. The error is caused by the fact that image can't be introduced conditionally.

An example:

void MyPipeline :: fComputeShader ( vpp::ComputeShader* pShader )
{
using namespace vpp;
// ...
UseImage ( m_myImage ); // <---- add this to declare image unconditionally
If ( ... condition ... );
ImageStore ( m_myImage, IVec2 { x, y }, value ); // first access is conditional
Fi();
// ...
}

◆ While()

void vpp::While ( Bool  v)

Creates the while clause of the loop construct.

Place in the shader code to create a loop construct. Always use with Do() clause. At the end of the looped block, place the closing clause Od(). All instructions between While() and Od() will be executed as long as the expression in While() evaluates to true.

See Do() documentation for more details.