Skip to content

fix(dirtfx): blend IVF vehicle grunge textures towards white with full opacity - #347

Open
CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/dirtfx-ivf-grunge-blending
Open

CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/dirtfx-ivf-grunge-blending

Conversation

@CanerKaraca23

Copy link
Copy Markdown
Collaborator

Summary

Fixes IVF vehicle grunge texture (vehiclegrunge256_2, _3, _4) blending algorithm to correctly interpolate RGB towards white (255) with full opacity (255 alpha), matching original ImVehFt behavior and RenderWare dual-pass blending requirements.

Changes

  • Blending: Switched from alpha channel reduction (255 - texid * 15) to RGB interpolation towards pure white (pixel = 255 - (255 - pixel) * factor) with alpha = 255.
  • Safety: Added null-checks for texture raster before accessing width/height and texture allocation failure guards.
  • Resource Management: Reset texture pointers to nullptr upon destruction in ShutdownHook().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant