Open
Description
I've forked GPipe-Core to support geometry shaders. It works, but it's quite experimental and I'm still thriving to get a clear picture of GPipe's internals. Even if it's far from being a proper PR at this time, other people could be interested in this draft. I do reckon however that a detailled documentation on how things work in the first place would be quite helpful here.
A brief excerpt from the forked GPipe-Test project:
let geometryShaderEnabled = True
fragNormalsUV <- if geometryShaderEnabled
then do
geometries :: GeometryStream (Geometry Triangles (VPos, (V3 FlatVFloat, V2 VFloat))) <- geometrize projectedSides
let
makePrimitive :: Int
-> Geometry Triangles (VPos, (V3 FlatVFloat, V2 VFloat))
-> GGenerativeGeometry Triangles (VPos, (V3 FlatVFloat, V2 VFloat))
-> GGenerativeGeometry Triangles (VPos, (V3 FlatVFloat, V2 VFloat))
makePrimitive depth (Triangle p1 p2 p3) g = ...
depth = 2
expandedGeometries :: GeometryStream (GGenerativeGeometry Triangles (VPos, (V3 FlatVFloat, V2 VFloat)))
expandedGeometries = (\t -> makePrimitive depth t generativeTriangleStrip) <$> geometries
verticeCount = 3 * 4 ^ depth
generateAndRasterize rasterOptions verticeCount expandedGeometries
else
rasterize rasterOptions projectedSides
Metadata
Metadata
Assignees
Labels
No labels