Changeset 2984 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 10/01/08 01:10:22 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2982 r2984 48 48 float4 outColor; 49 49 50 //if (color.w > 1e19f) outColor = color;51 if (emmisive > 1.5f) outColor = color;50 if (position.w > 1e19f) outColor = color; 51 //if (emmisive > 1.5f) outColor = color; 52 52 else outColor = (ambient + diffuse) * color; 53 53 … … 181 181 182 182 // calc diffuse illumination + shadow term 183 if ((emmisive < 1.5f) // hack: prevent shadowing the sky 183 //if ((emmisive < 1.5f) // hack: prevent shadowing the sky 184 if ( 185 (position.w > 1e19f) 184 186 && (angle > 1e-3f) // shadow only if diffuse color has some minimum intensity 185 187 ) … … 200 202 201 203 // base lighting 202 OUT.color = (emmisive > 1.5f) ? color: (ambient + diffuse) * color; 204 //OUT.color = (emmisive > 1.5f) ? color: (ambient + diffuse) * color; 205 OUT.color = (position.w > 1e19f) ? color: (ambient + diffuse) * color; 203 206 204 207 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r2982 r2984 68 68 uniform sampler2D dirtTex, 69 69 uniform float maxDepth, 70 uniform sampler2D tex) 70 uniform sampler2D tex, 71 uniform float3 currentPos) 71 72 { 72 73 pixel pix; … … 93 94 94 95 // hack: squeeze some information about ambient into the texture 95 pix.col.w = glstate.material.emission.x;96 //pix.col.w = length(currentPos - IN.worldPos)96 //pix.col.w = glstate.material.emission.x; 97 pix.col.w = length(currentPos - IN.worldPos); 97 98 98 99 return pix; … … 100 101 101 102 102 pixel frag(fragin IN, 103 uniform float maxDepth) 103 pixel frag(fragin IN, uniform float maxDepth, uniform float3 currentPos) 104 104 { 105 105 pixel pix; … … 117 117 118 118 // hack: squeeze some information about the ambient term into the target 119 pix.col.w = glstate.material.emission.x; 119 //pix.col.w = glstate.material.emission.x; 120 pix.col.w = length(currentPos - IN.worldPos); 120 121 121 122 return pix;
Note: See TracChangeset
for help on using the changeset viewer.