Cg_Language fp30

本文介绍了图形渲染中的配置选项,包括指令槽位数量、临时变量数量等,并详细解释了固定、半精度浮点和单精度浮点等数据类型。此外,还涵盖了输入语义和输出语义的具体含义,如颜色、纹理坐标及深度输出等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 NameCorresponding Data

COL
COL0
COLOR
COLOR0:Input primary color

COL1
COLOR1 :Input secondary color

TEX0
TEXCOORD0:Input texture coordinate sets 0

TEX1
TEXCOORD1:Input texture coordinate sets 1

TEX2
TEXCOORD2:Input texture coordinate sets 2

TEX3
TEXCOORD3: Input texture coordinate sets 3

TEX4
TEXCOORD4:Input texture coordinate sets 4

TEX5
TEXCOORD5: Input texture coordinate sets 5

TEX6
TEXCOORD6:Input texture coordinate sets 6

TEX7
TEXCOORD7:Input texture coordinate sets 7

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

Uniform Input Semantics

Sixteen texture units are supported:

Binding Semantic NameCorresponding Data

TEXUNIT0 :Texture unit 0
TEXUNIT1 : Texture unit 1

TEXUNIT15 :Texture unit 15

Output Semantics

COL
COL0
COLOR
COLOR0:Output color (float4)

DEPR
DEPTH :Output depth (float)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值