Show More
Commit Description:
Various UI improvements.
Commit Description:
Various UI improvements.
References:
File last commit:
Show/Diff file:
Action:
FNA/src/Graphics/Effect/StockEffects/HLSL/SpriteEffect.fx
44 lines | 1.0 KiB | text/plain | TextLexer
44 lines | 1.0 KiB | text/plain | TextLexer
r0 | //----------------------------------------------------------------------------- | |||
// SpriteEffect.fx | ||||
// | ||||
// Microsoft XNA Community Game Platform | ||||
// Copyright (C) Microsoft Corporation. All rights reserved. | ||||
//----------------------------------------------------------------------------- | ||||
#include "Macros.fxh" | ||||
DECLARE_TEXTURE(Texture, 0); | ||||
BEGIN_CONSTANTS | ||||
MATRIX_CONSTANTS | ||||
float4x4 MatrixTransform _vs(c0) _cb(c0); | ||||
END_CONSTANTS | ||||
void SpriteVertexShader(inout float4 color : COLOR0, | ||||
inout float2 texCoord : TEXCOORD0, | ||||
inout float4 position : SV_Position) | ||||
{ | ||||
position = mul(position, MatrixTransform); | ||||
} | ||||
float4 SpritePixelShader(float4 color : COLOR0, | ||||
float2 texCoord : TEXCOORD0) : SV_Target0 | ||||
{ | ||||
return SAMPLE_TEXTURE(Texture, texCoord) * color; | ||||
} | ||||
technique SpriteBatch | ||||
{ | ||||
pass | ||||
{ | ||||
VertexShader = compile vs_2_0 SpriteVertexShader(); | ||||
PixelShader = compile ps_2_0 SpritePixelShader(); | ||||
} | ||||
} | ||||