Skip to content

Undesired quantity limit for dxDrawModel3D when alphaTransparency is enabled on the model. #4755

@ZbyK77

Description

@ZbyK77

Describe the bug

When a model has the alphaTransparency property enabled, the number of displayed objects becomes limited (~200). The issue does not occur when alphaTransparency is set to false.
This applies to both default models and replaced ones.

This is mainly a problem with all types of grasses and plants.

Steps to reproduce

  1. Run resource test_grass.zip
  2. Look at the grass on the farm
  3. Switch 'alphaTransparency' var to true in c.lua
  4. Restart resource

...Or

Run code:

startPosition = Vector3(-1193.58, -1058.74, 128)
engineStreamingRequestModel(806,true,true) -- Plant with alpha
engineStreamingRequestModel(1337,true,true) -- Bin without alpha
addEventHandler('onClientRender',root,function()
    for x=0,50 do
        for y=0,50 do
            dxDrawModel3D(806, startPosition.x + x, startPosition.y + y, startPosition.z, 0,0,0, 1,1,1,1)
        end
    end
    for x=50,100 do
        for y=0,50 do
            dxDrawModel3D(1337, startPosition.x + x, startPosition.y + y, startPosition.z+1, 0,0,0, 1,1,1,1)
        end
    end
end)

Look at the number of objects.

Version

Multi Theft Auto v1.6-release-23953

Additional context

Two model combinations (same quantity)
Image

Grass model when alphaTransparency is false.
Image

alphaTransarency is true
Image

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions