|
|
fx是什?格式的?n案,哪?有fx?n案的?料?
#include <sas\sas.fxh>
int GlobalParameter : SasGlobal
<
int3 SasVersion = {1, 0, 0};
string SasEffectDescription = "HLSL Hands-On Workshop: Solid color";
string SasEffectCompany = "Microsoft Corporation";
>;
float4x4 World <string SasBindAddress = "Sas.Skeleton.MeshToJointToWorld[0]";>;
float4x4 View <string SasBindAddress = "Sas.Camera.WorldToView";>;
float4x4 Projection <string SasBindAddress = "Sas.Camera.Projection";>;
struct VSInput
{
float4 Position : POSITION;
};
struct VSOutput
{
float4 TransformedPosition : POSITION;
};
VSOutput VS( VSInput input )
{
VSOutput output;
// Transform to clip space by multiplying by the basic transform matrices.
output.TransformedPosition = mul(input.Position, mul(World, mul(View, Projection)));
return output;
}
float4 PS( VSOutput input ) : COLOR
{
float3 color = {0.2, 0.4, 0.8};
//float3 color = ?
// Set alpha to 1.0 and return
return float4(color, 1.0);
}
technique Earth
{
pass P0
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
|
|