Groundwork for other shaders

Adds the ground work for geometry shaders
Expands shaderData and gfxShader to allow for more shader types

note: when building a GFXShader in source you have to call setShaderStageFile with the shaderStage and the filepath for that stage.

Once we add compute shaders this will become more apparent as compute shaders are a stage of their own and do not require vertex and pixel files whereas other shaders sometimes do.
This commit is contained in:
marauder2k7 2024-03-06 13:26:39 +00:00
parent 949f788a0a
commit 808e2f4200
7 changed files with 220 additions and 161 deletions

View file

@ -134,7 +134,7 @@ void GuiShaderEditor::onPreRender()
setUpdate();
}
void GuiShaderEditor::drawThickLine(const Point2I& pt1, const Point2I& pt2, U32 thickness = 2, ColorI col1 = ColorI(255, 255, 255), ColorI col2 = ColorI(255, 255, 255))
void GuiShaderEditor::drawThickLine(const Point2I& pt1, const Point2I& pt2, U32 thickness, ColorI col1, ColorI col2)
{
Point2F dir = Point2F(pt2.x - pt1.x, pt2.y - pt1.y);
if (dir == Point2F::Zero)
@ -292,7 +292,7 @@ void GuiShaderEditor::renderConnections(Point2I offset, const RectI& updateRect)
start += Point2I(mNodeSize / 2, mNodeSize / 2);
end += Point2I(mNodeSize / 2, mNodeSize / 2);
drawThickLine(start, end);
drawThickLine(start, end, mNodeSize/3);
}
// Restore the clip rect to what it was at the start
@ -328,7 +328,7 @@ void GuiShaderEditor::onRender(Point2I offset, const RectI& updateRect)
RectI sockActive(start, Point2I(mNodeSize, mNodeSize));
start += Point2I(mNodeSize / 2, mNodeSize / 2);
drawThickLine(start, mLastMousePos + offset);
drawThickLine(start, mLastMousePos + offset, mNodeSize/3);
// draw socket overlay over the top of the line.
sockActive.inset(1, 1);