I've chosen not to use the content pipeline provided with GSE. How do I deploy my game assets to the 360 HD Is there a command line utility so that I can build it into my tools
That looks like you're telling fxc to compile a shader rather than an effect. Make sure you're specifying the fx_2_0 target profile.
fxc (the version shipped with the DX SDK) can only compile for Windows, though, not Xbox. To support both programs you need to use the EffectCompiler API that is part of the Windows XNA assembly.
Yes, I'm aware of that. Above is how I've done it in the past, which works fine on the PC. Now I'm trying to figure out what utility to use or where to put the assets to deploy them on the 360.
There's no problem with not using the content pipeline if you don't want to. System.IO is fully available on Xbox, so you can read whatever files you like. The content pipeline is entirely built on top of public functionality of the framework: there's nothing magic about it that you won't be able to replicate yourself.
Regarding effects, you do need some kind of build time pipeline to compile these for Xbox, whether ours or a replacement of your own. The effect compiler API is only available on Windows, so you need some kind of build time process to precompile all your effects.
My understanding is that due to the lack of the IO namespace, you don't have file access with XNA so all of your assets have to use the content pipleine to be converted to XNB files.
You will need to deal with little endian/big endian issues in order to make it cross platform since the 360 Processor is a Power PC Processor instead of an x86. With that said, I don't believe there is an easy way to do what you want without using the content pipeline. If you don't care about the 360 support, then its no problem doing things how you are. Even if you manage to get the content loading on the 360, I'd still be careful not using the content pipleine. Especailly since its been hinted that the XNA team is planning for a youtube like deployment scheme in the future. I would imagine that such a scheme would possibly require content to be done through the content pipeline. Just a thought or two to think about.
Just curious, why did you not use the content pipeline
There's a lot of joy to be had in creating game engines and pipelines but you shouldn't think that the content pipeline is removing that opportunity from you. The content pipeline is a framework, not something that replaces your own pipeline. Your maya exporter and level builder could be enhanced by working with the content pipeline. Just a thought.
I'm going to use streamreader to read in the compiled code. How do I compile my shader code I'm attempting to compile my hlsl code using fxc, but am getting the following error:
All folders under the output folder for your 360 project should get deployed along with the exe. Copy the assets folder to your 360 project, set the files' Copy to Output Directory property to Copy Always and you should be able to get it going.
I find more joy in creating the engine and pipeline than the actual game. I just wrote my own Maya exporter, and am working on a level builder. If I'm forced to use the pipeline, I will be canceling my Creator's Club membership very soon.
Since my files are plain text, endian shouldn't matter. But thanks for the tip, I'm sure that would have stopped me for weeks when I finally move to binary files.
Now to find out why CompiledEffect class doesn't exist in 360. Is there a way to compile it myself and load it without the pipeline
Deploying my own game assets
UncleSam89
fxc (the version shipped with the DX SDK) can only compile for Windows, though, not Xbox. To support both programs you need to use the EffectCompiler API that is part of the Windows XNA assembly.
jepptje
StephenWild
Regarding effects, you do need some kind of build time pipeline to compile these for Xbox, whether ours or a replacement of your own. The effect compiler API is only available on Windows, so you need some kind of build time process to precompile all your effects.
MWatts
Trent Saunders
-Nick
J Jakubik
Dot Net Engineer
You will need to deal with little endian/big endian issues in order to make it cross platform since the 360 Processor is a Power PC Processor instead of an x86. With that said, I don't believe there is an easy way to do what you want without using the content pipeline. If you don't care about the 360 support, then its no problem doing things how you are. Even if you manage to get the content loading on the 360, I'd still be careful not using the content pipleine. Especailly since its been hinted that the XNA team is planning for a youtube like deployment scheme in the future. I would imagine that such a scheme would possibly require content to be done through the content pipeline. Just a thought or two to think about.
Just curious, why did you not use the content pipeline
Abhishek_SE
There's a lot of joy to be had in creating game engines and pipelines but you shouldn't think that the content pipeline is removing that opportunity from you. The content pipeline is a framework, not something that replaces your own pipeline. Your maya exporter and level builder could be enhanced by working with the content pipeline. Just a thought.
Cheers,
Leaf.
equip
error X3501: 'main': entrypoint not found
Here's my code:
uniform extern float4x4 WorldViewProj : WORLDVIEWPROJECTION;
float4x4 world:WORLD;
float3 lightPos;
float4 material;
struct VS_OUTPUT
{
float4 position : POSITION;
float4 color : COLOR0;
};
VS_OUTPUT Transform(
float4 posWorld : POSITION0,
float3 inNormal: NORMAL0,
float2 inTxr: TEXCOORD0)
{
VS_OUTPUT Out = (VS_OUTPUT)0;
Out.position = mul(posWorld, WorldViewProj);
float3 posWorld2 = mul(posWorld, world).xyz;
float3 normal = mul(inNormal, world).xyz; //get the normal to world space
float3 light = normalize(lightPos - posWorld2); //calculating the light direction
float3 lightColor = float3(.2, .2, 0.2);
float lightIntensity = clamp(dot(normal, light), 0, 1);
float4 color = float4(lightColor*material*lightIntensity, 1.0f);
Out.color = clamp(color, 0, 1);
return Out;
}
void PixelShader(inout float4 color : COLOR0 )
{
}
technique TransformTechnique
{
pass P0
{
vertexShader = compile vs_3_0 Transform();
pixelShader = compile ps_3_0 PixelShader();
}
}
This code works fine if I use FX Composer or if I compile it on the fly with the CompiledEffect class.
Jayaram Ganapathy
Tridex
Since my files are plain text, endian shouldn't matter. But thanks for the tip, I'm sure that would have stopped me for weeks when I finally move to binary files.
Now to find out why CompiledEffect class doesn't exist in 360. Is there a way to compile it myself and load it without the pipeline
Jon Stelly
Don Isenor
Do you have the assets' Copy to Output Directory set to copy always
Kris Selden