|
virtual bool | Create (const std::string &shaderSource, const std::string &shaderPath, ShaderParameterMap shaderParameters, IShaderSampler *sampler, ShaderLutVec luts, float2 viewPortSize, unsigned frameCountMod=0)=0 |
| Construct the vidoe shader instance. More...
|
|
virtual void | Render (IShaderTexture *source, IShaderTexture *target)=0 |
| Renders the video shader to the target texture. More...
|
|
virtual void | SetSizes (const float2 &prevSize, const float2 &nextSize)=0 |
| Sets the input and output sizes in pixels. More...
|
|
virtual bool | CreateVertexBuffer (unsigned vertCount, unsigned vertSize)=0 |
| Construct the vertex buffer that will be used to render the shader. More...
|
|
virtual bool | CreateInputBuffer ()=0 |
| Creates the buffer that will be used to send "input" (as per the spec) data to the shader. More...
|
|
virtual void | PrepareParameters (CPoint dest[4], bool isLastPass, uint64_t frameCount)=0 |
| Called before rendering. Updates any internal state needed to ensure that correct data is passed to the shader when rendering. More...
|
|
virtual void | UpdateMVP ()=0 |
| Updates the model view projection matrix. Should usually only be called when the viewport/window size changes.
|
|
◆ Create()
virtual bool KODI::SHADER::IShader::Create |
( |
const std::string & |
shaderSource, |
|
|
const std::string & |
shaderPath, |
|
|
ShaderParameterMap |
shaderParameters, |
|
|
IShaderSampler * |
sampler, |
|
|
ShaderLutVec |
luts, |
|
|
float2 |
viewPortSize, |
|
|
unsigned |
frameCountMod = 0 |
|
) |
| |
|
pure virtual |
Construct the vidoe shader instance.
- Parameters
-
shaderSource | Source code of the shader (both vertex and pixel/fragment) |
shaderPath | Full path to the shader file |
shaderParameters | Struct with all parameters pertaining to the shader |
sampler | Pointer to the sampler that the will be used when sampling textures |
luts | Look-up textures pertaining to shader |
viewPortSize | Size of the window/viewport |
frameCountMod | Modulo that must be applied to the frame count before sendign it to the shader |
- Returns
- False if creating the shader failed, true otherwise.
Implemented in KODI::SHADER::CShaderGL, and KODI::SHADER::CShaderDX.
◆ CreateInputBuffer()
virtual bool KODI::SHADER::IShader::CreateInputBuffer |
( |
| ) |
|
|
pure virtual |
◆ CreateVertexBuffer()
virtual bool KODI::SHADER::IShader::CreateVertexBuffer |
( |
unsigned |
vertCount, |
|
|
unsigned |
vertSize |
|
) |
| |
|
pure virtual |
Construct the vertex buffer that will be used to render the shader.
- Parameters
-
vertCount | Number of vertices to construct. Commonly 4, for rectangular screens. |
vertSize | Size of each vertex's data in bytes |
- Returns
- False if creating the vertex buffer failed, true otherwise.
Implemented in KODI::SHADER::CShaderDX, and KODI::SHADER::CShaderGL.
◆ PrepareParameters()
virtual void KODI::SHADER::IShader::PrepareParameters |
( |
CPoint |
dest[4], |
|
|
bool |
isLastPass, |
|
|
uint64_t |
frameCount |
|
) |
| |
|
pure virtual |
Called before rendering. Updates any internal state needed to ensure that correct data is passed to the shader when rendering.
- Parameters
-
dest | Coordinates of the 4 corners of the output viewport/window |
isLastPass | True if the current shader is last one in the pipeline // TODO: this could be a member |
frameCount | Number of frames that have passed |
Implemented in KODI::SHADER::CShaderGL, and KODI::SHADER::CShaderDX.
◆ Render()
◆ SetSizes()
virtual void KODI::SHADER::IShader::SetSizes |
( |
const float2 & |
prevSize, |
|
|
const float2 & |
nextSize |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file: