Sign in to follow this  

HLSL Mipmapping on XBox360

Recommended Posts


My code runs perfectly on my computer. I have many shaders with samplers that look like
sampler2D diffuse_sampler = sampler_state {
Texture = (diffuse_texture);
MipFilter = LINEAR; MinFilter = MIN_MAG_MIP_LINEAR; MagFilter = LINEAR;
AddressU = CLAMP; AddressV = CLAMP;
When I make an XBox360 project, however, the compiler spits out:
(9): ID3DXEffectCompiler: State 'MINFILTER' does not accept 'MIN_MAG_MIP_LINEAR' as a value
ID3DXEffectCompiler: There was an error initializing the compiler [path]
Changing MinFilter to "LINEAR" satiates the compiler, and mipmapping still seems to work, but why the difference?


Share this post

Link to post
Share on other sites
'MIN_MAG_MIP_LINEAR' is a DirectX 10/11 style sampler state (part of the D3D10_FILTER and D3D11_FILTER enums).

Xbox 360 is Direct3D 9* so doesn't support those things. Look at the filter names in the D3D9 enum and you'll be safe. "LINEAR" for a mip filter (tri-linear) is supported right back to D3D7.

[* The hardware, the native D3D9 API, and the HLSL support on 360 do have a few D3D10 features, but it's expressed as extensions to the D3D9 API].

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