source: GTP/trunk/App/Demos/Illum/PathMap/dots.fx @ 896

Revision 896, 1.4 KB checked in by szirmay, 18 years ago (diff)
Line 
1float4x4 worldToProjMatrix;
2
3float aClusterWeight;
4
5struct vsInputDots
6{
7    float4      pos                     : POSITION;
8    float3      rad                     : NORMAL;   
9};
10
11struct vsOutputDots
12{
13    float4      pos                     : POSITION;
14    float3      rad                     : NORMAL;
15    float4      worldPos        : TEXCOORD0;       
16};
17
18vsOutputDots
19        vsDots(vsInputDots input)
20{
21    vsOutputDots output = (vsOutputDots)0;
22    output.worldPos = input.pos;
23    output.pos = mul(input.pos, worldToProjMatrix);
24    output.pos.z -= 0.0001;
25    output.rad = input.rad;
26    return output;
27}
28
29float4
30        psDots(vsOutputDots input) : COLOR0
31{
32//      return 1;
33//      return float4(input.rad, 1);
34        float4 ret;
35/*      float3 lightToPos = input.worldPos - lightPos;
36        float mapDepth = texCUBE(depthCubeSampler,lightToPos).r * depthMapCuttingSphere;
37        float actualDepth = length(lightToPos);
38
39        if(mapDepth >= actualDepth - 0.1)
40                ret = float4(1, 0.5, 0, 1);
41        else */
42//              ret = float4(1, 0, 1, 1);
43//      ret = float4(frac(aClusterWeight * 3.14), frac(aClusterWeight * 13.3), frac(aClusterWeight * 7.1) , 1.0);
44        ret = float4(aClusterWeight * 1000.0, aClusterWeight * 400.0, aClusterWeight * 100.0, 1.0);
45//      ret = float4(aClusterWeight % 2, aClusterWeight % 3 / 2.0, aClusterWeight % 5 / 4.0, 1.0);
46//      ret = float4(aClusterWeight, aClusterWeight, aClusterWeight, 1.0);
47
48        return ret;
49}
50
51technique Dots{
52        pass P0
53    {
54        VertexShader = compile vs_3_0 vsDots();
55        PixelShader  = compile ps_3_0 psDots();
56    }
57}
Note: See TracBrowser for help on using the repository browser.