[fixed]shader bug?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.

[fixed]shader bug?

Postby agamemnus » Fri Mar 11, 2011 11:15 pm

http://irrlicht.sourceforge.net/phpBB2/ ... 4&start=30

http://img140.imageshack.us/i/aproblem.png/

I can't get the water node to display properly. It uses the wrong texture pointer to display the water texture. I think this is probably a bug in how Irrlicht handles the ATI X series cards.. maybe it doesn't correctly test for missing features, I don't know.
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby stefbuet » Sat Mar 12, 2011 2:26 am

But, this isn't part of the engine :o
User avatar
stefbuet
Competition winner
 
Posts: 494
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Postby Lonesome Ducky » Sat Mar 12, 2011 2:46 am

stefbuet wrote:But, this isn't part of the engine :o


He made the conjecture that the problem lied with Irrlicht's handling of ATI X series cards.
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby agamemnus » Sat Mar 12, 2011 6:31 am

One thing I noticed is that the console output stated "Could not create hlsl vertex shader."...

I cannot find anywhere on the internet where I can test whether my graphics card supports hlsl or not. Anyone have any ideas?

From wikipedia, graphics cards from X700 and up support Pixel Shader 2.0b and up. I am guessing my X600XT card can only support Pixel Shader 2.0 -- maybe that is the problem? It is stated in multiple areas the the X600XT fully supports DirectX 9.

Here are the graphics card specs, maybe that will help (not seeing anything about HLSL).
http://www.gpureview.com/Radeon-X600-XT-card-93.html
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby REDDemon » Sat Mar 12, 2011 6:56 am

irrlicht can query supported hardware features (note that this can change according to the user driver. so directx and ogl can be different)

http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=40497
OpenGL is not hard. What you have to do is just explained in specifications. What is hard is dealing with poor OpenGL implementations.
User avatar
REDDemon
 
Posts: 831
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Postby agamemnus » Sat Mar 12, 2011 7:14 am

I would rather use something that doesn't use any Irrlicht code, since Irrlicht already thinks I don't have "hlsl". Interestingly, I believe this card was designed for DirectX and Irrlicht thinks I have "glsl"...
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby REDDemon » Sat Mar 12, 2011 9:22 am

can you post a little project that reproduce the bug with the standard irrlicht.dll under visual studio?.. so simple example code, like the irrlicht example about shader usage. possibly with a project file for compiling it under visual studio?

If you run the shader example demo and select directx 9. does the console output shows DIRECTX with hlsl or OpenGL with glsl?
OpenGL is not hard. What you have to do is just explained in specifications. What is hard is dealing with poor OpenGL implementations.
User avatar
REDDemon
 
Posts: 831
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Postby stefbuet » Sat Mar 12, 2011 12:22 pm

It uses the wrong texture pointer to display the water texture


From what I see it's just that the shader didn't compile but shader input texture are still on the model and that's what you see. If the shader was compiled and running it would use texture informations but display other things.
This can happen if your graphic card is not new enougt to support the shader, or as you're using ATI card it can be a problem with the shader because ATI is much more strict than NVidia with shader syntax. Use GPU ShaderAnalyzer from AMD to find out if the problem's coming from your card or the shader.
User avatar
stefbuet
Competition winner
 
Posts: 494
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Postby agamemnus » Sat Mar 12, 2011 5:11 pm

REDDemon wrote:can you post a little project that reproduce the bug with the standard irrlicht.dll under visual studio?.. so simple example code, like the irrlicht example about shader usage. possibly with a project file for compiling it under visual studio?


The blood+water demo out of the package doesn't work.

If you run the shader example demo and select directx 9. does the console output shows DIRECTX with hlsl or OpenGL with glsl?


I compiled but got no .exe from it. I ran the .exe in the bin directory and selected both DirectX and openGL. No bugs or crashes.


----

stefbuet wrote:
It uses the wrong texture pointer to display the water texture


From what I see it's just that the shader didn't compile but shader input texture are still on the model and that's what you see. If the shader was compiled and running it would use texture informations but display other things.

No, it is using part of the skybox as the texture.

This can happen if your graphic card is not new enough to support the shader, or as you're using ATI card it can be a problem with the shader because ATI is much more strict than NVidia with shader syntax. Use GPU ShaderAnalyzer from AMD to find out if the problem's coming from your card or the shader.

I guess it's a syntax problem since the example shaders work fine. I'll do that, thanks.

Edit: Ok, tried it.

I got three different errors when I tried to compile: two truncation errors/warnings (which I was able to fix) and an "entrypoint not found" error:
error X3501: 'main': entrypoint not found


After fixing the truncation errors/warnings, the shader still failed to load.

I don't really know what to do. The Irrlicht shader example code, which works, gives me the same error.

Maybe that's not really a problem.

I tried to test with hlsl 1.1 (maybe that's what I have? I really don't know) but got this error:
Code: Select all
error X3539: ps_1_x is no longer supported; use /Gec in fxc to automatically upgrade to ps_2_0
error X3539: Alternately, fxc's /LD option allows use of the old compiler DLL


Not really sure what they are talking about here.

Anyway... could anyone remind me how to turn on Irrlicht notice/error messages? I turned them off ages ago and I forgot how to turn them back on.
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby REDDemon » Sun Mar 13, 2011 3:21 pm

you must check all supported drivers features and check for compability of the shaders. if irrlicht example works probably your problem is the shader that is not supported...
OpenGL is not hard. What you have to do is just explained in specifications. What is hard is dealing with poor OpenGL implementations.
User avatar
REDDemon
 
Posts: 831
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Postby agamemnus » Sun Mar 13, 2011 6:04 pm

I can't test that fully though, because I can't compile the shaders b/c of error X3501.
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby REDDemon » Tue Mar 15, 2011 11:28 am

you don't need to compile shaders for test if your driver is able to render shaders. you must be sure you have setted the correct PS and VS version in your shader material when you add a shader.

for example if you try to compile a glsl 1.0 shader probably you will get an error if you provide as parameter to the shader compiler a wrong version. for example glsl 4.0

anyway without a code that reproduce the bug we cannot help so much.
OpenGL is not hard. What you have to do is just explained in specifications. What is hard is dealing with poor OpenGL implementations.
User avatar
REDDemon
 
Posts: 831
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Postby agamemnus » Tue Mar 15, 2011 6:02 pm

I don't have any of those errors.

The code I'm testing is what's in the water shader of the blood & water zip file, as well as the example Irrlicht shaders (which work in the example). They all give error X3501.
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Postby hybrid » Wed Mar 16, 2011 9:08 am

Use a newer Irrlicht version or an older DirectX dll. And make use of the search button.
hybrid
Admin
 
Posts: 13945
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby agamemnus » Wed Mar 16, 2011 9:32 pm

I'm using 1.7.2.

After manually searching 54 pages in two threads, (since the search function doesn't specify which page, this is all I found on the subject:

BlindSide wrote:Yep, those errors usually indicate it's getting zero-length strings for the shaders. Glad you got it sorted.


I don't really know how that applies here.

An older DirectX dll? I don't think the DLL is the problem here. I think maybe the debugger is expecting some sort of extra code, since the example Irrlicht shaders work fine and don't give me any errors.

Edit: Ok, that was stupid. I changed the function pixelMain to "main"... now I am getting some decent errors that I can debug.. (edit2) or can't:

Unknown Error Compiler Shader
Last edited by agamemnus on Wed Mar 16, 2011 9:58 pm, edited 1 time in total.
agamemnus
 
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Next

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest