Hi,
I am trying to implement Cass Everitt’s “Order independent transparency” paper, but without using the ‘nvparse’ library. This means that I’m suppose to create a simple register combiner program using the OGL-NV api.
The simple RC program is: (pasted from the layerz.cpp code from NVidia)
out.rgb = col0
out.a = tex3.b
And this is what I think it should be:
// out.rgb = col0
glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, 1);
glFinalCombinerInputNV(GL_VARIABLE_A_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
glFinalCombinerInputNV(GL_VARIABLE_D_NV, GL_PRIMARY_COLOR_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB);// out.a = tex3.b
glFinalCombinerInputNV(GL_VARIABLE_G_NV, GL_TEXTURE3, GL_UNSIGNED_INVERT_NV, GL_BLUE);
glEnable(GL_REGISTER_COMBINERS_NV);
I say ‘think’ because I can’t get my implementation to work, and I suspect it is because of an error in the register combiner setup.
Have I done it right or wrong? I have read the RC-doc from NVIDIA, but Im still not sure if I have done it correctly.