Sign in to follow this  
GambitSnax

Texture CAPS checking

Recommended Posts

GambitSnax    122
I've setup my program so it tests for each of the texture states used within the program. For instance, if my program used a shader with a sampler_state of this definition - sampler TextureTri = sampler_state { Texture = <g_texture>; MinFilter = LINEAR; MagFilter = LINEAR; MipFilter = LINEAR; AddressU = CLAMP; AddressV = CLAMP; }; i would test the caps for each of the settings -
    static DWORD dwTextureFilterCaps =  D3DPTFILTERCAPS_MINFLINEAR |
                                        D3DPTFILTERCAPS_MIPFLINEAR |
                                        D3DPTFILTERCAPS_MAGFLINEAR;

    // check support for the each sampler state mode used in the shader
    if ((pCaps->TextureFilterCaps & dwTextureFilterCaps) != dwTextureFilterCaps)
        return false;

is this the correct approach? The reason I ask is, one of my shaders uses a texture which has - MagFilter = ANISOTROPIC. Before I put the check in for it - D3DPTFILTERCAPS_MAGFANISOTROPIC, the program ran fine(it ran on a HAL device). When I did put the check in however, my computer said it doesn't support that feature and I have to run it with a REF device. I'm confused as to why it does this. If the program ran fine before, did that mean it wasn't running in true MagFilter = ANISOTROPIC mode? I tried it on a friends computer and without the checks, it just dies saying the features aren't supported, and with them, it only runs in REF mode. Any suggestions would be great. Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this