| 
                Last change
                  on this file since 12091 was
                  12091,
                  checked in by wiesep, 7 years ago
           | 
        
        
          | 
               
Updated programs and adjusted Material to work with GLSL>150 
 
           | 
        
        | 
            File size:
            379 bytes
           | 
      
      
        
  | Rev | Line |   | 
|---|
| [12091] | 1 | #version 100 | 
|---|
 | 2 |  | 
|---|
 | 3 | precision mediump int; | 
|---|
 | 4 | precision mediump float; | 
|---|
 | 5 |  | 
|---|
 | 6 | uniform sampler2D RT; | 
|---|
 | 7 | uniform sampler2D noise; | 
|---|
 | 8 | varying vec2 oUv0; | 
|---|
 | 9 | //varying vec2 oUv1; | 
|---|
 | 10 |  | 
|---|
 | 11 | void main() | 
|---|
 | 12 | { | 
|---|
 | 13 |         float c = dot(texture2D(RT, oUv0), vec4(0.30, 0.11, 0.59, 0.00)); | 
|---|
 | 14 |         float n = texture2D(noise, oUv0).r*2.0 - 1.0; | 
|---|
 | 15 |         c += n; | 
|---|
 | 16 |         if (c > 0.5) | 
|---|
 | 17 |         { | 
|---|
 | 18 |                 c = 0.0; | 
|---|
 | 19 |         } | 
|---|
 | 20 |         else | 
|---|
 | 21 |         { | 
|---|
 | 22 |                 c = 1.0; | 
|---|
 | 23 |         }    | 
|---|
 | 24 |         gl_FragColor = vec4(c,c,c,1.0); | 
|---|
 | 25 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.