NVIDIAGameWorks / rtx-remix

Combined repo for the RTX-Remix runtime
https://www.nvidia.com/en-us/geforce/rtx-remix/
MIT License
1.37k stars 69 forks source link

D3D9 texture addressing mode - multiple transparent draw passes not handled #421

Open szlobipeti opened 7 months ago

szlobipeti commented 7 months ago

- A clear and concise description of what the bug is: In Cars the video game (2006) the eyes are not drawn correctly: only one eye is drawn instead of both eyes. The eyes are drawn using textures that are using D3DTADDRESS_CLAMP addressing mode for their U and V addressing (D3DSAMPLERSTATETYPE). The game uses textures that have the cars eye in the middle, surrounded by transparency extending and covering the entire perimeter of the texture. The clamp addressing mode extends the transparency for UV coordinates outside of the 0.0f-1.0f range, resulting in the eye showing only once and instead of repeating the texture the rest of the mesh remains transparent. The game draws the eyes in two passes, first one eye and then the other. They draw over each other, but because of the transparency both eyes show up in the original game. Using RTX Remix, only one eye shows, assuming that the second draw somehow draws over/discards the first eye, even though it should draw nothing, because of transparency. - Which Remix version: remix-0.3.0-release - Which GPU: RTX 3060 Laptop - Which GPU driver version: 537.42 - Which game build: Cars (Steam build)

Steps to reproduce the behavior:

  1. Launch the game and start a new game or load a save
  2. Observe that almost every vehicle in the game only has one eye

Expected behavior Every vehicle in the game has two eyes

Screenshots image image

Eye material example where you can observe the material parameters, including the texture sampler addressing modes: McQm_Eye.txt

NV-DM commented 7 months ago

REMIX-2810 for tracking.