[3255] | 1 | #pragma once
|
---|
| 2 | #include "RenderingRun.h"
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | @brief Base abstract class __declspec( dllexport ) that defines a rendering process of a light volume texture.
|
---|
| 6 |
|
---|
| 7 | Light volumes are used when self shadowing of particle systems should be simulated.
|
---|
| 8 | Each layer of the volume represents the amount of transmitted light. The current implementation uses four grayscale layers,
|
---|
| 9 | and places these layers to the four channel of the light volume texture.
|
---|
| 10 | */
|
---|
| 11 | class __declspec( dllexport ) LightVolumeRenderingRun : virtual public RenderingRun
|
---|
| 12 | {
|
---|
| 13 | public:
|
---|
| 14 | /**
|
---|
| 15 | @brief Constructor.
|
---|
| 16 |
|
---|
| 17 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
| 18 | @param updateInterval update frequency
|
---|
| 19 | @param resolution the resolution of the light volume texture
|
---|
| 20 | @param textureDepth the number of layers (should be set to 1)
|
---|
| 21 | */
|
---|
| 22 | LightVolumeRenderingRun(unsigned long startFrame,
|
---|
| 23 | unsigned long updateInterval,
|
---|
| 24 | unsigned int resolution,
|
---|
| 25 | unsigned int textureDepth)
|
---|
| 26 | :RenderingRun(startFrame, updateInterval)
|
---|
| 27 | {
|
---|
| 28 | this->resolution = resolution;
|
---|
| 29 | this->textureDepth = textureDepth;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | virtual ~LightVolumeRenderingRun(){}
|
---|
| 33 |
|
---|
| 34 | protected:
|
---|
| 35 | //inherited
|
---|
| 36 | virtual void updateFrame(unsigned long frameNum) = 0;
|
---|
| 37 | /**
|
---|
| 38 | @brief Creates a light volume map.
|
---|
| 39 | */
|
---|
| 40 | virtual inline void createLightVolumeMap() = 0;
|
---|
| 41 | /**
|
---|
| 42 | @brief the resolution of the light volume map
|
---|
| 43 | */
|
---|
| 44 | unsigned int resolution;
|
---|
| 45 | /**
|
---|
| 46 | @brief number of layers (should be 1)
|
---|
| 47 | */
|
---|
| 48 | unsigned int textureDepth;
|
---|
| 49 |
|
---|
| 50 | };
|
---|