SFML community forums

Bindings - other languages => DotNet => Topic started by: mikaelssen on February 16, 2016, 03:47:00 pm

Title: Shader Error
Post by: mikaelssen on February 16, 2016, 03:47:00 pm
So I've been working on a tiny project with a friend, and we're at the point where we want to add a simple shader, but no matter what shader we try we get the same error, even an empty shader file produces this error.

The Error:
Failed to compile vertex shader:
Vertex shader failed to compile with the following errors:
ERROR: error(#60) Unknown char: ""
ERROR: error(#273) 1 compilation errors.  No code generated
*/
Code that produces the error

Shader SunShader = new Shader("Resources/Shaders/VertexShader.vert", "Resources/Shaders/Light.frag");
 

The shader files aren't really relevant (as far as i know) as they return the same Error even if they're blank, a bunch of random text, or a premade test shader.

Can't find anything on google about it, using SFML.Net 2.2. And really really lost on what i can do.  VB 2012 just tells me that it fails to load with this message: http://u.rubixy.no/u/061641db.png (http://u.rubixy.no/u/061641db.png)

Image of the error inncase the web thing forum thing eats the letters: http://u.rubixy.no/u/0a6e7466.png (http://u.rubixy.no/u/0a6e7466.png)
Not really helpful, I've set the shaders to include every time.
Title: Re: Shader Error
Post by: Laurent on February 16, 2016, 05:26:05 pm
Do the Shader official example work? If so, there's most likely something wrong in your code and we won't be able to help unless you show a complete and minimal code that reproduces the problem.
Title: Re: Shader Error
Post by: mikaelssen on February 16, 2016, 06:48:12 pm
The Example works flawlessly, even though it has a completely different structure.
I've got no clue why, as no matter where i place the shader creation it will crash the program, even if it's the very first line.
 But the example works great, is there some specific Compile settings i can't use? Can i not compile for .net 4.5? I'll try to switch it all to 3.5

Edit:
Tried to make a new project aswell, no go, so something's probably wrong with how i set it up. Will report back if i manage to fix this weird error.