omni::avreality::rain::PuddleBaker
Defined in omni/avreality/rain/PuddleBaker.h
Functions
PuddleBaker()=delete: Creates a new PuddleBaker .
-
class PuddleBaker
Bake puddles into dynamic textures.
Public Functions
-
PuddleBaker() = delete
Creates a new PuddleBaker.
Public Static Functions
-
static inline void bake(std::string textureName, carb::Uint2 textureDims, carb::Float2 regionMin, carb::Float2 regionMax, gsl::span<const carb::Float2> puddlesPositions, gsl::span<const float> puddlesRadii, gsl::span<const float> puddlesDepths)
Bake puddles to the dynamic texture
textureNameWarning
The size of puddlesPositions, puddlesRadii and puddlesDepths must be the same.
- Parameters
textureName – The name of the dynamic texture to bake into.
textureDims – The dimensions of the generated texture.
regionMin – The 2D world space minimum of the region the texture maps onto.
regionMax – The 2D world space maximum of the region the texture maps onto.
puddlesPositions – A pointer to the 2D positions of the puddles.
puddlesRadii – A pointer to the radii of the puddles.
puddlesDepths – A pointer to the depths of the puddles.
-
static inline void bake(std::string textureName, carb::Float2 regionMin, carb::Float2 regionMax, gsl::span<carb::Float2> puddlesPositions, gsl::span<float> puddlesRadii, gsl::span<float> puddlesDepths)
Bake puddles to the dynamic texture
textureNameNote
Generated texture size defaults to 1024x1024.
Warning
The size of puddlesPositions, puddlesRadii and puddlesDepths must be the same.
- Parameters
textureName – The name of the dynamic texture to bake into.
regionMin – The 2D world space minimum of the region the texture maps onto.
regionMax – The 2D world space maximum of the region the texture maps onto.
puddlesPositions – A pointer to the 2D positions of the puddles.
puddlesRadii – A pointer to the radii of the puddles.
puddlesDepths – A pointer to the depths of the puddles.
-
static inline void assignShadersAccumulationMapTextureNames(gsl::span<std::tuple<const pxr::SdfPath, const std::string>> shaderPathsAndTextureNames, omni::usd::UsdContext *usdContext = nullptr)
Assign dynamic textures to the water accumulation entry in the provided shader list.
- Parameters
usdContext – The Usd context holding the prims to update.
shaderPathsAndTextureNames – The shaders to assign the dynamic textures to, provided as a list of tuple of shader path and associated texture name.
-
PuddleBaker() = delete