bate's blog

調べたこと実装したことなどを取りとめもなく書きます。

cgfxのコンパイルができない

cgfxファイルのコンパイル方法が分からない。

cgc -fx test.cgfx
(0) : error C3001: no program defined

cgc -noentry -fx test.cgfx
test.cgfx
19 lines, 0 errors.

どうしろと・・・

cgc -entry vmain -fx test.cgfx -profile vp40
test.cgfx
19 lines, 0 errors.
!!ARBvp1.0
OPTION NV_vertex_program3;
# cgc version 3.1.0010, build date Feb  8 2012
# command line args: -fx -profile vp40
# source file: test.cgfx
#vendor NVIDIA Corporation
#version 3.1.0.10
#profile vp40
#program vmain
#var float4 Pos : $vin.POSITION : POSITION : 0 : 1
#var float4 vmain : $vout.POSITION : HPOS : -1 : 1
TEMP RC, HC;
BB0:
MOV   result.position, vertex.position;
END
# 1 instructions, 0 R-regs



cgc -entry pmain -fx test.cgfx -profile fp40
test.cgfx
19 lines, 0 errors.
!!ARBfp1.0
OPTION NV_fragment_program2;
# cgc version 3.1.0010, build date Feb  8 2012
# command line args: -fx -profile fp40
# source file: test.cgfx
#vendor NVIDIA Corporation
#version 3.1.0.10
#profile fp40
#program pmain
#var float4 pmain : $vout.COLOR : COL : -1 : 1
#const c[0] = 1
PARAM c[1] = { { 1 } };
TEMP RC;
TEMP HC;
OUTPUT oCol = result.color;
MOVR  oCol, c[0].x;
END
# 1 instructions, 0 R-regs, 0 H-regs

これではcgfxの意味がないし、どうすればcgfxをコンパイルできるのか。