Renderer: Add proper support for blending

This commit is contained in:
Jérôme Leclercq
2021-05-14 01:50:46 +02:00
parent 61dbd91346
commit adbf1e1da0
13 changed files with 207 additions and 99 deletions

View File

@@ -19,13 +19,21 @@ namespace Nz
struct RenderStates
{
BlendFunc dstBlend = BlendFunc_Zero;
BlendFunc srcBlend = BlendFunc_One;
FaceFilling faceFilling = FaceFilling_Fill;
FaceSide cullingSide = FaceSide_Back;
RendererComparison depthCompare = RendererComparison_Less;
PrimitiveMode primitiveMode = PrimitiveMode_TriangleList;
struct
{
BlendEquation modeAlpha = BlendEquation::Add;
BlendEquation modeColor = BlendEquation::Add;
BlendFunc dstAlpha = BlendFunc::Zero;
BlendFunc dstColor = BlendFunc::Zero;
BlendFunc srcAlpha = BlendFunc::One;
BlendFunc srcColor = BlendFunc::One;
} blend;
struct
{
RendererComparison compare = RendererComparison_Always;