最終更新:2015-03-31 (火) 02:54:38 (3313d)  

GLSL/組み込み変数
Top / GLSL / 組み込み変数

https://www.opengl.org/wiki/Built-in_Variable_(GLSL)

バージョン別

GLSL/頂点シェーダ

Vertex shader inputs

Vertex shader outputs

  • out gl_PerVertex
    {
      vec4 gl_Position;
      float gl_PointSize;
      float gl_ClipDistance[];
    }
  • gl_PerVertex - defines an interface block for outputs
    • gl_Position - 変換後の頂点座標
    • gl_PointSize? - ポイントスプライトのサイズ
    • gl_ClipDistance?

GLSL/フラグメントシェーダ

Fragment shader inputs

Fragment shader uniforms

  • struct gl_DepthRangeParameters
    {
        float near;
        float far;
        float diff;
    };
    uniform gl_DepthRangeParameters gl_DepthRange;
  • gl_DepthRangeParameters?
  • gl_DepthRange?

Fragment shader outputs

テッセレーションコントロールシェーダ?

Tessellation control shader inputs

Tessellation control shader outputs

Tessellation evaluation shader

Tessellation evaluation shader inputs

Tessellation evaluation shader outputs

ジオメトリシェーダ?

Geometry shader inputs

Geometry shader outputs

コンピュートシェーダ

Compute shader inputs

Compute shader other variables

Constants

関連