SND\AstrorEnales_cp 0ef016dc71 - Finished Dx10, Dx11 and Metro AlphaTest.fx and EnvironmentMap.fx shader
- Implemented AlphaTestEffect and EnvironmentMapEffect classes
- Added a lightmap.png and improved the DualTextureSample to show the real deal
- Removed old Metro configurations from csproj-files and converted them anew
- Added DualTextureSample to SampleCatalog.xml
- Fixed a compile error in the PsVitaGameTimer
- PsVitaConverter now removes the not available System.Net reference from projects
2012-09-09 07:55:45 +00:00

53 lines
1.3 KiB
HLSL

// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
uniform extern float4x4 World;
uniform extern float4x4 View;
uniform extern float4x4 Projection;
uniform extern float4x4 WorldViewProj;
uniform extern float4x4 WorldInverseTranspose;
Texture2D<float4> Texture : register(t0);
sampler TextureSampler : register(s0);
struct VertexShaderInput
{
float4 Position : POSITION0;
float3 Normal : NORMAL;
float2 TexCoord : TEXCOORD0;
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float3 Normal : NORMAL;
float2 TexCoord : TEXCOORD0;
};
VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{
VertexShaderOutput output;
output.Position = mul(input.Position, WorldViewProj);
output.Normal = normalize(mul(input.Normal.xyz, (float3x3)WorldInverseTranspose));
output.TexCoord = input.TexCoord;
return output;
}
float4 PixelShaderFunction(VertexShaderOutput input) : SV_TARGET
{
return Texture.Sample(TextureSampler, input.TexCoord);
}
technique10 Technique1
{
pass Pass1
{
VertexShader = compile vs_4_0 VertexShaderFunction();
PixelShader = compile ps_4_0 PixelShaderFunction();
}
}