Quick noob question

  • Posts: 20
3 years 1 month ago #1 by Citizenkane
If I am running a shader pass which renders to a 1x1 pixel texture, that shader pass only runs once per frame, right? (Or 8 times to a 4x2 pixel texture, etc.)

Please Log in or Create an account to join the conversation.

  • Posts: 1221
3 years 1 month ago #2 by Marty McFly
Correct.
But mostly some complex math that has small output data has huge compilation time, so this is more a culprit than execution time.
The following user(s) said Thank You: Citizenkane

Please Log in or Create an account to join the conversation.

  • Posts: 20
3 years 1 month ago - 3 years 1 month ago #3 by Citizenkane
When you mean compilation time, do you mean like when ReShade starts up, processing effects? In terms of execution time, I can definitely see how crazy math on one pixel might take a lot longer than simple operations on many pixels - especially because of how the GPU parallelizes everything.

Otherwise, that makes perfect sense, thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 1221
3 years 1 month ago - 3 years 1 month ago #4 by Marty McFly
Yes, at startup. A shader with an unrolled loop takes some time to compile, no matter the amount of pixels it runs on. Calculating avg color of screen by averaging as many pixels as possible is an example for heavy compilation time, even with a 1x1 output so performance hit is almost non existant.
The following user(s) said Thank You: Citizenkane

Please Log in or Create an account to join the conversation.

  • Posts: 20
3 years 1 month ago - 3 years 1 month ago #5 by Citizenkane
Interesting, very good to know!

Cheers :)

Please Log in or Create an account to join the conversation.