Strange texture behavior on DUI Replace

Game build: 2060
Resolutions: all

Simple code repo:

local url = "https://www.google.com"
local origTxd = "whateverTxd01"
local origTx = "whateverTx01"
local txDict = "testTxd01"
local tx = "testTx01"
local dui = CreateDui(url, 1024, 1024)
local duiHandle = GetDuiHandle(dui)
local txd = CreateRuntimeTxd(txDict)
CreateRuntimeTextureFromDuiHandle(txd, tx, duiHandle)
AddReplaceTexture(origTxd, origTx, txd, tx)

Essentially what happens (and it happens on 100% on props/objects), is a weird triangle will appear, sometimes static, and sometimes randomly / briefly, over the top of the texture render.

Its strange because its always the same triangle as seen in the images below:

Expected: https://i.imgur.com/HKDg46S.jpeg

Actual: https://i.imgur.com/6EKkMS7.jpg

Let me know if there’s any other details I can provide on the issue.

1 Like

Is this also happening on current canary? There was some CEF weirdness that got fixed lately.

Yeah happens on both stable and canary. It usually reproduces very easily if you get a lot of people in the same area.

1 Like

Any way to cause whatever without ‘a lot of people’?

I’ve been trying to reproduce it by myself without much luck. It’s rather random when it occurs, but it does seem to correlate to high load / intense rendering.

It happens very rarely on my development environment, but I will keep playing with repro steps to see if I can find something concrete.

2 Likes

https://streamable.com/z80qvg

This video shows an example of walking out of some kind of rendering range that causes the effect to occur.

Unfortunately, like the other occurrences, it only happens randomly. This one is based on some kind of distance from the wheel which is rendering the DUI webpage.

1 Like

I actually figured how to reproduce it 100%.

You see in that streamable link above? When I walk out away and it starts cutting out / in, there’s a DrawMarker on the floor.

Any time you DrawMarker in view of a DUI replace, it creates this odd triangle.

1 Like

Able to make a quick script for this with some matching coords?

Another reminder - I’ve tried to replicate this by setting up a resource myself but it doesn’t really seem to do such. :confused:

It seems to be related to the render bug happening with screenshot-basic resource that displays only a triangle to the left.

Using latest canary version of FiveM Client on b2189.

Here is a direct screenshot of my game aiming at a garage marker:

Here is a screenshot of the same scene above using screenshot-basic but without aiming:

Here is a screenshot using screenshot-basic while aiming:

It happens 100% of the time with me if there is a marker rendered on screen without aiming

3 Likes

Okay, so you seem to also have the game’s HUD disabled. Did @testingtesting123 do so as well, and if so, why not state such is required explicitly? :confused:

Also:

When did you test this? There was a fix recently for resetting to a defined state before rendering post-game stuff, maybe it’s incomplete.

1 Like

Yes, sorry to not mention that. I didn’t think there was a correlation. In my example, some hud components are disabled, like the map and street names. But not all of them. I can test if toggling the hud components back makes any difference if it helps.

I took the screenshots the moment I created the reply, just checked here was using the build 4092 released on 19/06/2021

2 Likes

Right, markers seem to do some extra state clobbering.

Fixed, however:

I’ll assume this also fixes the similar issue with DUI flip-copying.

Test case used here:

  • client code

    CreateThread(function()
        while true do
            Wait(0)
    
            HideHudAndRadarThisFrame()
            local pedCoords = GetEntityCoords(PlayerPedId())
            DrawMarker(2, pedCoords.x, pedCoords.y, pedCoords.z + 2, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 2.0, 2.0, 2.0, 255, 128, 0, 50, false, true, 2, nil, nil, false)
        end
    end)
    
  • this pasted in NUI dev tools for a random running resource:

    document.body.innerHTML = '<object type="application/x-cfx-game-view"></object>';
    
3 Likes