Move texture alignment from rendering to elsewhere

Moderator: GZDoom Developers

Post Reply
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Move texture alignment from rendering to elsewhere

Post by RockstarRaccoon »

This is less of a request in more of a notice of intent. While looking through the rendering process, I've noticed that it does texture alignment for every line on the fly, every frame. This amounts to about 6 extra calculations per line per frame, and would probably be better handled only when it is set or modified, such as windy map is loaded or an attached sector is moved. I would like to write a version of the code which does this instead, while I write the code for my new texture alignment options.

Would there be any problem with that? Am I fully understanding the situation?


Edit: to clarify, this is something I'd like to look into because I'm already planning on screwing with it to implement the feature request I made for "more robust pegging options", which was, in turn, a consolidation of my long-standing requests for pegging a texture to the floor and pegging to the 0 on the map height. If this is something that should be done, it'd be best to do it before completing the code for those so there will be less code to move around.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Move texture alignment from rendering to elsewhere

Post by Graf Zahl »

It's not that simple. Offloading this stuff can cost more than these 6 calculations due to cache misses, and will require checks elsewhere to check for animations.
Ultimately optimizing this is pointless.

The goal should be, once Vulkan is working, to pre-generate command buffers for larger structures in the level to avoid recalculating this stuff entirely.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Move texture alignment from rendering to elsewhere

Post by RockstarRaccoon »

Alright then, I'll just worry about the alignment stuff then.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”