| 
                Last change
                  on this file since 12412 was
                  12115,
                  checked in by wiesep, 7 years ago
           | 
        
        
          | 
               
Changed folder structure, deletet some unused files and cleaned up code 
 
           | 
        
        | 
            File size:
            881 bytes
           | 
      
      
        
  | Rev | Line |   | 
|---|
| [12115] | 1 | #version 150 | 
|---|
 | 2 |  | 
|---|
 | 3 | uniform vec4 random_fractions; | 
|---|
 | 4 | uniform vec4 heatBiasScale; | 
|---|
 | 5 | uniform vec4 depth_modulator; | 
|---|
 | 6 |  | 
|---|
 | 7 | uniform sampler2D Input;         // output of HeatVisionCaster_fp (NdotV) | 
|---|
 | 8 | uniform sampler2D NoiseMap; | 
|---|
 | 9 | uniform sampler2D HeatLookup; | 
|---|
 | 10 |  | 
|---|
 | 11 | // in vec4 diffuse; | 
|---|
 | 12 | in vec2 uv; | 
|---|
 | 13 | out vec4 fragColour; | 
|---|
 | 14 |  | 
|---|
 | 15 | void main() | 
|---|
 | 16 | { | 
|---|
 | 17 |     float depth, heat, interference; | 
|---|
 | 18 |  | 
|---|
 | 19 |     //  Output constant color: | 
|---|
 | 20 |     depth = texture( Input, uv ).x; | 
|---|
 | 21 |     depth *= (depth * depth_modulator).x; | 
|---|
 | 22 |  | 
|---|
 | 23 |     heat = (depth * heatBiasScale.y); | 
|---|
 | 24 |  | 
|---|
 | 25 |     // if (depth > 0) | 
|---|
 | 26 |     { | 
|---|
 | 27 |         interference = -0.5 + texture( NoiseMap, uv + vec2( random_fractions.x, random_fractions.y ) ).x; | 
|---|
 | 28 |         interference *= interference; | 
|---|
 | 29 |         interference *= 1.0 - heat; | 
|---|
 | 30 |         heat += interference;//+ heatBiasScale.x; | 
|---|
 | 31 |     } | 
|---|
 | 32 |  | 
|---|
 | 33 |     // Clamp UVs | 
|---|
 | 34 |     heat  = max( 0.005, min( 0.995, heat ) ); | 
|---|
 | 35 |     fragColour = texture( HeatLookup, vec2( heat, 0.0 ) ); | 
|---|
 | 36 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.