srp
software rendering pipeline
Loading...
Searching...
No Matches
SRPTriangle Struct Reference

#include <triangle.h>

Collaboration diagram for SRPTriangle:

Public Attributes

SRPVertexShaderOut v [3]
 
vec3p_ndc [3]
 
vec3 ss [3]
 
vec3 edge [3]
 
bool edgeTL [3]
 
vec2 minBP
 
vec2 maxBP
 
float lambda [3]
 
float lambda_row [3]
 
float dldx [3]
 
float dldy [3]
 
float invW [3]
 
bool isFrontFacing
 
size_t id
 

Detailed Description

Triangle primitive. Stores data needed for its rasterization

Member Data Documentation

◆ dldx

float SRPTriangle::dldx[3]

Barycentric coordinates' delta values for +X movement

◆ dldy

float SRPTriangle::dldy[3]

Barycentric coordinates' delta values for +Y movement

◆ edge

vec3 SRPTriangle::edge[3]

Screen space edge vectors

◆ edgeTL

bool SRPTriangle::edgeTL[3]

Whether or not the edge is flat top or left (0th edge: 0th vertex -> 1st vertex, etc.)

◆ id

size_t SRPTriangle::id

ID of the primitive, starting from 0

◆ invW

float SRPTriangle::invW[3]

1 / clip-space W. Needed for perspective-correct interpolation

◆ isFrontFacing

bool SRPTriangle::isFrontFacing

Whether or not the triangle is front-facing

◆ lambda

float SRPTriangle::lambda[3]

Barycentric coordinates at the current pixel

◆ lambda_row

float SRPTriangle::lambda_row[3]

Barycentric coordinates at the beginning of the row

◆ maxBP

vec2 SRPTriangle::maxBP

Maximum bounding point (screen-space)

◆ minBP

vec2 SRPTriangle::minBP

Minimum bounding point (screen-space)

◆ p_ndc

vec3* SRPTriangle::p_ndc[3]

Pointers to vertices' positions in NDC

◆ ss

vec3 SRPTriangle::ss[3]

Vertices' positions in screen-space

◆ v

SRPVertexShaderOut SRPTriangle::v[3]

Outputs of the vertex shader


The documentation for this struct was generated from the following file: