Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2018, 1:06:05 PM (6 years ago)
Author:
wiesep
Message:

Updated programs and adjusted Material to work with GLSL>150

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/Shader_HS18/programs/Example/GLSL150/LightToHeatFp.glsl

    r12083 r12091  
    99uniform sampler2D HeatLookup;
    1010
    11 in vec4 diffuse;
     11// in vec4 diffuse;
    1212in vec2 uv;
    1313out vec4 fragColour;
     
    1515void main()
    1616{
    17    float depth, heat, interference;
     17    float depth, heat, interference;
    1818
    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;
    2222
    23    heat = (depth * heatBiasScale.y);
     23    heat = (depth * heatBiasScale.y);
    2424
    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    }
     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    }
    3232
    33    // Clamp UVs
    34    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 ) );
    3636}
Note: See TracChangeset for help on using the changeset viewer.