Cg Toolkit Cg 3.1 Toolkit Documentation
Cg / Profiles / gp5tcp

Name

gp5tcp - OpenGL tessellation control profile for NVIDIA GeForce 400/500 Series, OpenGL 4.x Quadro

Synopsis

  gp5tcp

Description

This OpenGL profile corresponds to tessellation control functionality introduced by NVIDIA's 5th generation of assembly instruction sets.

The compiler output for this profile conforms to the assembly format defined by NV_tessellation_program, NV_gpu_program5 and ARB_vertex_program.

3D Api Dependencies

Requires OpenGL support for the NV_gpu_program5 extension.

Opengl Extension Specifications

 http://www.opengl.org/registry/specs/NV/gpu_program5.txt
 http://www.opengl.org/registry/specs/NV/tessellation_program5.txt

Profile Options

All gp4 profile options are also available in gp5tcp.

Tessellation Control Domain-Specific Gp5 Options

PATCH_1 ... PATCH_32
Specify the number of control points associated with each patch. Must be in the range [1,32]. The input varying AttribArrays parameter size is also this value.

The tessellation control shader will fail to load if PATCH_1 ... PATCH_32 is not specified as a profile option for the primitive type.

Usually the primitive input parameter is specified as a profile modifier preceding the Cg entry function.

Semantics

Varying Input Semantics

The varying input semantics in the gp5tcp profile correspond to the respectively named varying output semantics of the gp5vp profile. The exception is the CONTROLPOINT_ID semantic.

Binding Semantics Name       Corresponding Data

CONTROLPOINT_ID              An input integer corresponding to the control point's input order.

Varying Output Semantics

The varying output semantics in the gp5tcp profile correspond to the respectively named varying input semantics of the gp5tep profile. The two exceptions are the LOD parameters consumed by the tessellation primitive generator.

Binding Semantics Name       Corresponding Data

EDGETESS                     Output float array corresponding to outer tessellation level.
                             (Size of array = 3 for triangle patches, 4 for quad patches.)

INNERTESS                    Output float array corresponding to inner tessellation level.
                             (Size of array = 1 for triangle patches, 2 for quad patches.)

PATCH                        Output per-patch attribute.

An index does not need to be specified for other attributes. The output attributes are mapped to their corresponding control point array entry for subsequent shader stages.

For example the following will simply pass-through the control point's position to the evaluation shader:

void main(
  in int id                          : CONTROLPOINT_ID,
  in AttribArray<float3> inPositions : POSITION,
  out position                       : POSITION)
  {
    position = inPositions[id];
  }

See Also

gp5, gp5tep, gp5vp, gp5gp, gp5fp


Cg Toolkit | Cg Toolkit | Download | Release Archive | Profiles | Reference | Books | Discussions |


Cg Profiles

arbfp1
arbvp1
ds_5_0
fp20
fp30
fp40
glslf
glslg
glsl
glslv
gp4fp
gp4gp
gp4
gp4vp
gp5fp
gp5gp
gp5
gp5tcp
gp5tep
gp5vp
gs_4_0
gs_5_0
hlsl10
hlsl11
hlslf
hlslv
hs_5_0
ps_1_1
ps_1_2
ps_1_3
ps_2_0
ps_2_sw
ps_2_x
ps_3_0
ps_4_0
ps_5_0
vp20
vp30
vp40
vs_1_1
vs_2_0
vs_2_sw
vs_2_x
vs_3_0
vs_4_0
vs_5_0