Changeset 2458 for GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl
- Timestamp:
- 06/24/07 10:58:31 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl
r2417 r2458 10 10 uniform sampler2D bumpMap : register(s1); 11 11 12 uniform float4 lightRange; 13 uniform float lightPower; 14 uniform float4 lightColor; 12 uniform float4 lightRange1; 13 uniform float lightPower1; 14 uniform float4 lightColor1; 15 16 uniform float4 lightRange2; 17 uniform float lightPower2; 18 uniform float4 lightColor2; 15 19 16 20 uniform float specularity; … … 27 31 float3 normal:TEXCOORD3; 28 32 float3 V: TEXCOORD4; 29 float3 L: TEXCOORD5; 33 float3 L1: TEXCOORD5; 34 float3 L2: TEXCOORD6; 30 35 }; 31 36 … … 36 41 float dist = length(IN.V); 37 42 float3 V = IN.V /dist; 38 float3 L = IN.L; 43 float3 L1 = IN.L1; 44 float3 L2 = IN.L2; 39 45 40 46 float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 41 42 Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 47 if(lightPower1 != 0) 48 Color += Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 49 if(lightPower2 != 0) 50 Color += Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 43 51 44 52 float4 ret = Color;
Note: See TracChangeset
for help on using the changeset viewer.