Finally, a DirectX 10 video driver for Irrlicht
Re: Finally, a DirectX 10 video driver for Irrlicht
Hi,
In my last commits I changed small part of DX11 driver related to register IVertexDescriptor. I also added support for multiple vertex buffers, but some methods still support just one vertex buffer and skip others. If you can please provide some feedback about last changes, dx11 need some features etc? Stream variables from vertex descriptor are removed just temporarily.
Cheers,
In my last commits I changed small part of DX11 driver related to register IVertexDescriptor. I also added support for multiple vertex buffers, but some methods still support just one vertex buffer and skip others. If you can please provide some feedback about last changes, dx11 need some features etc? Stream variables from vertex descriptor are removed just temporarily.
Cheers,
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
I'm afraid to update to this version is it similar to my patch?
EDIT after taking a look at it i'm not sure I really like the fact that vertex descriptor have to be identical in a vertex buffer to be accepted in a mesh buffer
mine was using a descriptor for each stream and fusing them at run time to create the final descriptor
also how do we obtain the size of each component as it is required to upload the Meshbuffer if we don't have a descriptor for each stream?
EDIT after taking a look at it i'm not sure I really like the fact that vertex descriptor have to be identical in a vertex buffer to be accepted in a mesh buffer
mine was using a descriptor for each stream and fusing them at run time to create the final descriptor
also how do we obtain the size of each component as it is required to upload the Meshbuffer if we don't have a descriptor for each stream?
Re: Finally, a DirectX 10 video driver for Irrlicht
Vertex descriptor should be the same for each vertex buffer. I don't see any advantages of mixing descriptors at run time, it will cause just many troubles.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
Well the first advantage is the user is able to create a standardized per instance component he can just slap any where at any time.
the second advantage is it allows the reuse of the same instance data to redraw multiple component of something while these components might not use the same base vertex type.
the second advantage is it allows the reuse of the same instance data to redraw multiple component of something while these components might not use the same base vertex type.
Re: Finally, a DirectX 10 video driver for Irrlicht
Data which may change at runtime shouldn't be included in vertex descriptor, vertex descriptor should offer just pointer to a value where this data is available, thats how we can easy solve problems related to instancing. In this way user will be able to use the same vertex descriptor for both standard and instanced buffers. I'll commit those changes soon. Users whose defined vertex descriptor well, shoudn't need mixing vertex descriptors at run time. From eg. API point of view (OpenGL, but IIRC D3D9 works in similar way) current solution looks like this:
VAO - Vertex Descriptor (one VAO is available per draw call)
VBO - Vertex Buffer (multiple VBOs are available per draw call)
IBO - Index Buffer (one IBO is available per draw call)
VAO - Vertex Descriptor (one VAO is available per draw call)
VBO - Vertex Buffer (multiple VBOs are available per draw call)
IBO - Index Buffer (one IBO is available per draw call)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
Ill admit I don't understand where you are going but ill just wait and see and re write instancing again for dx9/11
Re: Finally, a DirectX 10 video driver for Irrlicht
Hi
thats also the reason why in example 11 parallax and bump mapping doesnt have fog...
regards
zerochen
edit: example 12 outputs now "Too many vertices for 16bit index type, render artifacts may occur." is this related to the lastest changes? (all drivers)...
edit2:
in CVertexBuffer.h
this code will add elements if already are elements in the array... maybe a Vertices.clear(); before reallocate?
i think it is more a problem if you have more than one shader. that example uses a base shader (EMT_SOLID) but this is ignored for now because you cant set more than one shader to one draw call. i guess if you will add the shader of example 10 to the fixed function shader it would work (isnt it?).Granyte wrote:One last thing the blending on example 10 is not working properly any one knows how to get it working? it seem like transparent material are zwritting
thats also the reason why in example 11 parallax and bump mapping doesnt have fog...
maybe a new define like SHADER_DEBUG and if it is defined it tries to load the shaders from a file? we also need a function to change/set the fixed function shader.robmar wrote:How about making a slight mod to take the core (old asm) shaders out of the source headers, and have them loaded from separate files?
cg is from nvidia. it has poor performance on other hardware. so dropping is not good. maybe later someone can add this. but for now i dont see advantages.robmar wrote: Also maybe drop having opengl and hsls and just use cg shader, or make that optional. I could convert some of them to C and also to Cg.
oh yes you are right. i can change that if nobody is working on it now...Granyte wrote:the driver already kind of optimise if it uploads to the shader or not....but it does not upload to the non pixel shader stages
regards
zerochen
edit: example 12 outputs now "Too many vertices for 16bit index type, render artifacts may occur." is this related to the lastest changes? (all drivers)...
edit2:
in CVertexBuffer.h
Code: Select all
virtual void set_used(u32 used)
{
Vertices.reallocate(used);
for (u32 i = 0; i < used; ++i)
{
T element;
Vertices.push_back(element);
}
}
Re: Finally, a DirectX 10 video driver for Irrlicht
@zerochen
Thanks for a report. Fixed in the latest rev
Thanks for a report. Fixed in the latest rev
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
i'm not touching anything until nadro is done with the meshbuffers
Re: Finally, a DirectX 10 video driver for Irrlicht
All should be done to the next week.Granyte wrote:i'm not touching anything until nadro is done with the meshbuffers
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
hi nadro
i have a new patch. can you apply it?
here we go
http://www.file-upload.net/download-850 ... patch.html
most changes are made in CD3D11MaterialRenderer and CD3D11CallBridge.
changes:
- fix crash with resetting shaders
- changed behaviour if shaders are in one file or not
- moved printVersion to the right place
- shader resources are applied to every shader stage (if needed), also update it only if they has changed
- fix bug in CVertexBuffer: getVertexType() returns -1 if you use it with your own vertexdescriptor
- shaders are compiled with macros (at the moment only with MAX_TEXTURES - it has the same value as MATERIAL_MAX_TEXTURES)
- clean up
regards
zerochen
i have a new patch. can you apply it?
here we go
http://www.file-upload.net/download-850 ... patch.html
most changes are made in CD3D11MaterialRenderer and CD3D11CallBridge.
changes:
- fix crash with resetting shaders
- changed behaviour if shaders are in one file or not
- moved printVersion to the right place
- shader resources are applied to every shader stage (if needed), also update it only if they has changed
- fix bug in CVertexBuffer: getVertexType() returns -1 if you use it with your own vertexdescriptor
- shaders are compiled with macros (at the moment only with MAX_TEXTURES - it has the same value as MATERIAL_MAX_TEXTURES)
- clean up
regards
zerochen
Re: Finally, a DirectX 10 video driver for Irrlicht
Patch applied I just add check for null pointer in getVertexType().
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Finally, a DirectX 10 video driver for Irrlicht
Hi there, I found a little bug in CVertexBuffer: the set_used method directly reallocate the buffer (which it should not). This can lead to weird behavior (have seen it with SPARK). But more importantly, this can be a huge performance problem.
So, this function:
Should be:
Also, I maybe repeat an already known bug (I don't know), but setting the material via driver->setMaterial result in incorrect material (color & depth write ignored, at least).
Anyway, thanks for the amazing work that was put in this !
So, this function:
Code: Select all
virtual void set_used(u32 used)
{
Vertices.reallocate(used); // <-- this is the line to change
while (Vertices.size() < used)
{
T element;
Vertices.push_back(element);
}
}
Code: Select all
virtual void set_used(u32 used)
{
Vertices.set_used(used);
}
Anyway, thanks for the amazing work that was put in this !
Re: Finally, a DirectX 10 video driver for Irrlicht
the depth write for transparent object is broken in dx11 it can be seen in the example 10
Re: Finally, a DirectX 10 video driver for Irrlicht
@Darktib
set_used is good just for plain types (missing constructor calls), thats why it was changed in last commit. Anyway maybe we should have two methods in CVertexBuffer:
1. set_used (missing constructor calls, anyway good for performance).
2. set_used_safe (reallocate + push_back, performance is worse than in method no. 1).
set_used is good just for plain types (missing constructor calls), thats why it was changed in last commit. Anyway maybe we should have two methods in CVertexBuffer:
1. set_used (missing constructor calls, anyway good for performance).
2. set_used_safe (reallocate + push_back, performance is worse than in method no. 1).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes