2017-03-01 02:33:53 +00:00
|
|
|
#ifndef __GL_SHADOWMAPSHADER_H
|
|
|
|
#define __GL_SHADOWMAPSHADER_H
|
|
|
|
|
2018-06-13 20:08:55 +00:00
|
|
|
#include "hwrenderer/postprocessing/hw_shaderprogram.h"
|
2017-03-01 02:33:53 +00:00
|
|
|
|
|
|
|
class FShadowMapShader
|
|
|
|
{
|
|
|
|
public:
|
2018-06-13 18:30:51 +00:00
|
|
|
void Bind(IRenderQueue *q);
|
2017-03-01 02:33:53 +00:00
|
|
|
|
2018-06-11 19:42:09 +00:00
|
|
|
struct UniformBlock
|
|
|
|
{
|
|
|
|
float ShadowmapQuality;
|
|
|
|
float Padding0, Padding1, Padding2;
|
|
|
|
|
|
|
|
static std::vector<UniformFieldDesc> Desc()
|
|
|
|
{
|
|
|
|
return
|
|
|
|
{
|
|
|
|
{ "ShadowmapQuality", UniformType::Float, offsetof(UniformBlock, ShadowmapQuality) },
|
|
|
|
{ "Padding0", UniformType::Float, offsetof(UniformBlock, Padding0) },
|
|
|
|
{ "Padding1", UniformType::Float, offsetof(UniformBlock, Padding1) },
|
|
|
|
{ "Padding2", UniformType::Float, offsetof(UniformBlock, Padding2) },
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-06-12 19:43:35 +00:00
|
|
|
ShaderUniforms<UniformBlock, POSTPROCESS_BINDINGPOINT> Uniforms;
|
2017-06-03 22:44:49 +00:00
|
|
|
|
2017-03-01 02:33:53 +00:00
|
|
|
private:
|
2018-06-13 20:08:55 +00:00
|
|
|
std::unique_ptr<IShaderProgram> mShader;
|
2017-03-01 02:33:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|