You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO[Przemek]: try to draft up a `CTriangleMesh` Class in it's own header (like CPolyline), simplest form is basically two cpu buffers (1 array of uint index buffer, 1 array of float64_t3 vertexBuffer)
70
+
// TODO[Przemek]: Then have a `drawMesh` function here similar to drawXXX's below, this will fit both vertex and index buffer in the `geometryBuffer`.
71
+
// take a `SIntendedSubmitInfo` like others, but don't use it as I don't want you to handle anything regarding autoSubmit
72
+
// somehow retrieve or calculate the geometry buffer offsets of your vertex and index buffer to be used outside for binding purposes
73
+
69
74
//! this function fills buffers required for drawing a polyline and submits a draw through provided callback when there is not enough memory.
// TODO[Przemek]: Read after reading the fragment shader comments and having a basic understanding of the relationship between "mainObject" and our programmable blending resolve:
202
+
// Use `addMainObject_SubmitIfNeeded` to push your single mainObject you'll be using for the enitre triangle mesh (this will ensure overlaps between triangles of the same mesh is resolved correctly)
203
+
// Delete comment when you understand this
204
+
196
205
// [ADVANCED] Do not use this function unless you know what you're doing (It may cause auto submit)
197
206
// Never call this function multiple times in a row before indexing it in a drawable, because future auto-submits may invalidate mainObjects, so do them one by one, for example:
// TODO[Przemek]: binding the same pipelie, no need to change.
1382
1387
cb->bindGraphicsPipeline(graphicsPipeline.get());
1388
+
1389
+
// TODO[Przemek]: contour settings, height shading settings, base bda pointers will need to be pushed via pushConstants before the draw currently as it's the easiest thing to do.
1390
+
1391
+
// TODO[Przemek]: draw parameters needs to reflect the mesh involved
// TODO[Przemek]: add your own case, you won't call any other drawResourcesFiller function, only drawMesh with your custom made Mesh (for start it can be a single triangle)
1491
+
1480
1492
// we record upload of our objects and if we failed to allocate we submit everything
// TODO[Przemek]: we will need something similar to LineStyles but related to heigh shading settings which is user customizable (like LineStyle stipple patterns) and requires upper_bound to figure out the color based on height value.
265
+
// We'll discuss that later or what it will be looking like and how it's gonna get passed to our shaders.
266
+
263
267
// The color parameter is also used for styling non-curve objects such as text glyphs and hatches with solid color
// TODO[Przemek]: REMOVE when READ --> if linestyle value in mainObject is invalid then we're using localTextureColor instead of the linestyle color, this should be true for DTM meshes to resolve color with what's stored in colorStorage and not from the lineStyle color
// TODO[Przemek]: But make sure you're still calling this, correctly calculating alpha and texture color.
651
+
// you can add 1 main object and push via DrawResourcesFiller like we already do for other objects (this go in the mainObjects StorageBuffer) and then set the currentMainObjectIdx to 0 here
652
+
// having 1 main object temporarily means that all triangle meshes will be treated as a unified object in blending operations.
// TODO[Przemek]: Disable Everything here and do your own thing as we already discussed, but let's have the same PSInput data passed to fragment.
91
+
// your programmable pulling will use the baseVertexBufferAddress BDA address and `vertexID` to RawBufferLoad it's vertex.
92
+
// Later, most likely We will require pulling all 3 vertices of the triangle, that's where you need to know which triangle you're currently on, and instead of objectID = vertexID/4 which we currently do, you will do vertexID/3 and pull all 3 of it's vertices.
0 commit comments