From 7918e94bc1e65a8a7fd1aeb908215253ed391d92 Mon Sep 17 00:00:00 2001 From: Eduardo Hernandez Melian Date: Thu, 25 Sep 2025 01:39:20 +0200 Subject: [PATCH 1/2] 300fps triangle blogpost --- .../2025-09-24-optimised-triangle/index.md | 27 +++++++++++++++++++ blog/authors.yml | 8 +++++- blog/tags.yml | 4 +++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 blog/2025/2025-09-24-optimised-triangle/index.md diff --git a/blog/2025/2025-09-24-optimised-triangle/index.md b/blog/2025/2025-09-24-optimised-triangle/index.md new file mode 100644 index 0000000..e1217fb --- /dev/null +++ b/blog/2025/2025-09-24-optimised-triangle/index.md @@ -0,0 +1,27 @@ +--- +title: 'help! my triangle is only 300fps!!!' +slug: 'optimised-triangle' +date: '2025-09-24' +authors: ['jaked', 'eduameli'] +tags: ['faq', 'article'] +--- + +Don't worry! your triangle running at a mere 300 fps is perfectly normal. The purpose of this post is to try to convince you it is not +a good use of your time to try to optimise hello-triangle. + +- 300fps is still pretty fast! ~3.33ms + +- FPS can be a misleading performance metric, as it changes non-linearly as you optimise your frame. + A 10fps difference from 60 to 70fps is ~2.38ms while the difference from 300 to 310fps is ~0.107ms. + To actually profile your application it is much better to use dedicated tools like Nsight Graphics or Tracy. + +- Modern GPUs are very complex, and performance **does not scale linearly with scene complexity**, for example, if one triangle runs at 300fps this doesnt mean five triangles will run at 60fps. + GPUs are designed to have really good throughput at the cost of latency. + +- When rendering one single triangle, most of your frametime may just be **overhead**, this could be WSI, driver, validation layers, ... + +- **hello-triangle** is simply not a representative workload for _real applications_, which are way more complex with lots of factors affecting performance and a **compromise between speed and + quality**. In order to properly judge the performance of your engine, you should at least use a test scene such as [Intel Sponza](https://www.intel.com/content/www/us/en/developer/topic-technology/graphics-research/samples.html) or + [Bistro](https://developer.nvidia.com/orca/amazon-lumberyard-bistro). + +good luck on your journey learning graphics! diff --git a/blog/authors.yml b/blog/authors.yml index dc95fa4..909199d 100644 --- a/blog/authors.yml +++ b/blog/authors.yml @@ -9,7 +9,7 @@ jaker: deccer: name: deccer - title: Graphics Programming Beginner + title: Combative Axis url: https://github.com/deccer image_url: https://avatars.githubusercontent.com/u/15695435?v=4 page: true @@ -51,3 +51,9 @@ devshgraphicsprogramming: page: true socials: github: devshgraphicsprogramming + +eduameli: + name: eduameli + title: graphics programming noob + url: https://eduameli.gitlab.io + image_url: https://avatars.githubusercontent.com/u/165940955?v=4 diff --git a/blog/tags.yml b/blog/tags.yml index 19e43b9..fa456b9 100644 --- a/blog/tags.yml +++ b/blog/tags.yml @@ -13,3 +13,7 @@ showcase: permalink: /showcase description: Graphics Programming Discord Server Showcase +faq: + label: FAQ + permalink: /FAQ + description: Frequently Asked Questions From 05ef521c8a91b59d280c8228259479f71c562f8c Mon Sep 17 00:00:00 2001 From: Eduardo Hernandez Melian Date: Fri, 26 Sep 2025 00:04:33 +0200 Subject: [PATCH 2/2] minor changes --- blog/2025/2025-09-24-optimised-triangle/index.md | 6 +++--- blog/tags.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blog/2025/2025-09-24-optimised-triangle/index.md b/blog/2025/2025-09-24-optimised-triangle/index.md index e1217fb..06c70ed 100644 --- a/blog/2025/2025-09-24-optimised-triangle/index.md +++ b/blog/2025/2025-09-24-optimised-triangle/index.md @@ -13,15 +13,15 @@ a good use of your time to try to optimise hello-triangle. - FPS can be a misleading performance metric, as it changes non-linearly as you optimise your frame. A 10fps difference from 60 to 70fps is ~2.38ms while the difference from 300 to 310fps is ~0.107ms. - To actually profile your application it is much better to use dedicated tools like Nsight Graphics or Tracy. + To actually profile your application it is much better to use dedicated tools like [Nsight Graphics](https://docs.nvidia.com/nsight-graphics/UserGuide/) or [Tracy](https://github.com/wolfpld/tracy). - Modern GPUs are very complex, and performance **does not scale linearly with scene complexity**, for example, if one triangle runs at 300fps this doesnt mean five triangles will run at 60fps. GPUs are designed to have really good throughput at the cost of latency. -- When rendering one single triangle, most of your frametime may just be **overhead**, this could be WSI, driver, validation layers, ... +- When rendering one single triangle, most of your frametime may just be **overhead**, this could be your window manager, driver or API state validation to name a few. - **hello-triangle** is simply not a representative workload for _real applications_, which are way more complex with lots of factors affecting performance and a **compromise between speed and quality**. In order to properly judge the performance of your engine, you should at least use a test scene such as [Intel Sponza](https://www.intel.com/content/www/us/en/developer/topic-technology/graphics-research/samples.html) or [Bistro](https://developer.nvidia.com/orca/amazon-lumberyard-bistro). -good luck on your journey learning graphics! +Good luck on your journey learning graphics! diff --git a/blog/tags.yml b/blog/tags.yml index fa456b9..9560f07 100644 --- a/blog/tags.yml +++ b/blog/tags.yml @@ -14,6 +14,6 @@ showcase: description: Graphics Programming Discord Server Showcase faq: - label: FAQ - permalink: /FAQ + label: faq + permalink: /faq description: Frequently Asked Questions