Jump to content

  • Log In with Google      Sign In   
  • Create Account


My HLSL Not working on Xbox


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Subliminalman   Members   -  Reputation: 109

Like
0Likes
Like

Posted 16 November 2011 - 04:55 PM

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



Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 3203

Like
0Likes
Like

Posted 16 November 2011 - 05:22 PM

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...

#3 Subliminalman   Members   -  Reputation: 109

Like
0Likes
Like

Posted 16 November 2011 - 07:49 PM

The problem is when I put it to TEXCOORD1 it doesn't draw the thing at all. I'm trying to have it make a mask on the rendertarget to make it round.

#4 Nik02   Crossbones+   -  Reputation: 2643

Like
0Likes
Like

Posted 16 November 2011 - 10:25 PM

Well, do you output a TEXCOORD1 from the vertex shader too?

Niko Suni





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS