PDA

View Full Version : Setting Pixel Shader Constant with nv parse



melchizedek
09-13-2002, 03:06 AM
Hi,

I'm trying to use nvparse for ps.1.1, but I don't now how to set constant.

My pixel shader is :
"ps.1.1 \n"
"mov r0, v0 \n"
I've tryed :
float p[4] = { 1.0f, 0.5f, 0.0f, 1.0f};
glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, p);
but it doesn't work

For Vertex Program I use :
glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV, k, data[k].x, data[k].y, data[k].z, data[k].w);

Does anyone knoes how to do this for pixel shader ?

melchizedek.

Asgard
09-13-2002, 03:15 AM
I'm no expert with register combiners, but I can say one thing for sure. Your pixel shader does not use any constants, so how can you tell if what you tried works?

melchizedek
09-13-2002, 03:44 AM
Originally posted by Asgard:
I'm no expert with register combiners, but I can say one thing for sure. Your pixel shader does not use any constants, so how can you tell if what you tried works?

oups, I made a mistake, the shader is :
"ps.1.1 \n"
"mov r0, c0 \n"

Asgard
09-13-2002, 01:25 PM
Download this document (and possibly the new version of nvparse that got posted on NVIDIA's developer site a couple of days ago): http://developer.nvidia.com/docs/IO/1747/ATT/nvparse_pixelshader_howto.txt

It should explain what you want to know.
Regards.