source:
GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/OGRE/IBRTreesOGRE/media/oldgeneral/depth_shadow_mapping_fp.shd
@
1493
Revision 1493, 336 bytes checked in by igarcia, 18 years ago (diff) |
---|
Rev | Line | |
---|---|---|
[1493] | 1 | float4 gambient; |
2 | sampler textureAlpha: register(s0); | |
3 | ||
4 | float4 main(float3 normal: TEXCOORD0, float3 lightVec: TEXCOORD1, float4 texCoord: TEXCOORD2) : COLOR | |
5 | { | |
6 | float depth = length(lightVec.xyz); | |
7 | if (tex2D(textureAlpha,texCoord).w > 0.0) | |
8 | { | |
9 | return float4(gambient.xyz,depth); | |
10 | } | |
11 | else | |
12 | { | |
13 | discard; | |
14 | } | |
15 | } | |
16 |
Note: See TracBrowser
for help on using the repository browser.