[GSoC 2012] Complete the DirectX 11 render system

Threads related to Google Summer of Code
Post Reply
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by duststorm »

jacmoe wrote:You can 'forget' those files, and add them to an .hgignore file and commit/push again.
It's no problem.
Mercurial is very forgiving. :)
Really? you mean that hg will purge any existence of them from its history?
That's a very handy feature! :) Thanks, I didn't know that.
Developer @ MakeHuman.org
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by spacegaier »

Doesn't sound like it touches the history: http://stackoverflow.com/a/1101473

Also: http://stackoverflow.com/a/1030463
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by duststorm »

How about amend? Can it change the history?

Hmm, I guess this contains the best answer: http://hgbook.red-bean.com/read/finding ... :aaaiiieee
Developer @ MakeHuman.org
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by jacmoe »

History is sacred in Mercurial. :)

To remove an already added and committed file, you need to 'forget' it, add it to .hgignore and commit/push.
It doesn't remove it from history, but it removes it from the repository, which is what you want.

BUT, if you are the only one working on the repository, and you have the mq extension (IIRC), you can strip the changesets.
And permanently erase a string of changesets from history.
That does only work if the changesets you want to kill is the last ones.
Not recommended, unless the repo is completely f****d up.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I have removed the Dependencies folder from my repo and added to hgignore to not make further errors. I am working on the tessellation feature created functions as:
_setTessellationMode(const String &tMode);
_setReductionMode(const String &rMode);
_setuQuadTessFactors(unsigned int qLeft, unsigned int qRight, unsigned int qTop, unsigned int qBottom);
_setTessFactor(); _setScale();
For setting the general tessellation variables.
In the init function I initialize all variables to a common value. Then have different methods for calculating(setting) Hull and Domain shaders for Triangles and Quads separately. Finally methods for patternTessellation for triangles and quads.

Tomorrow I will continue this work and I will also work with testing after I got the modules from cherlix.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

Today I have been working with the implementation of the domain and hull shaders to the current version of DirectX 11 Render System. I have almost finished the work, will push my code when I finish the implementation. I have also continued to work with the pattern tessellation, which is on the final stages.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman »

Can you draw up a quick summary class diagram of the classes you created\modified?
Watch out for my OGRE related tweets here.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

OgreMain/include/OgreGpuProgram.h
OgreMain/include/OgrePass.h
OgreMain/include/OgreRenderSystem.h
OgreMain/include/OgreRenderSystemCapabilities.h
OgreMain/include/OgreScriptCompiler.h
OgreMain/include/OgreScriptTranslator.h
OgreMain/src/OgreGpuProgram.cpp
OgreMain/src/OgrePass.cpp
OgreMain/src/OgreRenderSystem.cpp
OgreMain/src/OgreScriptCompiler.cpp
OgreMain/src/OgreScriptTranslator.cpp
RenderSystems/Direct3D11/include/OgreD3D11GpuProgram.h
RenderSystems/Direct3D11/include/OgreD3D11HLSLProgram.h
RenderSystems/Direct3D11/include/OgreD3D11RenderSystem.h
RenderSystems/Direct3D11/src/OgreD3D11GpuProgram.cpp
RenderSystems/Direct3D11/src/OgreD3D11GpuProgramManager.cpp
RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp
RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp

These are the classes I have modified for this support. I will add more details about this part of the work after I push my code (tomorrow).
I have also created OgreD3D11Tessellation.h and OgreD3D11Tessellation.cpp which will contain the methods I described I want to make for tessellation. First of all a general pattern tessellation, after that I will continue with implementing PN-Patches, Detailed tessellation with brezier displacement and surface tessellation. These methods will use all the implemented functions/methods I created so far (Domain, Hull and Compute shaders).
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I ave pushed my code to the repo, later today I will come with more changes. I created GPU programs for the 3 shaders (Compute, Domain and Hull) and implemented all the necessary functions for these. I have also added support for geometryshader, as it was missing in at some point in the D3D11 Render System.

I have added 2 files from Sample of DirectX11 Tessellation Tutorial - www.xtunt.com, for tessellation samples.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by duststorm »

You're really making good progress. I must say I'm really amazed at the quality of this year's GSoC projects, some amazing work is being done.
Keep it up, you're doing some really valuable work here!
Developer @ MakeHuman.org
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I have completed the support for hull, domain, compute and geometry shaders. If I missed out something please tell me :).

Here are the options for rendering:

We have more shader models (hull, domain, compute, vertex, pixel, geometry).
These are the possibilities of rendering:
1. vertex, fragment(pixel)
2. vertex, geometry, fragment(pixel)
3. vertex, hull, domain, fragment(pixel)
4. vertex, hull, domain, geometry, fragment (pixel)
5. compute

