Free Anisotropy Code + Options

Results 1 to 6 of 6
  1. #1
    RE:ℓσα∂є∂ Fenris is offline
    MemberRank
    Sep 2011 Join Date
    RE:ℓσα∂Location
    595Posts

    Free Anisotropy Code + Options

    Essentially this:

    PHP Code:
    #ifdef __ANISOTROPIC
    if (g_option.m_nAnisotropy == )
    {
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_LINEAR);
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_LINEAR);
    }

    else if (
    g_option.m_nAnisotropy && g_option.m_nAnisotropy )
    {
        
    int MaxAni;
        if (
    g_option.m_nAnisotropy == ) { 
            
    MaxAni 2; }
        else if (
    g_option.m_nAnisotropy ) {
            
    MaxAni 4; }
        else if (
    g_option.m_nAnisotropy ) {
            
    MaxAni 8; }
        else if (
    g_option.m_nAnisotropy ) {
            
    MaxAni 16; }

        
    d3dDevice->SetSamplerState(0D3DSAMP_MAXANISOTROPYMaxAni);
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_ANISOTROPIC);
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_ANISOTROPIC);
    }
    #else
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_LINEAR);
        
    d3dDevice->SetSamplerState(0D3DSAMP_MINFILTERD3DTEXF_LINEAR);
    #endif 

    HwOption.h
    Code:
    int m_nAnisotropy;
    You could figure out the rest from that. I would post the rest, but I'm not around any source codes to check.


  2. #2
    Not working on UnitedFlyf Mootie is offline
    MemberRank
    Apr 2009 Join Date
    1,589Posts

    Re: Free Anisotropy Code + Options

    Y U NO CHEK CAPz?????
    Last edited by Mootie; 13-09-13 at 08:25 PM.

  3. #3
    Enthusiast kmc11 is offline
    MemberRank
    Sep 2008 Join Date
    44Posts

    Re: Free Anisotropy Code + Options

    Code:
    #ifdef __ANISOTROPIC
    if (g_Option.m_nAnisotropy == 0 )
    {
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
    }
    else
    {
        int nMaxAni;
    
        if (g_option.m_nAnisotropy > 4 )
        {
             nMaxAni = 16;
        }
        else if(g_option.m_nAnisotropy > 3 )
        {
           nMaxAni = 8;
        }
        else if(g_option.m_nAnisotropy > 2 )
        {
             nMaxAni = 4;
        }
        else
        {
             nMaxAni = 2;
        }
    
        d3dDevice->SetSamplerState(0, D3DSAMP_MAXANISOTROPY, MaxAni);
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC);
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC);
    }
    #else
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
        d3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
    #endif

    Y U NO USE HUNGARIAN NOTATION? D;

  4. #4
    Enthusiast andreitajai is offline
    MemberRank
    May 2013 Join Date
    34Posts

    Re: Free Anisotropy Code + Options

    Sorry, but, what it do?

  5. #5
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: Free Anisotropy Code + Options

    use google for it and then you will come across the wiki of this xD.

  6. #6
    Not working on UnitedFlyf Mootie is offline
    MemberRank
    Apr 2009 Join Date
    1,589Posts

    Re: Free Anisotropy Code + Options

    Quote Originally Posted by Mootie View Post
    Y U NO CHEK CAPz?????
    http://msdn.microsoft.com/en-us/library/windows/desktop/bb172513(v=vs.110).aspx

    INCASE U NOT KNOW WAT I MEAN...



Advertisement