GLSL ES: Gradient calculation inside a conditional block compiler warning

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  Joe Davis 4 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31041

    Joe Davis
    Member

    When compiling a GLSL ES shader what does the warning “Calls to any function that may require a gradient calculation inside a conditional block may return undefined results” mean?

    #36337

    Joe Davis
    Member

    This message is given when functions are used inside a conditional block which require gradient information.

    Gradient information is based on a 2×2 pixel block processing: if any of the pixels in a 2×2 block are not taking the same branch as the other pixels then the resulting data, which is used for gradient calculation, might be undefined and thus the resulting gradient invalid.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.