Sign in to follow this  

preprocssor defines not allowed in compile shader

Recommended Posts

While working on my graphics engine, I have some shaders that never change and I want to keep them inside my compiled code so I have less files floating around, but compiling a shader from a string with pre processor macros causes an error to be thrown.

Error CompileShaderFromMemory, Shader@0x03D5F140(1,76): error X3000: syntax error: unexpected token '#'

An undetermined error occurred

Are any pre procesor defines not allowed when compiling a shader from memory? I did a search and found nothing, so I am curious.

Share this post

Link to post
Share on other sites
thanks for the reply, i had a buffer overrun in a part of my program that spilled over into the shader which was causing the error. I could'nt understand what was going on because I knew pre processor macros could be used.....

Thanks for the response +1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this