<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GLSL problems with latest HD graphics in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/GLSL-problems-with-latest-HD-graphics/m-p/320124#M17588</link>
    <description>&lt;P&gt;I have some relatively simple  GLSL shaders used for CAE visualization. They basically interpolate colors in HSV space (from blue-&amp;gt;red) based on a single value varying from 0-1. Works great on every nVidia and ATI card. Fails on all Intel HD including latest drivers as the color gets clamped to blue no matter what the varying value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;uniform float t;&lt;/P&gt;
&lt;P&gt;uniform float scale;&lt;/P&gt;
&lt;P&gt;uniform float maxP;&lt;/P&gt;
&lt;P&gt;uniform float minP;&lt;/P&gt;
&lt;P&gt;uniform vec3 min_hsl_color;&lt;/P&gt;
&lt;P&gt;uniform vec3 max_hsl_color;&lt;/P&gt;
&lt;P&gt;attribute float color_flag;&lt;/P&gt;
&lt;P&gt;attribute float P;&lt;/P&gt;
&lt;P&gt;varying vec4 color;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 RGBToHSL(vec3 color)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    vec3 hsl; // init to 0 to avoid warnings ? (and reverse if + remove first part)&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    float fmin = min(min(color.r, color.g), color.b);    //Min. value of RGB&lt;/P&gt;
&lt;P&gt;    float fmax = max(max(color.r, color.g), color.b);    //Max. value of RGB&lt;/P&gt;
&lt;P&gt;    float delta = fmax - fmin;             //Delta RGB value&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    hsl.z = (fmax + fmin) / 2.0; // Luminance&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    if (delta == 0.0)        //This is a gray, no chroma...&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        hsl.x = 0.0;    // Hue&lt;/P&gt;
&lt;P&gt;        hsl.y = 0.0;    // Saturation&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;    else                                    //Chromatic data...&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        if (hsl.z &amp;lt; 0.5)&lt;/P&gt;
&lt;P&gt;            hsl.y = delta / (fmax + fmin); // Saturation&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;            hsl.y = delta / (2.0 - fmax - fmin); // Saturation&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;        float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;        float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if (color.r == fmax )&lt;/P&gt;
&lt;P&gt;            hsl.x = deltaB - deltaG; // Hue&lt;/P&gt;
&lt;P&gt;        else if (color.g == fmax)&lt;/P&gt;
&lt;P&gt;            hsl.x = (1.0 / 3.0) + deltaR - deltaB; // Hue&lt;/P&gt;
&lt;P&gt;        else if (color.b == fmax)&lt;/P&gt;
&lt;P&gt;            hsl.x = (2.0 / 3.0) + deltaG - deltaR; // Hue&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if (hsl.x &amp;lt; 0.0)&lt;/P&gt;
&lt;P&gt;            hsl.x += 1.0; // Hue&lt;/P&gt;
&lt;P&gt;        else if (hsl.x &amp;gt; 1.0)&lt;/P&gt;
&lt;P&gt;            hsl.x -= 1.0; // Hue&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    return hsl;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;float HueToRGB(float f1, float f2, float hue)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    if (hue &amp;lt; 0.0)&lt;/P&gt;
&lt;P&gt;        hue += 1.0;&lt;/P&gt;
&lt;P&gt;    else if (hue &amp;gt; 1.0)&lt;/P&gt;
&lt;P&gt;        hue -= 1.0;&lt;/P&gt;
&lt;P&gt;    float res;&lt;/P&gt;
&lt;P&gt;    if ((6.0 * hue) &amp;lt; 1.0)&lt;/P&gt;
&lt;P&gt;        res = f1 + (f2 - f1) * 6.0 * hue;&lt;/P&gt;
&lt;P&gt;    else if ((2.0 * hue) &amp;lt; 1.0)&lt;/P&gt;
&lt;P&gt;        res = f2;&lt;/P&gt;
&lt;P&gt;    else if ((3.0 * hue) &amp;lt; 2.0)&lt;/P&gt;
&lt;P&gt;        res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0;&lt;/P&gt;
&lt;P&gt;    else&lt;/P&gt;
&lt;P&gt;        res = f1;&lt;/P&gt;
&lt;P&gt;    return res;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 HSLToRGB(vec3 hsl)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    vec3 rgb;&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    if (hsl.y == 0.0)&lt;/P&gt;
&lt;P&gt;        rgb = vec3(hsl.z); // Luminance&lt;/P&gt;
&lt;P&gt;    else&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        float f2;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        if (hsl.z &amp;lt; 0.5)&lt;/P&gt;
&lt;P&gt;            f2 = hsl.z * (1.0 + hsl.y);&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;            f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z);&lt;/P&gt;
&lt;P&gt;           &lt;/P&gt;
&lt;P&gt;        float f1 = 2.0 * hsl.z - f2;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        rgb.r = HueToRGB(f1, f2, hsl.x + (1.0/3.0));&lt;/P&gt;
&lt;P&gt;        rgb.g = HueToRGB(f1, f2, hsl.x);&lt;/P&gt;
&lt;P&gt;        rgb.b= HueToRGB(f1, f2, hsl.x - (1.0/3.0));&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    return rgb;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 interphsl(float frac,vec3 LoColor, vec3 HiColor)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if ( frac &amp;gt; 1.0 )&lt;/P&gt;
&lt;P&gt;          frac = 1.0;&lt;/P&gt;
&lt;P&gt;     &lt;/P&gt;
&lt;P&gt;        if ( frac &amp;lt; 0.0 )&lt;/P&gt;
&lt;P&gt;          frac = 0.0;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        // Apply fractional distance in HSV color space to find color&lt;/P&gt;
&lt;P&gt;        // Note that dS, dL, and dH may all be either + or -&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        float dS = HiColor.y - LoColor.y;&lt;/P&gt;
&lt;P&gt;        float dL = HiColor.z      - LoColor.z;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float s = LoColor.y + ( dS * frac );&lt;/P&gt;
&lt;P&gt;        float l = LoColor.z + ( dL * frac );&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float dir = 1.0;&lt;/P&gt;
&lt;P&gt;        float dH = HiColor.x - LoColor.x;&lt;/P&gt;
&lt;P&gt;        if ( abs( dH ) &amp;lt; 0.5 )&lt;/P&gt;
&lt;P&gt;        {&lt;/P&gt;
&lt;P&gt;          if ( dH &amp;gt; 0.0 )&lt;/P&gt;
&lt;P&gt;              dH = 1.0 - dH;&lt;/P&gt;
&lt;P&gt;            else&lt;/P&gt;
&lt;P&gt;              dH = abs( dH ) - 1.0;&lt;/P&gt;
&lt;P&gt;           &lt;/P&gt;
&lt;P&gt;            dir = -1.0;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;        float h = LoColor.x + ( dir * dH * frac );&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        // Limit h to range of 0-360&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        if ( h &amp;lt; 0.0 )&lt;/P&gt;
&lt;P&gt;          h += 1.0;&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;        {&lt;/P&gt;
&lt;P&gt;          if ( h &amp;gt; 1.0 )&lt;/P&gt;
&lt;P&gt;        h -= 1.0;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;        // Now make a color to return&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        vec3 result= vec3( h, s, l );&lt;/P&gt;
&lt;P&gt;        return result;&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;  void main(void)&lt;/P&gt;
&lt;P&gt;  {&lt;/P&gt;
&lt;P&gt;    gl_Position =    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;  if(color_flag&amp;gt;0.0){&lt;/P&gt;
&lt;P&gt;      P=abs(P);&lt;/P&gt;
&lt;P&gt;      float theMax=max(maxP,abs(minP));&lt;/P&gt;
&lt;P&gt;      float len=(P)/(theMax);&lt;/P&gt;
&lt;P&gt;    vec3 interp_hsl_color = interphsl(len*abs(t),min_hsl_color,max_hsl_color);&lt;/P&gt;
&lt;P&gt;       vec3 rgbcol=HSLToRGB(interp_hsl_color);&lt;/P&gt;
&lt;P&gt;         color=vec4(rgbcol,1.0);&lt;/P&gt;
&lt;P&gt;        }else{&lt;/P&gt;
&lt;P&gt;        color=gl_Color;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;  }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2013 18:11:56 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2013-03-29T18:11:56Z</dc:date>
    <item>
      <title>GLSL problems with latest HD graphics</title>
      <link>https://community.intel.com/t5/Graphics/GLSL-problems-with-latest-HD-graphics/m-p/320124#M17588</link>
      <description>&lt;P&gt;I have some relatively simple  GLSL shaders used for CAE visualization. They basically interpolate colors in HSV space (from blue-&amp;gt;red) based on a single value varying from 0-1. Works great on every nVidia and ATI card. Fails on all Intel HD including latest drivers as the color gets clamped to blue no matter what the varying value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;uniform float t;&lt;/P&gt;
&lt;P&gt;uniform float scale;&lt;/P&gt;
&lt;P&gt;uniform float maxP;&lt;/P&gt;
&lt;P&gt;uniform float minP;&lt;/P&gt;
&lt;P&gt;uniform vec3 min_hsl_color;&lt;/P&gt;
&lt;P&gt;uniform vec3 max_hsl_color;&lt;/P&gt;
&lt;P&gt;attribute float color_flag;&lt;/P&gt;
&lt;P&gt;attribute float P;&lt;/P&gt;
&lt;P&gt;varying vec4 color;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 RGBToHSL(vec3 color)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    vec3 hsl; // init to 0 to avoid warnings ? (and reverse if + remove first part)&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    float fmin = min(min(color.r, color.g), color.b);    //Min. value of RGB&lt;/P&gt;
&lt;P&gt;    float fmax = max(max(color.r, color.g), color.b);    //Max. value of RGB&lt;/P&gt;
&lt;P&gt;    float delta = fmax - fmin;             //Delta RGB value&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    hsl.z = (fmax + fmin) / 2.0; // Luminance&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    if (delta == 0.0)        //This is a gray, no chroma...&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        hsl.x = 0.0;    // Hue&lt;/P&gt;
&lt;P&gt;        hsl.y = 0.0;    // Saturation&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;    else                                    //Chromatic data...&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        if (hsl.z &amp;lt; 0.5)&lt;/P&gt;
&lt;P&gt;            hsl.y = delta / (fmax + fmin); // Saturation&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;            hsl.y = delta / (2.0 - fmax - fmin); // Saturation&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;        float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;        float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if (color.r == fmax )&lt;/P&gt;
&lt;P&gt;            hsl.x = deltaB - deltaG; // Hue&lt;/P&gt;
&lt;P&gt;        else if (color.g == fmax)&lt;/P&gt;
&lt;P&gt;            hsl.x = (1.0 / 3.0) + deltaR - deltaB; // Hue&lt;/P&gt;
&lt;P&gt;        else if (color.b == fmax)&lt;/P&gt;
&lt;P&gt;            hsl.x = (2.0 / 3.0) + deltaG - deltaR; // Hue&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if (hsl.x &amp;lt; 0.0)&lt;/P&gt;
&lt;P&gt;            hsl.x += 1.0; // Hue&lt;/P&gt;
&lt;P&gt;        else if (hsl.x &amp;gt; 1.0)&lt;/P&gt;
&lt;P&gt;            hsl.x -= 1.0; // Hue&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    return hsl;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;float HueToRGB(float f1, float f2, float hue)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    if (hue &amp;lt; 0.0)&lt;/P&gt;
&lt;P&gt;        hue += 1.0;&lt;/P&gt;
&lt;P&gt;    else if (hue &amp;gt; 1.0)&lt;/P&gt;
&lt;P&gt;        hue -= 1.0;&lt;/P&gt;
&lt;P&gt;    float res;&lt;/P&gt;
&lt;P&gt;    if ((6.0 * hue) &amp;lt; 1.0)&lt;/P&gt;
&lt;P&gt;        res = f1 + (f2 - f1) * 6.0 * hue;&lt;/P&gt;
&lt;P&gt;    else if ((2.0 * hue) &amp;lt; 1.0)&lt;/P&gt;
&lt;P&gt;        res = f2;&lt;/P&gt;
&lt;P&gt;    else if ((3.0 * hue) &amp;lt; 2.0)&lt;/P&gt;
&lt;P&gt;        res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0;&lt;/P&gt;
&lt;P&gt;    else&lt;/P&gt;
&lt;P&gt;        res = f1;&lt;/P&gt;
&lt;P&gt;    return res;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 HSLToRGB(vec3 hsl)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;    vec3 rgb;&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    if (hsl.y == 0.0)&lt;/P&gt;
&lt;P&gt;        rgb = vec3(hsl.z); // Luminance&lt;/P&gt;
&lt;P&gt;    else&lt;/P&gt;
&lt;P&gt;    {&lt;/P&gt;
&lt;P&gt;        float f2;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        if (hsl.z &amp;lt; 0.5)&lt;/P&gt;
&lt;P&gt;            f2 = hsl.z * (1.0 + hsl.y);&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;            f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z);&lt;/P&gt;
&lt;P&gt;           &lt;/P&gt;
&lt;P&gt;        float f1 = 2.0 * hsl.z - f2;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        rgb.r = HueToRGB(f1, f2, hsl.x + (1.0/3.0));&lt;/P&gt;
&lt;P&gt;        rgb.g = HueToRGB(f1, f2, hsl.x);&lt;/P&gt;
&lt;P&gt;        rgb.b= HueToRGB(f1, f2, hsl.x - (1.0/3.0));&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;   &lt;/P&gt;
&lt;P&gt;    return rgb;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vec3 interphsl(float frac,vec3 LoColor, vec3 HiColor)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;        if ( frac &amp;gt; 1.0 )&lt;/P&gt;
&lt;P&gt;          frac = 1.0;&lt;/P&gt;
&lt;P&gt;     &lt;/P&gt;
&lt;P&gt;        if ( frac &amp;lt; 0.0 )&lt;/P&gt;
&lt;P&gt;          frac = 0.0;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        // Apply fractional distance in HSV color space to find color&lt;/P&gt;
&lt;P&gt;        // Note that dS, dL, and dH may all be either + or -&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        float dS = HiColor.y - LoColor.y;&lt;/P&gt;
&lt;P&gt;        float dL = HiColor.z      - LoColor.z;&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float s = LoColor.y + ( dS * frac );&lt;/P&gt;
&lt;P&gt;        float l = LoColor.z + ( dL * frac );&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        float dir = 1.0;&lt;/P&gt;
&lt;P&gt;        float dH = HiColor.x - LoColor.x;&lt;/P&gt;
&lt;P&gt;        if ( abs( dH ) &amp;lt; 0.5 )&lt;/P&gt;
&lt;P&gt;        {&lt;/P&gt;
&lt;P&gt;          if ( dH &amp;gt; 0.0 )&lt;/P&gt;
&lt;P&gt;              dH = 1.0 - dH;&lt;/P&gt;
&lt;P&gt;            else&lt;/P&gt;
&lt;P&gt;              dH = abs( dH ) - 1.0;&lt;/P&gt;
&lt;P&gt;           &lt;/P&gt;
&lt;P&gt;            dir = -1.0;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;        float h = LoColor.x + ( dir * dH * frac );&lt;/P&gt;
&lt;P&gt;       &lt;/P&gt;
&lt;P&gt;        // Limit h to range of 0-360&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        if ( h &amp;lt; 0.0 )&lt;/P&gt;
&lt;P&gt;          h += 1.0;&lt;/P&gt;
&lt;P&gt;        else&lt;/P&gt;
&lt;P&gt;        {&lt;/P&gt;
&lt;P&gt;          if ( h &amp;gt; 1.0 )&lt;/P&gt;
&lt;P&gt;        h -= 1.0;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;        // Now make a color to return&lt;/P&gt;
&lt;P&gt;        //&lt;/P&gt;
&lt;P&gt;        vec3 result= vec3( h, s, l );&lt;/P&gt;
&lt;P&gt;        return result;&lt;/P&gt;
&lt;P&gt;    }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;  void main(void)&lt;/P&gt;
&lt;P&gt;  {&lt;/P&gt;
&lt;P&gt;    gl_Position =    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;    gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;  if(color_flag&amp;gt;0.0){&lt;/P&gt;
&lt;P&gt;      P=abs(P);&lt;/P&gt;
&lt;P&gt;      float theMax=max(maxP,abs(minP));&lt;/P&gt;
&lt;P&gt;      float len=(P)/(theMax);&lt;/P&gt;
&lt;P&gt;    vec3 interp_hsl_color = interphsl(len*abs(t),min_hsl_color,max_hsl_color);&lt;/P&gt;
&lt;P&gt;       vec3 rgbcol=HSLToRGB(interp_hsl_color);&lt;/P&gt;
&lt;P&gt;         color=vec4(rgbcol,1.0);&lt;/P&gt;
&lt;P&gt;        }else{&lt;/P&gt;
&lt;P&gt;        color=gl_Color;&lt;/P&gt;
&lt;P&gt;        }&lt;/P&gt;
&lt;P&gt;  }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 18:11:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/GLSL-problems-with-latest-HD-graphics/m-p/320124#M17588</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2013-03-29T18:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: GLSL problems with latest HD graphics</title>
      <link>https://community.intel.com/t5/Graphics/GLSL-problems-with-latest-HD-graphics/m-p/320125#M17589</link>
      <description>&lt;P&gt;I may have found the problem&lt;/P&gt;&lt;P&gt;The line&lt;/P&gt;&lt;P&gt;P=abs(P) is illegal as P is an attribute.&lt;/P&gt;&lt;P&gt;Accepted, sometimes by the nVidia compiler.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 21:16:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/GLSL-problems-with-latest-HD-graphics/m-p/320125#M17589</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2013-03-29T21:16:00Z</dc:date>
    </item>
  </channel>
</rss>

