Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Shader Error  (Read 3224 times)

0 Members and 3 Guests are viewing this topic.

mikaelssen

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Shader Error
« 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

Image of the error inncase the web thing forum thing eats the letters: http://u.rubixy.no/u/0a6e7466.png
Not really helpful, I've set the shaders to include every time.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Shader Error
« Reply #1 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.
Laurent Gomila - SFML developer

mikaelssen

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Shader Error
« Reply #2 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.
« Last Edit: February 16, 2016, 08:11:41 pm by mikaelssen »

 

anything