[cmake-developers] Windows shader compile options
Cedric Perthuis
cedric.perthuis at gmail.com
Fri Nov 28 18:48:57 EST 2014
Gilles Khouzam <Gilles.Khouzam at ...> writes:
>
>
>
> Hi Christopher,
>
> We added the support for shaders but have only added the basic support
to include shaders. Let me check what can be done to add the other
properties.
>
>
> Gilles Khouzam
> Senior Development Lead
> Microsoft OSG
>
> From: cmake-developers [mailto:cmake-developers-bounces <at>
cmake.org]
> On Behalf Of Christopher MaughanSent: Wednesday, September 24, 2014
05:29To: cmake-developers <at> cmake.orgSubject: [cmake-developers]
Windows shader compile options
>
>
> I've been playing with the Windows shader options. I can see that
it's now possible to set the following:
>
>
>
> set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_TYPE
Pixel)
> set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_TYPE
Vertex)
>
>
>
>
>
>
> Which is cool, but I can't see if there's a way to specify the other
options to the shader compiler, such as output header file, shader
model, etc. Is there a way to do
> that, or is it a TODO?
>
>
>
>
>
Hi,
First, thanks for adding shader support.
I'd like to reiterate Christopher's request and push for entry point +
shader models as the 2 most important features to add. Without
configuring them, often shaders won't compile at all and will break the
build.
As a workardound, we can add fake empty empty main() function, but it's
kind of defeating the purpose.
Also, it would be nice if the Visual Studio FXCompile custom build tool
had another option to compile both a Vertex and a Pixel shader from the
same file.
And while we're at it, this could be generalized to include as many
compilation as the user wants: the FXCompile custom build tool could
offer an interface to add as many { entry point, shader type } options.
output format and shader model can probably be common for all the
shaders in the file. We can probably use an fx target to do this, but
it's not necessarily portable.
Once it's available in the custom build tool, it would be great to
support it in Cmake.
Thanks!
More information about the cmake-developers
mailing list