Base GPU Cloud Generator

class BaseGpuCloudGenerator

Base class for generating cloud volumes on the GPU.

Public Functions

inline bool CanPerformGPULighting() const

Return true if the derived class can relight clouds using the GPU.

int GetDensityGridsize(const int *grid)

Get the size, in floats, needed to allocate a texture of the size specified in grid[3]. This depends on what float renderbuffer formats are supported.

platform::crossplatform::Texture *Make3DNoiseTexture(platform::crossplatform::DeviceContext &deviceContext, int noise_size, const float *noise_src_ptr, int generation_number)

Create an API-specific noise texture, and return its pointer/identifier etc. as a void pointer.

void FillDensityGrid(platform::crossplatform::DeviceContext &deviceContext, int index, const GpuCloudsParameters &params, int start_texel, int texels, platform::crossplatform::Texture *finalTexture, CloudClass cloudClass)

Fill a 3D grid with floating point cloud densities, and return an API-specific identifier to the texture that it’s stored in. We pass the start texel and the number of texels to fill, which should both be a whole multiple of grid[0]

inline float GetOpticalPathLength(int, const float*, const float*, const float*)

For onscreen debug.

struct GpuCloudsParameters