|
srp
software rendering pipeline
|
#include <string.h>#include "srp/context.h"#include "pipeline/interpolation.h"#include "utils/message_callback_p.h"#include "utils/voidptr.h"
| #define | INTERPOLATE_FLOATING(Type) |
| #define | INTERPOLATE_INTEGER(Type) |
| void | interpolateDepthAndWTriangle (SRPVertexShaderOut *vertices, const float *weights, const float *invW, const SRPShaderProgram *sp, float *depth, float *reciprocalInterpolatedInvW) |
| void | interpolateDepthAndWLine (SRPVertexShaderOut *vertices, const float *weights, const float *invW, const SRPShaderProgram *sp, float *depth, float *reciprocalInterpolatedInvW) |
| void | interpolateAttributes (SRPVertexShaderOut *vertices, size_t nVertices, const float *weights, const float *invW, float reciprocalInterpolatedInvW, const SRPShaderProgram *sp, SRPInterpolated *pOutput) |
Interpolation implementation
| #define INTERPOLATE_FLOATING | ( | Type | ) |
Interpolate a floating point type attribute
| #define INTERPOLATE_INTEGER | ( | Type | ) |
Flat-interpolate an integer type attribute
| void interpolateAttributes | ( | SRPVertexShaderOut * | vertices, |
| size_t | nVertices, | ||
| const float * | weights, | ||
| const float * | invW, | ||
| float | reciprocalInterpolatedInvW, | ||
| const SRPShaderProgram * | sp, | ||
| SRPInterpolated * | pOutput | ||
| ) |
Interpolate the attributes inside the primitive
| [in] | vertices | Array of vertices |
| [in] | nVertices | Amount of passed vertices |
| [in] | weights | Array of barycentric coordinates |
| [in] | invW | Array of inverseW values for each corresponding vertex |
| [in] | reciprocalInterpolatedInvW | The reciprocal of interpolated inverse W_clip |
| [in] | sp | The SRPShaderProgram being used |
| [out] | pOutput | Interpolated vertex attributes |
| void interpolateDepthAndWLine | ( | SRPVertexShaderOut * | vertices, |
| const float * | weights, | ||
| const float * | invW, | ||
| const SRPShaderProgram * | sp, | ||
| float * | depth, | ||
| float * | reciprocalInterpolatedInvW | ||
| ) |
Interpolate the depth and inverse W values inside the line
| [in] | vertices | Array of vertices |
| [in] | weights | Array of barycentric coordinates |
| [in] | invW | Array of inverseW values for each corresponding vertex |
| [in] | sp | The SRPShaderProgram being used |
| [out] | depth | Where interpolated depth will be stored |
| [out] | reciprocalInterpolatedInvW | Where the reciprocal of interpolated inverse W_clip will be stored |