Base GPU Cloud Generator

class simul::clouds::BaseGpuCloudGenerator

Base class for generating cloud volumes on the GPU.

Public Functions

inline virtual bool CanPerformGPULighting() const

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

virtual 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.

virtual crossplatform::Texture *Make3DNoiseTexture(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.

virtual void FillDensityGrid(crossplatform::DeviceContext &deviceContext, int index, const GpuCloudsParameters &params, int start_texel, int texels, 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]

void RenderSimulationTextures(crossplatform::GraphicsDeviceContext &context, int x0, int y0, int width, int height)

For onscreen debug.

struct GpuCloudsParameters