Question

K Reece on Tue, 20 Nov 2012 04:27:37


Hello,

As per a number of threads, including:

http://social.msdn.microsoft.com/Forums/en-US/wingameswithdirectx/thread/11fd0f05-30a6-4747-aa12-31486b20bd32/#dfbab7ca-a04c-4a9a-9eb1-fc8e5e362d01

I totally get that the 'best practice' is to pre-compile the shaders for your application.  However, if you are writing an application where the end-user can either modify or supply shader code 'on the fly' for mathematics, scientific/physics, simulation or GPGPU-style purposes, is there a supported way to dynamically compile HLSL in DX11 AND be admissable to the Windows Store given that all the Compilation and Reflection APIs seem to be out of bounds?

Leading to the second obvious question: Are those Compile/Assemble/Reflect APIs effectively 'deprecated' for Windows Store applications for best-practice reasons to force developers to precompile shaders, or is there another reason such as security?


Thanks,

-=KR=-

Replies

Alecazam on Wed, 21 Nov 2012 21:09:17


This is really not acceptable.  Even without user submitted shaders, I've worked on several titles where the number of possible shaders that can composite is in the 10's of thousands, but the used shaders is only in the hundreds.  Requiring a pre-compile is totally out of the question.   Having to replicate the extensive reflection API is also painful.