Cg Toolkit Cg 3.1 Toolkit Documentation
Cg / Profiles / fp30

Name

fp30 - OpenGL fragment profile for NV3x (GeForce FX, Quadro FX, etc.)

Synopsis

  fp30

Description

This OpenGL profile corresponds to the per-fragment functionality introduced by the GeForce FX and Quadro FX line of NVIDIA GPUs.

The compiler output for this profile conforms to the assembly format defined by NV_fragment_program.

Data-dependent loops are not allowed; all loops must be unrollable.

Conditional expressions are supported without branching so both conditions must be evaluated.

Relative indexing of uniform arrays is not supported; use texture accesses instead.

3D Api Dependencies

Requires OpenGL support for the NV_fragment_program extension. These extensions were introduced by the GeForce FX and Quadro FX GPUs.

Opengl Extension Specifications

 http://www.opengl.org/registry/specs/NV/fragment_program.txt

Profile Options

NumInstructionSlots=val
How many instructions the compiler should assume it can use.
NumTemps=val
How many temporaries the compiler should assume it can use.

Data Types

fixed
The fixed data type corresponds to a native signed fixed-point integers with the range [-2.0,+2.0), sometimes called fx12. This type provides 10 fractional bits of precision.
half
The half data type corresponds to a floating-point encoding with a sign bit, 10 mantissa bits, and 5 exponent bits (biased by 16), sometimes called s10e5.
float
The float data type corresponds to a standard IEEE 754 single-precision floating-point encoding with a sign bit, 23 mantissa bits, and 8 exponent bits (biased by 128), sometimes called s10e5.

Semantics

Varying Input Semantics

The varying input semantics in the fp30 profile correspond to the respectively named varying output semantics of the vp30 profile.

Binding Semantics Name           Corresponding Data

COLOR                            Input primary color
COLOR0
COL
COL0

COLOR1                           Input secondary color
COL1

TEX0                             Input texture coordinate sets 0
TEXCOORD0

TEX1                             Input texture coordinate sets 1
TEXCOORD1

TEX2                             Input texture coordinate sets 2
TEXCOORD2

TEX3                             Input texture coordinate sets 3
TEXCOORD3

TEX4                             Input texture coordinate sets 4
TEXCOORD4

TEX5                             Input texture coordinate sets 5
TEXCOORD5

TEX6                             Input texture coordinate sets 6
TEXCOORD6

TEX7                             Input texture coordinate sets 7
TEXCOORD7

FOGP                             Input fog color (XYZ) and factor (W)
FOG

Uniform Input Semantics

Sixteen texture units are supported:

Binding Semantic Name            Corresponding Data

TEXUNIT0                         Texture unit 0
TEXUNIT1                         Texture unit 1
...
TEXUNIT15                        Texture unit 15

Output Semantics

COLOR                            Output color (float4)
COLOR0
COL0
COL

DEPTH                            Output depth (float)
DEPR

Standard Library Issues

Functions that compute partial derivatives are supported.

See Also

vp30


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