Rev | Line | |
---|
[2269] | 1 |
|
---|
| 2 | struct PS_INPUT
|
---|
| 3 | {
|
---|
| 4 | float2 center: TEXCOORD0;
|
---|
| 5 | float radius :TEXCOORD1;
|
---|
| 6 | float4 color :TEXCOORD2;
|
---|
| 7 | float2 screenPos : VPOS;
|
---|
| 8 | };
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | struct PS_OUTPUT
|
---|
| 12 | {
|
---|
| 13 | float4 color: COLOR0;
|
---|
| 14 | };
|
---|
| 15 |
|
---|
| 16 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 17 |
|
---|
| 18 | sampler tex0: register(s0);
|
---|
| 19 |
|
---|
| 20 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 21 | // Pixelshader
|
---|
| 22 | // Profile: 3x0
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | PS_OUTPUT main(PS_INPUT input)
|
---|
| 27 | {
|
---|
| 28 |
|
---|
| 29 | float2 targetResolution = 128.0;
|
---|
| 30 |
|
---|
| 31 | PS_OUTPUT output;
|
---|
| 32 |
|
---|
| 33 | float2 screen = input.screenPos / targetResolution;
|
---|
| 34 | screen *= float2(2, 2);
|
---|
| 35 | screen -= float2(1, 1);
|
---|
| 36 | screen.y *= -1;
|
---|
| 37 |
|
---|
| 38 | float d = 1.0 - saturate(length(input.center - screen) / input.radius);
|
---|
| 39 | output.color = float4(d, d, d, 0.05);
|
---|
| 40 | //output.color = float4(screen.x, 0, 0, 1);
|
---|
| 41 | //output.color = 1.0;
|
---|
| 42 | return output;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.