General set-up's to decide which shaders will we use:
1. if we are using compute shaders, other types of shaders are impossible to be bound
2. Tesselation is enabled when hull and domain shaders are bound
3. Stream output is enabled when vertex and geometry shaders are bound, and there is no fragment(pixel) shader bounded
4. DrawAuto is enabled when VertexData::vertexCount == -1
5. Otherwise, vertex-fragment(pixel) and vertex-geometry-fragment(pixel) behavior remained the same
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Xavyiy »

As @duststorm pointed out, you're doing an amazing work. Can't wait to see it in action!
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I have cleaned up a little bit my code and corrected the errors. Also added a sample for tessellation which uses the hlsl file added on Saturday. cherlix finished his work on testing the first tasks we were working on, I will upload the results later today.

I have also added the newly created class OgreD3D11Tessellation for DirectX 11 Render System. I want the user to be able to run a defined tessellation with calling on method, so to simplify the usage. It is not complete and it is just for the pattern tessellation, but will continue to do the more complex algorithm for tessellation, as I described it a week ago. I would need some suggestion on this part, as I can't really decide how would this be the best :). I am having problems just on setting and creating the shaders: whether to oblige the user to set every single shader, or just create them there and asking for the object which he wants to tessellate. Another question would be (in the second case) should I compile the shader from the file or from the memory (which would be passed as a parameter (a path + filename or a pointer to the memory).

If you have any other suggestions, please tell me :).
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman »

Use our stream - not a file name.
Watch out for my OGRE related tweets here.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I have completed the pattern tessellation, and continued to work with PN patches algorithm. I have also improved capabilities check for D3D10, D3D10.1 and D3D11 drivers. I have also continued to work with cherlix on the test modules.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman »

Great.
Watch out for my OGRE related tweets here.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

Today I will continue to work and upload the code again, around midnight time with some more changes :).
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Brocan »

A few screenshots? :mrgreen:
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

I have talked with cherlix, we need to rewrite the shaders on our test modules. He will do it on the next 3 days. In this time I will continue to work on tessellation support. After cherlix will finish his code, I will prepare the showcase of the work which has been done so far. I will try to update some screenshots tomorrow, but the a showcase for a complex test will be done in the week-end.

In the next week I will also make some samples for PNPatches and detailed tessellation with Brezier displacement.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

Yesterday I have found some bugs, I resolved it and everything was working fine. Today I was making some adjustments to the tessellation sample file (just that). SampleBrowser was working until a point when I changed on what video-card to run (from Intel HD4000 to GeForce GT640M, each compatible with DX11). After that I can not run SampleBrowser I get 2 errors. Even if I changed it back it doesn't work. I reinstalled everything still the same. I have also installed to another folder, neither that resolved my problem. It seems that Ogre doesn't recognize my videocards.

Can somebody help me on this ?

For Intel HD4000: Image

For GT 640M: Image
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Wolfmanfx »

I think under the user folder appdata roaming or something like that the samplebrowser saves a cfg file which containse the last selected rendersystem and video mode.
So after switching the device the video mode is not avaiable on one of the cards so it crashes - to resolve this error locate the cfg file and delete it and everything should work.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman »

Yes.
If deleting the cfg file doesn't help - post the full call stack.
Watch out for my OGRE related tweets here.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Mind Calamity »

I just checked it and it's in "%HOMEPATH%\My Documents\Ogre" and there should be a directory named by the codename of the OGRE version you're using (for me it's Byatis).
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman »

Can you summaries what have been done so far in the project - and was is still left to do as we continue?
Watch out for my OGRE related tweets here.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu »

Yesterday I have been to a wedding till 6 am today, so I couldn't work on Saturday and Sunday, but I consider I am ahead of my proposed work.

Till now this tasks are mainly done nr. : 1, 2, 3, 3.1, 3.2, 3.3, 8, 9, 10.
1. Test and merge the DX11 enhancement patch
2. Test and merge the DX11 Unicode build and alpha-blending support
3. Planning the tessellation support, adding support for Shader Models 5.0
3.1 Tessellation Pattern Viewer
3.2 PN-1 Triangles algorithm
3.3 Detailed tessellation, Brezies with displacement
8. Test and merge the DX11MRT Support patch
9. Test and merge the DX11Separate Scene Blending & operations patch
10. Test and merge the DX11 comparison filtering implementation patch

The screenshots will come soon, I just have to do some debug to obtain the proper result.

In the next phase, after I will finish debugging and showing all the results, there are 2 major and 1 minor tasks to be done for the second part of GSoC:
1. Testing multi-window support
2. Multi-device support (copying from Directx9RS and making adjustments)
3. RT shader system support for shader model 4/5 with dynamic linking

Cherlix started to work on rewriting the shaders in the RT shader system to Shader Model 5.0.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Post Reply