directx - Is it possible to get the interface name (Dynamic Shader Linkage)? -



directx - Is it possible to get the interface name (Dynamic Shader Linkage)? -

i working on implementing dynamic shader linkage shader reflection code. works quite nicely, create code dynamic possible automate process of getting offset dynamiclinkagearray. microsoft suggests in sample:

g_inumpsinterfaces = preflector->getnuminterfaceslots(); g_dynamiclinkagearray = (id3d11classinstance**) malloc( sizeof(id3d11classinstance*) * g_inumpsinterfaces ); if ( !g_dynamiclinkagearray ) homecoming e_fail; id3d11shaderreflectionvariable* pambientlightingvar = preflector->getvariablebyname("g_abstractambientlighting"); g_iambientlightingoffset = pambientlightingvar->getinterfaceslot(0);

i without giving exact name, when shader changes not have manually alter code. accomplish need name marked below through shader reflection. possible? searched through references of shader-reflection did not find useful, besides number of interface slots (getnuminterfaceslots()).

#include "basicshader_psbuffers.hlsli" ibaselight g_abstractambientlighting; ^^^^^^^^^^^^^^^^^^^^^^^^^^ struct pixelinput { float4 position : sv_position; float3 normals : normal; float2 tex: texcoord0; }; float4 main(pixelinput input) : sv_target { float3 ambient = (float3)0.0f; ambient = g_txdiffuse.sample(g_samplerlin, input.tex) * g_abstractambientlighting.illuminateambient(input.normals); homecoming float4(saturate(ambient), 1.0f); }

if not possible, how 1 go this? add together can think of there have alter little possible manually?

thanks in advance

directx shader hlsl

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -