+ Fixed-Function Fog Emulation (ARB_fog_exp, ARB_fog_exp2, ARB_fog_linear)
If a fragment program specifies one of the options "ARB_fog_exp", "ARB_fog_exp2", or "ARB_fog_linear", the program will apply fog to the program's final color using a fog mode of EXP, EXP2, or LINEAR, respectively, as described in section 3.10.
When a fog option is specified in a fragment program, semantic restrictions are added to indicate that a fragment program will fail to load if the number of temporaries it contains exceeds the implementation-dependent limit minus 1, if the number of attributes it contains exceeds the implementation-dependent limit minus 1, or if the number of parameters it contains exceeds the implementation-dependent limit minus 2
Additionally, when the ARB_fog_exp option is specified in a fragment program, a semantic restriction is added to indicate that a fragment program will fail to load if the number of instructions or ALU instructions it contains exceeds the implementation-dependent limit minus 3.
When the ARB_fog_exp2 option is specified in a fragment program, a semantic restriction is added to indicate that a fragment program will fail to load if the number of instructions or ALU instructions it contains exceeds the implementation-dependent limit minus 4.
When the ARB_fog_linear option is specified in a fragment program, a semantic restriction is added to indicate that a fragment program will fail to load if the number of instructions or ALU instructions it contains exceeds the
implementation-dependent limit minus 2.
Only one fog application option may be specified by any given fragment program. A fragment program that specifies more than one of the program options "ARB_fog_exp", "ARB_fog_exp2", and "ARB_fog_linear", will fail to load.
+ Precision Hints (ARB_precision_hint_fastest, ARB_precision_hint_nicest)
Fragment program computations are carried out at an implementation-dependent precision. However, some implementations may be able to perform fragment program computations at more than one precision, and may be able to trade off computation precision for performance.
If a fragment program specifies the "ARB_precision_hint_fastest" program option, implementations should select precision to minimize program execution time, with possibly reduced precision. If a fragment program specifies the "ARB_precision_hint_nicest" program option, implementations should maximize the precision, with possibly increased execution time.
Only one precision control option may be specified by any given fragment program. A fragment program that specifies both the "ARB_precision_hint_fastest" and "ARB_precision_hint_nicest" program options will fail to load.
간단하게 정리하면 fragment shader에서 구현 가능한 종속된 정밀도로 실행되게 하는 옵션. B의 경우는 구현 가능한 최대 성능으로 실행된다. 두가지 모두 선언할 경우 shader 로드에 실패할 것이다.
#pragma fragmentoption ARB_precision_hint_nicest
#pragma fragmentoption ARB_precision_hint_fastest
+ Multiple Color Outputs (ARB_draw_buffers, ATI_draw_buffers)
If a fragment program specifies the "ARB_draw_buffers" or "ATI_draw_buffers" option, it will generate multiple output colors, and the result binding "result.color[n]" is allowed, as described in section 2.X.3.5. If this option is not specified, a fragment program that attempts to bind "result.color[n]" will fail to load, and only "result.color" will be allowed.
The multiple color outputs will typically be written to an ordered list of draw buffers in the manner described in the ARB_draw_buffers extension specification.
+ Fragment Program Shadows (ARB_fragment_program_shadow)
The ARB_fragment_program_shadow option introduced a set of "SHADOW" texture targets and made the results of depth texture lookups undefined unless the texture format and compare mode were consistent with the target provided in the fragment program instruction. This behavior is enabled by default in NV_gpu_program4; specifying the option is not illegal but has no additional effect.
'Technical Report > Unity Shader' 카테고리의 다른 글
Unity Alpha Blend Mode Toggle (0) | 2016.05.23 |
---|---|
Unity3D WorldReflectionVector function (0) | 2016.05.10 |
Unity 서피스 셰이더에서 discard나 return을 사용할때 주의할 점 (0) | 2016.03.20 |
Unity Built-in shader variables (0) | 2015.11.24 |
Unity shader Toggle 제어 (0) | 2015.11.09 |