Jump to content
  • Advertisement
Sign in to follow this  
Subliminalman

My HLSL Not working on Xbox

This topic is 2584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I wrote this HLSL shader to create a mask from two textures. It works great on Windows but doesn't even want to compile for Xbox.Can someone tell me how to achieve the same effect so it could work both on Xbox and Windows.

Here is the error I receive




Error 1 Errors compiling C:\Users\Ryan\Desktop\ImFalling\ImFalling\ImFallingContent\Shaders\viewMask.fx:
(19): error X3513: technique Technique1, pass Pass1: Microcode Compiler Duplicated input semantics can't change type, size, or layout ('TEXCOORD0').










texture spherePort;
texture mask;

sampler TextureSamplerSphere = sampler_state
{
Texture = <spherePort>;
};

sampler TextureSamplerMask = sampler_state
{
Texture = <mask>;
};



//This is where I get the error
float4 PixelShaderFunction(float2 TextureCoordinateSphere : TEXCOORD0, float2 TextureCoordinateMask :TEXCOORD0 ) : COLOR0
{



return tex2D(TextureSamplerSphere, TextureCoordinateSphere) * tex2D(TextureSamplerMask, TextureCoordinateMask);
}

technique Technique1
{
pass Pass1
{

PixelShader = compile ps_2_0 PixelShaderFunction();
}
}







Any help would be most appreciated

Share this post


Link to post
Share on other sites
Advertisement
The error pretty much tells you the problem. You're using the TEXCOORD0 semantic for both of your inputs. You need to use TEXCOORD0 and TEXCOORD1 for instance. Of course, they have to match the values you expect from your vertex shader...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!