~ubuntu-branches/ubuntu/vivid/meshlab/vivid

« back to all changes in this revision

Viewing changes to meshlab/src/fgt/decorate_shadow/shader/sm/object.frag

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-10-08 16:40:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091008164041-0c2ealqv8b8uc20c
Tags: 1.2.2-1
* New upstream version
* Do not build filter_isoparametrization because liblevmar dependency
  is not (yet) in Debian
* Fix compilation with gcc-4.4, thanks to Jonathan Liu for the patch
  (closes: #539544)
* rules: Add compiler variables to the qmake call (for testing with new
  GCC versions)
* io_3ds.pro: Make LIBS and INCLUDEPATH point to Debian version of lib3ds
* io_epoch.pro: Make LIBS point to Debian version of libbz2
* control:
  - Move Homepage URL to the source package section
  - Update to standards-version 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
uniform mat4 mvpl;
 
2
uniform sampler2DShadow shadowMap;
 
3
varying vec4 pPos;
 
4
 
 
5
void main(){
 
6
    vec4 shadowCoord = mvpl * pPos;
 
7
    //shadow2DProj fa automaticamente la divisione prospettica..al momento siamo in ortografica e nn serve
 
8
    shadowCoord.xyz = shadowCoord.xyz * 0.5 + 0.5;
 
9
    float sh = shadow2D(shadowMap, shadowCoord.xyz).x;
 
10
    if (sh > 0.4)
 
11
      discard;
 
12
    //else
 
13
    gl_FragColor = vec4(vec3(sh), (0.5-sh));
 
14
}
 
 
b'\\ No newline at end of file'