Results 1 to 2 of 2

Thread: GLSL ES max/min() for genType ambiguity

  1. #1
    Junior Member
    Join Date
    Jun 2009

    GLSL ES max/min() for genType ambiguity

    According to 8.3 in the specification, min() and max() functions should return results based on relational operations, y < x or y > x. As they support genType for both operands, it supposedly require >, < operators for vector types, which I don't think allowed by the spec.

    I see many shader codes that use min()/max() for picking component-wise extreme values, but wonder if it is standard compliant.

    Did I miss something? Maybe more precise note about genType in the spec would be appreciated.

  2. #2
    Senior Member
    Join Date
    May 2006

    Re: GLSL ES max/min() for genType ambiguity

    The spec is actually quite clear. At the top of section 8.3 it says: "These all operate component-wise. The description is per component."
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

Similar Threads

  1. Replies: 2
    Last Post: 02-02-2012, 05:47 AM
  2. Replies: 1
    Last Post: 08-13-2010, 09:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean