GL_ARB_FRAGMENT_PROGRAM vs CG_PROFILE_FP30
Rhadamés Carmona <[email protected]>
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Hello Guy
I tested arb_fragment program and CG fragment program, and the results are
not the same. I kept the rest of the code. CG looks darker. Any clue?. I am
using pre-integration volume rendering with 3D textures. Texture0 and 1 are
the same source 3D texture... texture2 is the dependent 2D texture.
Thanks
const char program[] =
"!!ARBfp1.0\n\
TEMP texel0, texel1, tc2;\n\
OUTPUT texel2 = result.color;\n\
TEX texel0, fragment.texcoord[0], texture[0], 3D;\n\
TEX texel1, fragment.texcoord[1], texture[1], 3D;\n\
MOV tc2.x, texel0.r;\n\
MOV tc2.y, texel1.r;\n\
TEX texel2, tc2, texture[2], 2D;\n\
END\n\
";
const char PCG_CODE[] =
"float4 main(float3 FrontCoords : TEXCOORD0, float3 BackCoords : TEXCOORD1,
uniform sampler3D FrontTexture : TEXUNIT0, uniform sampler3D BackTexture :
TEXUNIT1, uniform sampler2D DependentTexture : TEXUNIT2): COLOR\n\
{\n\
float4 OUT;\n\
float fc,bc;\n\
fc = tex3D(FrontTexture, FrontCoords).r;\n\
bc = tex3D(BackTexture, BackCoords).r;\n\
float2 dependcoor = (fc,bc);\n\
OUT = f4tex2D(DependentTexture, dependcoor);\n\
return OUT;\n\
}";
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: =?iso-8859-1?Q?Rhadam=E9s_Carmona?=
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).