-
Notifications
You must be signed in to change notification settings - Fork 7
TBR Pipeline Implementation & Pipeline Optimization #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
979a251
fix typo
indevn b9f2ae8
Implement perspective division and viewport transformation with persp…
indevn 7093d82
implement tile-based rasterizer and refractor the pipeline to support…
indevn 8d58a84
Add Performance Profiling for Deffered Pipeline. Remove detailed debu…
indevn d0ddf62
Expand the Vertex data structure, implement frustum culling and backf…
indevn a4021cd
Fix rendering consistency between TRADITIONAL and TILE_BASED modes
indevn 70e1581
add debug mode
indevn 4538667
Revert "add debug mode", which is not necessary for rendering tests.
indevn b57d907
Add Early-Z to TBR. Remove obsolete functions previously used for TBR…
indevn 1d2d9a9
TBR: Pre-allocate and reuse fragment caches; add RasterizeTo; two-pas…
indevn 8a74379
vertex optimization: avoid data movement and multi-stage memory reall…
indevn bb5acc1
TBR: Use SoA vertex layout to improve cache locality
indevn 0549211
TBR: Use global framebuffer to avoid merge overhead
indevn 258607a
TBR: Optimize global buffer write-back logic
indevn ffe0d75
Optimize perspective correction, add helper func, simplify code
indevn 957c9b0
Refactor: Extract pipeline into standalone class; rename TraditionalP…
indevn d6e3b40
TBR: Replace barycentric coordinate computation with half-space testi…
indevn 30038ef
DR: Optimize fragment collection(pre-reserve per bucket, move-insert,…
indevn 61e75a8
Refactor: Modify the triangle binning logic in TBR to use the TileGri…
indevn 86d06ad
Change timing-related debug messages from SPDLOG_INFO to SPDLOG_DEBUG…
indevn 0ea7f22
TBR: Perform mask-based computation for TBR rasterization to achieve …
indevn b659f57
VS: Optimize the vertex matrix caching in shaders by adding cache pre…
indevn e81bcff
FS: Cache vectors and matrices to avoid redundant computations.
indevn b84cfd2
Enhanced shader class with LUT caching for specular reflection to opt…
indevn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Minimal SoA layout for TBR pipeline (Phase 1) | ||
| #ifndef SIMPLERENDER_SRC_INCLUDE_VERTEX_SOA_HPP_ | ||
| #define SIMPLERENDER_SRC_INCLUDE_VERTEX_SOA_HPP_ | ||
|
|
||
| #include <vector> | ||
|
|
||
| #include "math.hpp" | ||
| #include "color.h" | ||
|
|
||
| namespace simple_renderer { | ||
|
|
||
| struct VertexSoA { | ||
|
indevn marked this conversation as resolved.
Outdated
|
||
| // 屏幕空间坐标(视口变换后) | ||
| std::vector<Vector4f> pos_screen; // screen space position (x,y,z,w) | ||
| // 裁剪空间坐标(用于视锥体剔除):clip = MVP * pos | ||
| std::vector<Vector4f> pos_clip; | ||
| std::vector<Vector3f> normal; | ||
| std::vector<Vector2f> uv; | ||
| std::vector<Color> color; | ||
|
|
||
| inline size_t size() const { return pos_screen.size(); } | ||
| inline void resize(size_t n) { | ||
| pos_screen.resize(n); | ||
| pos_clip.resize(n); | ||
| normal.resize(n); | ||
| uv.resize(n); | ||
| color.resize(n); | ||
| } | ||
| }; | ||
|
|
||
| } // namespace simple_renderer | ||
|
|
||
| #endif // SIMPLERENDER_SRC_INCLUDE_VERTEX_SOA_HPP_ | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.