- Timestamp:
- Nov 9, 2018, 1:06:05 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/Shader_HS18/programs/Example/GLSL150/LightToHeatFp.glsl
r12083 r12091 9 9 uniform sampler2D HeatLookup; 10 10 11 in vec4 diffuse;11 // in vec4 diffuse; 12 12 in vec2 uv; 13 13 out vec4 fragColour; … … 15 15 void main() 16 16 { 17 float depth, heat, interference;17 float depth, heat, interference; 18 18 19 // Output constant color:20 depth = texture( Input, uv ).x;21 depth *= (depth * depth_modulator).x;19 // Output constant color: 20 depth = texture( Input, uv ).x; 21 depth *= (depth * depth_modulator).x; 22 22 23 heat = (depth * heatBiasScale.y);23 heat = (depth * heatBiasScale.y); 24 24 25 //if (depth > 0)26 {27 28 29 30 31 }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 32 33 // Clamp UVs34 heat = max( 0.005, min( 0.995, heat ) );35 fragColour = texture( HeatLookup, vec2( heat, 0.0 ) );33 // Clamp UVs 34 heat = max( 0.005, min( 0.995, heat ) ); 35 fragColour = texture( HeatLookup, vec2( heat, 0.0 ) ); 36 36 }
Note: See TracChangeset
for help on using the changeset viewer.