PDA

View Full Version : prog Work but # is Complicated Cg



vivek vyas
07-26-2009, 09:17 AM
please reply to this
hiiiiii
i just come at point of compile Cg .cg(progs byfew change of gl_Fra/gl_Po in file)

when i compiled 01Vertex_Program's cg program
by these of changes i get
file
both below code for work in fragment progs


!!ARBfp1.0\
# cgc version 2.2.0006, build date Mar 31 2009\
# command line args: -oglsl -profile arbvp1 -profile arbfp1\
# source file: C2E1v_green.cg\
#vendor NVIDIA Corporation\
#version 2.2.0.6\
#profile arbfp1\
#program C2E1v_green\
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1\
#const c[0] = 0 1\
PARAM c[1] = { { 0, 1 } };\
MOV result.color, c[0].xyxx;\
END\
# 1 instructions, 0 R-regs

which not work on assginment(char object)

but when i make it to


!!ARBfp1.0\
PARAM c[1] = { { 0, 1 } };\
MOV result.color, c[0].xyxx;\
END

then it workssss

but
#..
line must be used in comments

but for green color i need to use fragment profile(with gl_Frag change)

but cg use it directly in the vertex program && profile

thanks for reading/thinking/helping

thanks in advance

:D
apologies for grammer
N being language barrier

Dark Photon
07-27-2009, 05:39 AM
You're interpretation is being totally lost (on me) in the language barrier. I'd suggest you post 1) your shader program source, and 2) what the error message is that you're getting, and we'll try to help you out.

However, the one thing that seems like an obvious error from your assembly source is all the line continuation (\) characters:


# a comment\
Some code \
More code \
stuff

Because you've used \ at the end of the line, a standard preprocessor is going to join all the lines together, and you're going to get that entire file just being one big long comment. That is:


# a comment Some code More code stuff

vivek vyas
07-31-2009, 06:13 AM
thank you very very very much
(my English is non-understandable but u still help me you are really really really great!!)