-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloader.fx
More file actions
81 lines (57 loc) · 1.17 KB
/
loader.fx
File metadata and controls
81 lines (57 loc) · 1.17 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
struct VS_INPUT
{
float4 Pos : POSITION0;
float2 Tex : TEXCOORD0;
};
struct PS_INPUT
{
float4 Pos : SV_POSITION;
float2 Tex : TEXCOORD0;
};
///
DepthStencilState DisableDepth
{
DepthEnable = FALSE;
};
RasterizerState SolidStateNoCull {
FillMode = SOLID;
CullMode =NONE;
};
BlendState NoBlending
{
BlendEnable[0] = FALSE;
};
///
float Time;
cbuffer constants
{
float K;
}
PS_INPUT VS( VS_INPUT input )
{
PS_INPUT output;
float cs = cos(Time);
float sn = sin(Time);
output.Pos = input.Pos;
output.Pos.x = (input.Pos.x * cs - input.Pos.y * sn)*K;
output.Pos.y = input.Pos.x * sn + input.Pos.y * cs;
output.Pos.w = 1;
output.Tex = input.Tex;
return output;
}
float4 PS( PS_INPUT input) : SV_Target
{
return float4(255,160,231,255)/255.0 * saturate(Time);
}
technique10 Render
{
pass P0
{
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetGeometryShader(NULL);
SetPixelShader( CompileShader( ps_4_0, PS() ) );
SetBlendState(NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFff );
SetRasterizerState(SolidStateNoCull);
SetDepthStencilState( DisableDepth, 0 );
}
}