DUI textures resolution dependent

It seems as though replacing textures with DUI textures is resolution dependent.

On the example below I’m changing the texture on the props to a 1024x1024 square texture.

On 1600x1024 it works as expected, with the texture filling the prop surface.

On 1600x900 I get a black bar at the bottom.

1 Like

I’m hoping you’re using DUI with a static image as an example, and not to only do so in real-world use, right?

If you’re replacing with a static image, please don’t use DUI! Use a normal .#td instead and request it the same way you would with DRAW_SPRITE.

1 Like

This is just a test setup and not part of real-world use.

1 Like

Can you explain what problems would arise from using a DUI for static images?

… it’s extremely wasteful, and there’s various less wasteful ways to present a static image.

As to the original bug, didn’t really see any actual repro case and I’ve never seen this happen at all :confused:

So is it the DUI or the runtime texture that makes it wasteful, or both?
I’m just experimenting with rendering some dynamic(but static ones generated) graphics trough a DUI and stamping that on a runtime texture.
What I’ve found so far is that I can destroy the DUI and keep the texture, hopefully that’s okay.

I’ve just took a quick look at the original bug.
What I’m getting is that any DUI resolution beyond my game’s resolution isn’t rendered.

Here is a DUI rendered with DrawSpritePoly with a red line drawn separately to indicate where the sprite is drawn:


The bottom part is cut off as the DUI height is larger than the game’s height.

I’ve also tried switching resolutions and windowed/full screen and find the same thing happening.

Can you provide a script so it’s easier to test i.e. I don’t have to set up a drawn texture myself and risk potentially doing something wrong there?

It’s odd, though, I suspected code wasn’t setting the D3D11 viewport but it is, so that’s curious.

Ya, this should show the problem:
dui-cutoff.zip (1.0 MB)

I was playing around with this example, and noticed the runtime TXD doesn’t work as I expected.
Rendering multiple DUIs to the same TXD but different TXNs creates a blank render.
So I ended up changing them to all separate TXDs.

Fixed.

2 Likes