View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003883 | The Dark Mod | Coding | public | 24.10.2014 17:51 | 23.12.2014 17:51 |
Reporter | SteveL | Assigned To | SteveL | ||
Priority | normal | Severity | normal | Reproducibility | N/A |
Status | closed | Resolution | no change required | ||
Product Version | TDM 2.03 | ||||
Summary | 0003883: Post processing shaders doing more sums than needed | ||||
Description | From a note on issue 0003877 On the environmental variables: shaders that use _currentRender do unnecessary work. The _currentRender capture in the renderer c++ code sets environmental constants for both the screen size and the power-of-two texture size, to allow shaders to translate a screen position to a texture coordinate. But when you lay out the math, only the reciprocal of the power-of-two texture size is really needed to do that. The screen size cancels out in the algebra. That's how I did it in the "depth window" shader and video I posted in the engine thread. I'll add a new environmental constant for depth-capture-related fragment programs which holds that reciprocal, and maybe open another tracker to change the shaders using _currentRender if it turns out that they're doing that extra calculation for every pixel instead of just once (I don't have the code in front of me right now). | ||||
Additional Information | The calculation *is* done for each fragment, at least in HeatHaze.vfp, and lots (or maybe all) other PP shaders copy from it. Actions required: - Check whether the simple reciprocal does indeed cover all possible permutations of screen and texture size - See whether this makes any performance difference and decide whether it's worth fixing. | ||||
Tags | No tags attached. | ||||
Closed on the grounds of "don't fix what's not broken". It's true but the code is quite widespread and I can't find any evidence that fragment shaders are a bottleneck for us. | |
Update: we need the two parameters after all because some old special effects use a different aspect ratio while rendering. | |
Date Modified | Username | Field | Change |
---|---|---|---|
24.10.2014 17:51 | SteveL | New Issue | |
24.10.2014 17:51 | SteveL | Status | new => assigned |
24.10.2014 17:51 | SteveL | Assigned To | => SteveL |
24.10.2014 17:51 | SteveL | Summary | Posrt processing shaders doing more sums than needed => Post processing shaders doing more sums than needed |
24.10.2014 17:51 | SteveL | Relationship added | related to 0003877 |
24.10.2014 17:52 | SteveL | Relationship added | child of 0003684 |
23.11.2014 11:39 | SteveL | Note Added: 0007164 | |
23.11.2014 11:39 | SteveL | Status | assigned => closed |
23.11.2014 11:39 | SteveL | Resolution | open => no change required |
23.12.2014 17:51 | SteveL | Note Added: 0007271 |