rwengine / openrw

OpenRW "Open ReWrite" is an un-official open source recreation of the classic Grand Theft Auto III game executable
http://openrw.org
GNU General Public License v3.0
1.92k stars 172 forks source link

Some texturing regressions #258

Open haphzd opened 7 years ago

haphzd commented 7 years ago
snshn commented 7 years ago

this may be related

decal_glitch

PerikiyoXD commented 7 years ago

Happening @ GTA3, not a openrw bug (but indeed a R* error) image

ghost commented 6 years ago

(AI - Area indicator) Meanwhile searching regression of missing textures I found this:

Earlier(Before #241) special objects where handled manually to draw. They have their own "hardcoded" draw parameters, after that pull renderer (for each geometry's texture) looks only into its materials: https://github.com/rwengine/openrw/blob/master/rwengine/src/render/ObjectRenderer.cpp#L57

Before that pull arrows and AI had more extra data: https://github.com/rwengine/openrw/pull/241/files#diff-6715ad1604d0087bd5c0eb8eb2b2f222L372

Solving should be quiet easy pass texture to each geometry or overload methods with custom draw parameters. What do you think?

lion328 commented 6 years ago

I have found that the missing textures of interior of Enforcer is caused by how the game render transparent objects.

I implemented simple debug camera to move around and its showed textures was loaded correctly, except transparent objects masked out all opaque objects.

screenshot

The game has an algorithm to sort transparent object by using position of object as key to sort, except there're the same position as model origin.

ghost commented 6 years ago

Update: