Changeset 2207


Ignore:
Timestamp:
03/08/07 11:44:30 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo/PRMDemo.material

    r2202 r2207  
    187187        } 
    188188} 
     189 
     190vertex_program GTP/EPDisplayVS hlsl 
     191{ 
     192   source PathMapWeightCompute.hlsl 
     193   entry_point EntryPointDisplayVS 
     194   target vs_2_0    
     195} 
     196fragment_program GTP/EPDisplayPS hlsl 
     197{ 
     198   source PathMapWeightCompute.hlsl 
     199   entry_point EntryPointDisplayPS 
     200   target ps_2_0    
     201} 
     202 
     203material GTP/PM/EPBillboards 
     204{ 
     205 technique 
     206 { 
     207   pass 
     208   { 
     209                polygon_mode points 
     210                point_size 10 
     211                vertex_program_ref GTP/EPDisplayVS 
     212                { 
     213                        param_named_auto worldViewProj worldviewproj_matrix      
     214                } 
     215                fragment_program_ref GTP/EPDisplayPS 
     216                { 
     217                } 
     218        texture_unit 
     219        {   
     220                filtering none    
     221        } 
     222   } 
     223  } 
     224} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/PMDemo/PathMapWeightCompute.hlsl

    r2202 r2207  
    2828    output.pos = input.pos; 
    2929    output.tex = input.tex; 
     30    output.tex.y = 1.0 - output.tex.y; 
    3031    return output; 
    3132} 
     
    6263        float4 ret = cosa * cosb; 
    6364 
     65        float ize = 0; 
     66        if(pos.z > 0) ize = 1; 
    6467        //return float4(lightDir + ret.x * 0.00000000001, 1); 
    65         return ret; 
    66         //return ret.x*0.0000000001 + 0.5; 
     68        //return ret; 
     69        return ret.x*0.0000000001 + ize; 
    6770} 
    6871 
     
    8184                float2 coord1 = float2((float)(currentEntryPoint % nRadionColumns)  / (float) nRadionColumns, 
    8285                                                                currentEntryPoint / (float) nRadionColumns / 4096.0) + hp; 
    83                 coord1.y = 1.0 - coord1.y; 
    8486                float2 coord2 = coord1 + float2(hp.x / 2.0, 0); 
    8587                float radrad = tex2Dlod(radionSampler, float4(coord2, 0, 0)).a; 
     
    99101        return weight; 
    100102} 
     103 
     104void EntryPointDisplayVS(float4 position :POSITION0, 
     105                                                 float4 color :COLOR0, 
     106                                                 uniform float4x4 worldViewProj, 
     107                                                 out float4 hPos:POSITION, 
     108                                                 out float2 texCoord: TEXCOORD0) 
     109{ 
     110        hPos = mul(worldViewProj, position); 
     111        texCoord = color.xy; 
     112} 
     113 
     114float4 EntryPointDisplayPS(float2 texCoord : TEXCOORD0, 
     115                                                        uniform sampler2D weightTexture : register(s0)):COLOR0 
     116{ 
     117        //return texCoord.y; 
     118        return tex2D(weightTexture, texCoord).r; 
     119} 
     120                                                          
Note: See TracChangeset for help on using the changeset viewer.