[Bug] SET_RUNTIME_TEXTURE_PIXEL reads its colour arguments in reverse order (a, b, g, r) #353
Closed
TheDutchDev
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 1 comment 1 reply
|
A fix for this bug has been implemented and is available in the August 4 patch. Please try again and let us know if the issue persists. Thanks for your help! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[Bug] SET_RUNTIME_TEXTURE_PIXEL reads its colour arguments in reverse order (a, b, g, r)
Summary
Edit: FFS, I never told claude to make these on my behalf. Apologies for the AI-ish bug report. It is still valid afaik as I ran into it but ya. Feel free to close it if it's not relevant or already handled in another bug report.
SET_RUNTIME_TEXTURE_PIXEL(tex, x, y, r, g, b, a)appears to consume its four colour arguments backto front on Enhanced. A pixel written as
(r, g, b, a)renders asrgba(a, b, g, r).Issue type
Client
Repro rate
Always
Server build version
client build 106
Steps to Reproduce
Create a runtime texture, fill it with a known colour, commit, and draw it:
Expected Behavior
A faint white square
rgba(255, 255, 255, 64).Actual Behavior
An opaque cyan square
rgba(64, 255, 255, 255), the arguments reversed.Evidence
Four textures, each isolating one channel so there is no spatial variable to confound the reading.
Every one matches a straight reversal:
(r,g,b,a)(a,b,g,r)255, 0, 0, 2550, 255, 0, 2550, 0, 255, 255255, 255, 255, 64rgba(64,255,255,255)Passing the arguments deliberately reversed
SetRuntimeTexturePixel(tex, x, y, a, b, g, r)—produces the intended colours, which is both the confirmation and the workaround.
CREATE_RUNTIME_TEXTURE_FROM_IMAGErenders correct colours from the same TXD in the same draw call,so the issue is specific to
SET_RUNTIME_TEXTURE_PIXELrather than to runtime textures, the TXD, orDRAW_SPRITE.Additional Context
All reactions