Project

General

Profile

Actions

Emulator Issues #6440

closed

Texture rendering problem in Mini Ninjas Wii

Added by jmuehldorfer over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Have you searched the issue tracker for a similar issue?
Yes

Game Name?
Mini Ninjas

Game ID?
RNJP4F

What went wrong?
Wrong texture colors in a certain distance.
Looks like a gradient overlay in the game is rendered without transparency and makes the textures far too white.
See a picture of the original effect at the end.

What steps will reproduce the problem?
Starting the game with default settings

What version of Dolphin were you using
3.5-1683
3.5-138

64 or 32 bit Dolphin?
64bit

What version of Dolphin used to work?
none known personally
there is a youtube that looks like it is without the bug on "SVN 5190" https://www.youtube.com/watch?v=qvtbS6Rmqz8

What Operating System were you using and what are your hardware
specifications?
Ubuntu 13.04
Ati HD4850/Nvidia GTX 660
OGL

Windows 7
unkown GPU (sorry)
DX9

64 or 32 bit Operating system?
64bit

Any other relevant information or links to logs:
Screenshots:
Original gradient effect (seen on the grass), screenshot from google:
http://www.nintendofuse.com/wp-content/uploads/2009/07/Mini-Ninjas-Wii_12.jpg
My screenshot. A sharp edge is seen on the box left and the grass right and the floor middle:
http://abload.de/img/rnjp4f-2ecogs.jpg
A FIFO:
https://mega.co.nz/#!8ksWDAgQ!fes0LzIdykysqiKrLNszj2ClAodmBPi9kM0HA2ObMoA

Actions #1

Updated by jmuehldorfer over 11 years ago

Sorry, my screenshot does not work.
Again:
http://i.imgur.com/M0UUN3M.jpg

Actions #2

Updated by kostamarino over 11 years ago

R6750 doesn't have the banding issue either, r6752 has it. Based on the changelog, r6751 or revision d435fd8957a2 seems to be the rev since when the banding issue started when using d3d9.

Actions #3

Updated by NeoBrainX over 11 years ago

I can't see the issue. Please explain better where the issue is visible. Edit the picture in paint if you can't explain it in words.

Actions #4

Updated by NeoBrainX over 11 years ago

.. okay I got it now, but for convenience you should mark it better anyway. Making devs look for your bug for 3 minutes isn't a good way to get people to fix the issue.

Actions #5

Updated by kostamarino over 11 years ago

Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
index a4a788c..6c28b48 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
@@ -195,8 +195,8 @@ static LPDIRECT3DPIXELSHADER9 CreateCopyShader(int copyMatrixType, int depthConv
{
// Watch out for the fire fumes effect in Metroid it's really sensitive to this,
// the lighting in RE0 is also way beyond sensitive since the "good value" is hardcoded and Dolphin is almost always off.

  •   WRITE(p, "float4 EncodedDepth = frac(texcol.r * (16777215.f/16777216.f) * float4(1.0f,256.0f,256.0f*256.0f,1.0f));\n"
    
  •            "texcol = floor(EncodedDepth * float4(256.f,256.f,256.f,15.0f)) / float4(255.0f,255.0f,255.0f,15.0f);\n");
    
  •   WRITE(p, "float4 EncodedDepth = frac((texcol.r * (16777215.0f/16777216.0f)) * float4(1.0f,255.0f,255.0f*255.0f,255.0f*255.0f*255.0f));\n"
    
  •                     "texcol = float4((EncodedDepth.rgb * (16777216.0f/16777215.0f)),1.0f);\n");
    
    }
    else
    {

Reverting the lines above to what they where before revision d435fd8957a2 seems to fix the banding. Definitely revision d435fd8957a2 is the culprit.

Actions #6

Updated by NeoBrainX over 11 years ago

@ kosta: What revision is this patch diff'ed against? revision d435fd8957 didn't introduce a value of 15.0f and master:HEAD doesn't have the comment at the top.

Actions #7

Updated by kostamarino over 11 years ago

Those lines have changed again since revision d435fd8957 but the result is the same, so i just used the lines previous to revision d435fd8957 changes to see if it works ok and it does.
Master does have that comment on the top:
http://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp

Actions #8

Updated by MayImilae about 11 years ago

  • Issue type set to Bug
  • Category set to gfx
Actions #9

Updated by NeoBrainX about 11 years ago

  • Status changed from New to Accepted

The dff provided by the OP renders fine in native dff player.

Actions #10

Updated by JMC4789 almost 11 years ago

Fixed in the Tev_Fixes_New branch.

Actions #11

Updated by jmuehldorfer almost 11 years ago

Afraid to say it is not working in tev_fixes_new (any more).
Strangely at one point it did, but I spent an hour trying to reproduce it, and could not make it.
However the "Bleach Versus Crusade" Projection Hack fixes it!
Maybe it could be included into the gameini?

Actions #12

Updated by JMC4789 over 10 years ago

Projection hacks are being removed not added; they don't fix anything, they're stupid, hacky work-arounds. If you want to use it on your own, that's fine, but the developers will continue to try to figure out why something's going wrong.

Actions #13

Updated by jmuehldorfer over 10 years ago

Yes, it is clearly not a solution of any kind.
I tested at least 20 tev_new builds from around January 5th, however I was not able to find the working combination of settings+revision.
Should I put this hack into the Wiki, or is it too "dirty" to be used by others.

Actions #14

Updated by JMC4789 over 10 years ago

  • Status changed from Accepted to Accepted

I, personally, don't see anything wrong with it being suggested/put into the wiki. I just don't see any projection hacks being added to Dolphin itself.

Moving back to accepted.

Actions #15

Updated by jmuehldorfer over 10 years ago

With the introduction of tev-new the issue is gone when setting fast depth calculation to off.
Maybe this could be included into the game ini?

Actions #16

Updated by kostamarino over 10 years ago

I will include it on the next pr for ini files and close this issue then.

Actions #17

Updated by NeoBrainX over 10 years ago

IIRC disabling fast depth did NOT fix the issue for me, so verify this report before adding stuff to the game ini, please.

Actions #18

Updated by kostamarino over 10 years ago

I did it before answering trying both video backends and it was fixed by disabling fast depth calc. Perhaps it is video vendor/driver dependent? I am using a 560 ti and 332.21 drivers.

Actions #19

Updated by jmuehldorfer over 10 years ago

I treid this with a completely new default config and only fast depth on/off as well as my config with more IR,AF etc.
I use a Gtx 660 with 319.60 driver on Ubuntu. Obviously I could only test OpenGl.

Actions #20

Updated by jmuehldorfer over 10 years ago

I created two FIFO logs of a scene with fast depth calculation on and off.
The one with fast depth calculation on has graphics problems.
The one with fast depth calculation off looks correct.
(Screenshots included)
https://drive.google.com/file/d/0B5rMgv2g-BxuNTJQQVByTmFjXzQ/edit?usp=sharing

Actions #21

Updated by kostamarino over 10 years ago

  • Status changed from Accepted to Fixed

Gameini has been updated, marked as fixed.

Actions

Also available in: Atom PDF