Latest shaderpipeline error or bug

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Latest shaderpipeline error or bug

Post by The_Glitch »

Most likely my mistake not sure if it's a bug or not.

I recently upgraded my copy of shader pipeline to the latest version and all I really needed to update code wise was my screen quad node to reflect the latest changes.
But I noticed on my characters the shaders seem broken though they compile fine. Looks like and issue I had along time ago with tangents I believe.
I checked the other examples pretty closely and hardware skinning wise nothing really changed so I'm not to sure why there broken now.

If anyone needs code just say so.

OLD ShaderPipeline Version
Image

Latest version
Image
Granyte
Posts: 849
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Latest shaderpipeline error or bug

Post by Granyte »

What driver are you using dx11 or dx9?

Are you using shaders or the built in material?

many things changed lately in the shader pipeline we need a bit more information to help
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

I'm using direct3d9 hlsl shader. Same callbacks as my original code just copied it to the new source file and project using the latest shader pipeline. Did nadro change anything with the way tangents or anything in this latest version?
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

Also Granyte I'm pretty positive it's not the shader as it would not work in my older version at all. I tried to look at the examples provided to make sure that I'm not overlooking something that may have changed but I didn't spot anything. I'm stumped
Granyte
Posts: 849
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Latest shaderpipeline error or bug

Post by Granyte »

are you using any of the methodes like recalculate normal creatge tangents etc?

because as far a i know these are indeed preatty broken
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

Man that's unfortunate what you mentioned why is this stuff broken now :/

Also I post my custom vertex Descriptor below.

Code: Select all

 
video::IVertexDescriptor* vertexDescriptor = driver->addVertexDescriptor("Skinning");                
 
        vertexDescriptor->addAttribute("inPosition", 3, video::EVAS_POSITION, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inTexCoord0", 2, video::EVAS_TEXCOORD0, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inNormal", 3, video::EVAS_NORMAL, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inTangent", 3, video::EVAS_TANGENT, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inBinormal", 3, video::EVAS_BINORMAL, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inBlendWeight", 4, video::EVAS_BLEND_WEIGHTS, video::EVAT_FLOAT, 0);
        vertexDescriptor->addAttribute("inBlendIndex", 4, video::EVAS_BLEND_INDICES, video::EVAT_FLOAT, 0);
 
 
 
        // convert vertices's.
 
        for (u32 i = 0; i < skinMesh->getMeshBufferCount(); ++i)
            smgr->getMeshManipulator()->convertVertices<SSkinningVertex>(skinMesh->getMeshBuffer(i), vertexDescriptor, false),
            smgr->getMeshManipulator()->createTangents<video::S3DVertexTangents>(skinMesh->getMesh(0)->getMeshBuffer(i), vertexDescriptor, false);
                skinMesh->updateNormalsWhenAnimating(true);
 
                        skinMesh->setHardwareSkinning(true);   // Value has been changed
 
 
 
//////////////// rest of code flows from here
 
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: Latest shaderpipeline error or bug

Post by ent1ty »

Granyte wrote:are you using any of the methodes like recalculate normal creatge tangents etc?

because as far a i know these are indeed preatty broken
Do you mean this about just the shader-pipeline branch, or all Irrlicht in general? I haven't had any problems with tangents in irrRenderer for years and I've been using the master branch.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Granyte
Posts: 849
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Latest shaderpipeline error or bug

Post by Granyte »

I'm talking in the shader-pipeline branch they just crash for me

As far as I know it's because of the way irrlicht need to deal with flexible vertex and as far as I know nadro didn't get time to fix it
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

Damn, Well this sucks :/
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Latest shaderpipeline error or bug

Post by Nadro »

I'll check this method again, is example no. 11 works fine for you?
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

I know your busy but yeah example 11 seems fine PerPixel Lighting right. So man I'm not sure, hardware skinning works as expected but the shader effects are broken now the normal mapping in the shader is horrendous :/


Also I double check my source to make sure nothing was using my old Irrlicht version and also recompiled Irrlicht in VS2013 to check there also but the problem still remains other than that everything works fine.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

Better screenshots notice the arms and sides not perpixel lighting anymore.

Image
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Latest shaderpipeline error or bug

Post by Nadro »

Does it work if you will replace animated node by static? You should debug your scene step by step. If exmple no. 11 works fine It's more difficult to find a bug. Please tell me which last shader-pipeline revision works fine? Check how your scene looks when you will set EHM_STATIC and EHM_NEVER for your model.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

In my older version it's a separate folder on my desktop the changes.txt very top say's this if it helps:
I also changed the EHM_STATIC and EHM_NEVER but nothing changed.
Also loaded the character with no animation just the model and the effect remains the same. "I still loaded as an AnimatedMesh though"

Code: Select all

 
--------------------------
Changes in 1.9 (not yet released)
 
- IGUISpinBox now passes on the EGET_BUTTON_CLICKED, EGET_EDITBOX_CHANGED and EGET_EDITBOX_ENTER events from it's sub-elements.
- IGUISpinBox no longer validates values after each character type but only on KEY_ENTER and when losing focus. New behavior can be set with IGUISpinBox::setValidateOn
- IAttributes::getAttributeAs functions now can have a customizable default-parameter to return when attributeName is not found
- Added ECFN_DISABLED value (it works like ECFN_NEVER worked before) and changed ECFN_NEVER behaviour
  (it works like its equivalent value in OpenGL/Direct3D).
- Removed boolean interface from IShaderConstantSetCallBack, please use integer interface instead of them.
- Add a LeakHunter class which can be enabled with compile-flag _IRR_COMPILE_WITH_LEAK_HUNTER_ to find leaking IReferenceCounted objects.
- Add _IRR_COMPILE_WITH_XML_ define to allow compiling Irrlicht without xml (patch written by curaga)
- Add functions to set/get cursor character and blinktime to IGUIEditBox
- Collada exporter calculates values for orthographic camera now on export
- Collada exporter now exports the camera up-vector correctly.
- Add IColladaMeshWriter::findGeometryNameForNode
- Add getters IGUIButton::isDrawBorderEnabled and IGUIButton::isDrawBackgroundEnabled
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Latest shaderpipeline error or bug

Post by The_Glitch »

I even downloaded a new copy of SP and recompiled just to test and the issue was still there :/
Post Reply