Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goldeneye texture of glasses in FILTER_LINEAR becomes FILTER_POINT when changing weapon #314

Open
GoogleCodeExporter opened this issue Sep 16, 2015 · 10 comments

Comments

@GoogleCodeExporter
Copy link

Describe your system:
 - Linux distribution: Win7
 - Machine type: 64-bit
 - Mupen64Plus version: 1.99.2 MSVC
 - Plugins used: RICE

For visual artifacts, give:
 - Goldeneye (E) [!]
 - MD5: CFF69B70A8AD674A0EFE5558765855C9
 - CRC: 414ca61 2e57b8aa

Look at the glass on goldeneye001Linear

I change my weapon, and for 2-3 frame there the glass is "FILTER_POINT":
goldeneye002point

In Render.cpp: SetTextureFilter:

    if( options.forceTextureFilter == FORCE_DEFAULT_FILTER )
    {
        switch(dwFilter)
        {
            case RDP_TFILTER_AVERAGE:   //?
            case RDP_TFILTER_BILERP:
                m_dwMinFilter = m_dwMagFilter = FILTER_LINEAR;
                break;
            case RDP_TFILTER_POINT:
                m_dwMinFilter = m_dwMagFilter = FILTER_LINEAR; //force linear
                break;
            default:
                break;
        }
    }
    else


And linear filter work during the weapon change!

Currently I'm there (RSP_Parser.cpp):

    if( gRDP.otherModeH != ((gfx->words.w0) & 0x0FFFFFFF) )
    {
        gRDP.otherModeH = ((gfx->words.w0) & 0x0FFFFFFF);

        uint32 dwTextFilt  =
(gRDP.otherModeH>>RSP_SETOTHERMODE_SHIFT_TEXTFILT)&0x3; //what is that???

CRender::g_pRender->SetTextureFilter(dwTextFilt<<RSP_SETOTHERMODE_SHIFT_TEXTFILT
);
    }

I don't know and understand why "dwTextFilt" seems to have a
RDP_TFILTER_POINT in it.

I've send a st0 file just behind the glass.

Is the bug exist on linux?

I suppose there is a disync between array of texture and the array of
filter.... (As usual, I say that wich luck...)

Original issue reported on code.google.com by [email protected] on 14 Jan 2010 at 3:09

Attachments:

@GoogleCodeExporter
Copy link
Author

OGLRender::ApplyTextureFilter() seems to be deprecated.
Maybe because of the OGLExtRender extension.

Original comment by [email protected] on 14 Jan 2010 at 5:34

@GoogleCodeExporter
Copy link
Author

Another pic very... strange...

Actually, There is only one glass wich is "Pixelized":

Original comment by [email protected] on 14 Jan 2010 at 5:51

Attachments:

@GoogleCodeExporter
Copy link
Author

lol anothers with save state:
1)With gun
2)Change weapon (for mines)


Original comment by [email protected] on 15 Jan 2010 at 9:41

Attachments:

@GoogleCodeExporter
Copy link
Author

I have the impression that it also depend of the angle...
I know, it's a lot of screen but if someone can have a idea from wich part of 
the
code this could happen because I can not find the problem... :(

Original comment by [email protected] on 15 Jan 2010 at 9:56

Attachments:

@GoogleCodeExporter
Copy link
Author

Interesting...

In RSP_GBI0.h

void RSP_GBI0_Tri4(Gfx *gfx)
{
[...]
            //bVisible = IsTriangleVisible(v0, v2, v1);
            bVisible = 1; //force to think all tri are visible
[...]

And now, I don't have "unfiltered texture". No prob...

Original comment by [email protected] on 15 Jan 2010 at 11:55

@GoogleCodeExporter
Copy link
Author

In RenderBase.cpp

bool IsTriangleVisible(uint32 dwV0, uint32 dwV1, uint32 dwV2)
{
[...]
#ifdef ENABLE_CLIP_TRI
    //if( gRSP.bRejectVtx && (g_clipFlag[dwV0]|g_clipFlag[dwV1]|g_clipFlag[dwV2]) ) 
    //  return;
    if( g_clipFlag2[dwV0]&g_clipFlag2[dwV1]&g_clipFlag2[dwV2] )
    {
        //DebuggerAppendMsg("Clipped");
        //return false;
        return true; //force this to return true
    }
#endif
[...]

It work when I force this, I have no "unfiltered textures"...

Very stange. That would mean Renderer render textures even if there are 
considered as
invisible but not filter them?

I go back to my last code and make a test:
RSp_GBIO.h
//bVisible = IsTriangleVisible(v0, v2, v1);
bVisible = 0;

/*See picture*/

No It's ok, not perfect but ok.

So, the:
if( g_clipFlag2[dwV0]&g_clipFlag2[dwV1]&g_clipFlag2[dwV2] )
Could the prob...

Original comment by [email protected] on 15 Jan 2010 at 12:07

Attachments:

@GoogleCodeExporter
Copy link
Author

    if( g_clipFlag2[dwV0]&g_clipFlag2[dwV1]&g_clipFlag2[dwV2] )
    {
        //DebuggerAppendMsg("Clipped");
        return false;
    }

If I understand well, if any of the vertex is on screenspace, it return 
(isVisible)
false? o_O

Original comment by [email protected] on 15 Jan 2010 at 3:05

@GoogleCodeExporter
Copy link
Author

After tests, this prob seems to only happen when you load a save state...

Original comment by [email protected] on 15 Jan 2010 at 4:35

@GoogleCodeExporter
Copy link
Author

What exactly is the problem here?  Is this a visual artifact?

Original comment by [email protected] on 19 Jan 2010 at 3:22

  • Changed title: Goldeneye texture of glasses in FILTER_LINEAR becomes FILTER_POINT when changing weapon
  • Added labels: OpSys-Win-64

@GoogleCodeExporter
Copy link
Author

I've got this:
goldeneye004another.png
I change weapon and I've got this:
goldeneye005another.png
(A texture is not filtered, visual artefact).

Another:
I've got this:
goldeneye006angle.png
(Texture is filtered)
I rotate the player a little and I've got this:
goldeneye007angle.png
(The texture is not filtered, visual artefact)

I hope it can help you.

I'd try to debug it but can't. Don't know where in the code it can append.

Dorian

Original comment by [email protected] on 20 Jan 2010 at 10:01

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

No branches or pull requests

1 participant