Discussion:
is it possible to compile a shader to a file?
(too old to reply)
Richy
2009-03-07 04:58:07 UTC
Permalink
Hi, I am finding myself with more and more shaders that have to be
compiled each time I run my system, is there a way of compiling
shaders to a file? Either a binary file that can be loaded in or an
intermediate file (non-text) that would enable all my shaders to
compile quicker?

Thanks,

Richard
legalize+ (Richard [Microsoft Direct3D MVP])
2009-03-08 19:19:27 UTC
Permalink
[Please do not mail me a copy of your followup]
Post by Richy
Hi, I am finding myself with more and more shaders that have to be
compiled each time I run my system, is there a way of compiling
shaders to a file? Either a binary file that can be loaded in or an
intermediate file (non-text) that would enable all my shaders to
compile quicker?
Assuming D3D9, take a look at the D3DX shader functions like
D3DXCompileShader. You can then save the blob from that function and
then load it from a file and directly use it in
IDirect3DDevice9::CreatePixelShader, etc.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
legalize+ (Richard [Microsoft Direct3D MVP])
2009-03-09 01:58:12 UTC
Permalink
[Please do not mail me a copy of your followup]

Oh, I just noticed you posted to the managed newsgroup. Are you using
SlimDX or Managed DirectX?
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
Loading...