Hi,
I have a problem setting a sampler directly on RTprogram. From what I understand from Programming Guide variables on program have the highest priority. However, setting a sampler on program gives an error.
A little code example - I took modified code for sample “Tutorial” and changed the binding of environment texture from _context to miss program.
Program miss_program = _context->createProgramFromPTXFile( _ptx_path, miss_name );
_context->setMissProgram( 0, miss_program);
miss_program["envmap"]->setTextureSampler( loadTexture( _context, texpath("CedarCity.hdr"), default_color) );
Main difference is the miss_program[“envmap”] instead of _context[“envmap”]. I am receiving an error during context compilation or validation:
Variable "envmap" assigned value of type "Texture object" to variable of type "Texture object[0]"
Is this because setting sampler on program is not supported or is it an error? Setting directly to context works perfectly, but that is not a solution I need, because I would like to have a program-specific texture on the same variable.
Thank you in advance,
with regards,
Jan