![]() |
Mako 9.1.0 API
MakoCore SDK API Documentation
|
As per CCustomSpotPostProcessSpec, but where the inputs are provided as textures instead of regular sub-pass inputs. More...
#include <jawsmako/apexcustompostprocess.h>
Public Member Functions | |
| CCustomSpotTexturePostProcessSpec () | |
| ePostProcessType | getType () const override |
| Get the type of post processing this spec represents. | |
| Public Member Functions inherited from IRCObject | |
| virtual void | addRef () const =0 |
| Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
| virtual bool | decRef () const =0 |
| Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
| virtual int32 | getRefCount () const =0 |
| Retrieve the current reference count of the actual object pointed to. | |
Static Public Member Functions | |
| static JAWSMAKO_API CCustomSpotTexturePostProcessSpecPtr | create (const CShaderParamsVect &_params, uint32 _extend) |
| Create a custom spot post process. Please see the class description for context. | |
| Static Public Member Functions inherited from JawsMako::CCustomSpotPostProcessSpec | |
| static JAWSMAKO_API CCustomSpotPostProcessSpecPtr | create (const CShaderParamsVect &_params) |
| Create a custom spot post process. Please see the class description for context. | |
Public Attributes | |
| uint32 | extend |
| Public Attributes inherited from JawsMako::CCustomSpotPostProcessSpec | |
| CShaderParamsVect | params |
Additional Inherited Members | |
| Public Types inherited from JawsMako::IPostProcessSpec | |
| enum | ePostProcessType { ePPTColorConversion , ePPTToneCurves , ePPTSpotMerge , ePPTInkLimit , ePPTHalftone , ePPTCustomColor , ePPTCustomColorTexture , ePPTCustomSpot , ePPTCustomSpotTexture , ePPTCustomSpotMerge } |
| The possible types of post processing operations. More... | |
| typedef enum JawsMako::IPostProcessSpec::ePostProcessType | ePostProcessType |
| Protected Member Functions inherited from IRCObject | |
| virtual | ~IRCObject () |
| Virtual destructor. | |
As per CCustomSpotPostProcessSpec, but where the inputs are provided as textures instead of regular sub-pass inputs.
A limitation of CCustomSpotPostProcessSpec is that the provided shader is only able to read inputs (via subpassLoad()) for the same pixel as the output being produced.
Some complex operations, such as blurs, sharpening, or special dithering methods, require access to pixels surrounding the output pixel.
In order to allow this use, the inputs are provided to the shader as textures. This includes color components, alpha (if requested), or object map (if requested). The layout of inputs is otherwise the same. Pixels may be requested using texelFetch().
This will generally require more GPU work than #CCustomColorTextureProcessSpec and subpassLoad().
Note that if an object map is in use, the sampler must be declared as usampler2D. For example:
layout (binding = 3) uniform usampler2D objectMapInput;
As noted in CCustomColorPostProcessSpec, Apex may break a render up into a series of tiles. In order to allow the shader to access data in surrounding regions, Apex can be requested to extend the tile in all directions to allow access. When creating this post process, provide the maximum extent required as the extend variable. Note that this should be limited to the maximum required, and is currently restricted to 64 pixels. If more is required, please contact your support representative.
For example, consider a custom step where:
The shader would have a structure such as the following (compare to the example given in CCustomSpotPostProcessSpec):
// Input images (as textures) layout(binding = 0) uniform sampler2D spotInput; layout(binding = 1) uniform sampler2D alphaInput; // Textures layout(binding = 2) uniform sampler2D texture1; layout(binding = 3) uniform sampler2D texture2; // Outputs layout (location = 0) out vec4 result; // Push constants layout (push_constant) uniform PushConstants { float floatVal; int tileX; int tileY; } pushConstants; void main() { // Where is this pixel within the tile? ivec2 position = ivec2(floor(gl_FragCoord.xy));
// Read the spot values, Note that you can read from anywhere // in the tile. Here we're just reading the same pixel location. // And it's possible to request multiple pixels from the input. vec4 spotValues = texelFetch(spotInput, position, 0); float alpha = texelFetch(alphaInput, position, 0).r;
// Do work here and store the results in result }
|
inline |
|
static |
Create a custom spot post process. Please see the class description for context.
| _params | The vector of shader parameters for each set of four spots (or part thereof). Please refer to the class description for a discussion of these. |
| _extend | The maximum distance beyond the render tile the shader will attempt to read. This is currently limited to 64 pixels. |
|
inlineoverridevirtual |
Get the type of post processing this spec represents.
Reimplemented from JawsMako::CCustomSpotPostProcessSpec.
| uint32 JawsMako::CCustomSpotTexturePostProcessSpec::extend |