- Timestamp:
- 09/24/08 11:08:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2967 r2968 37 37 float3 lightDir) 38 38 { 39 /*40 float4 lightDir2 = float4(-0.5f, 0.5f, 0.4f, 0.0f);41 float3 light2 = normalize(lightDir2.xyz);42 float diffuseLight2 = saturate(dot(normal, light2));43 */44 39 // diffuse intensity 45 40 const float angle = saturate(dot(normal, lightDir)); … … 51 46 const float4 ambient = glstate.light[0].ambient; 52 47 53 return (emmisive < 0.95) ? (ambient + diffuse) * color : color;48 float4 outColor; 54 49 55 //return (saturate(((ambient + diffuse))) * (1.0f - emmisive) + emmisive) * color; 50 if (emmisive > 1.5) outColor = color; 51 //else if (emmisive > 0.95) outColor = color * lightDiffuse; 52 else 53 outColor = (ambient + diffuse) * color; 54 55 return outColor; 56 56 //return saturate((((ambient + diffuse)) * (1.0f - emmisive) + emmisive) * color); 57 57 } … … 82 82 83 83 OUT.color = col; 84 //OUT.color = float4(100.0, 1, 1, 0); 84 85 OUT.color.w = color.w; 85 86 … … 123 124 } 124 125 125 total_d /= (float)NUM_ SAMPLES;126 total_d /= (float)NUM_PCF_TABS; 126 127 127 128 return total_d; … … 182 183 183 184 // base lighting 184 OUT.color = (emmisive < 0.95) ? (ambient + diffuse) * color :color;185 OUT.color = (emmisive > 1.5f) ? color: (ambient + diffuse) * color; 185 186 186 187 // also write out depth component
Note: See TracChangeset
for help on using the changeset viewer.