glsl infinity constant

前端 未结 3 464
深忆病人
深忆病人 2021-01-07 22:26

Does GLSL have any pre-defined constants for +/-infinity or NaN? I\'m doing this as a workaround but I wonder if there is a cleaner way:

// GLSL FRAGMENT SHA         


        
3条回答
  •  囚心锁ツ
    2021-01-07 23:22

    There are no pre-defined constants for it, but there is the isinf function to test if something is infinity.

    While I'm at it, are there constants for other things like FLT_MAX FLT_EPSILON etc the way there are in C?

    No, there are not.

提交回复
热议问题