-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomUI.fx
54 lines (45 loc) · 1.48 KB
/
CustomUI.fx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//--------------------------------------------------------------------------------------
// File: CustomUI.fx
//
// The effect file for the CustomUI sample.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
// Global variables
//--------------------------------------------------------------------------------------
float g_fTime; // App's time in seconds
float4x4 g_mWorld; // World matrix for object
float4x4 g_mWorldViewProjection; // World * View * Projection matrix
texture g_txScene;
sampler g_samScene =
sampler_state
{
Texture = <g_txScene>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Point;
};
void VertScene( float4 Pos : POSITION,
float2 Tex : TEXCOORD0,
out float4 oPos : POSITION,
out float2 oTex : TEXCOORD0 )
{
oPos = mul( Pos, g_mWorldViewProjection );
oTex = Tex;
}
float4 PixScene( float2 Tex : TEXCOORD0 ) : COLOR0
{
return tex2D( g_samScene, Tex );
}
//--------------------------------------------------------------------------------------
// Techniques
//--------------------------------------------------------------------------------------
technique RenderScene
{
pass P0
{
VertexShader = compile vs_2_0 VertScene();
PixelShader = compile ps_2_0 PixScene();
}
}