DirectX 11 render system - work-in-progress

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 09, 2013 8:09 am

Thanks everyone! :)
I have paused a little bit the further development process, because I have some university projects to do. Hopefully I can restart developing again on this weekend.
0 x
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 1
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Wolfmanfx » Tue Apr 09, 2013 8:42 am

@robert_sasu
Did you make any pull requests with your fixes into our main repo? If not maybe you could prepare one.
0 x

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Tue Apr 09, 2013 2:54 pm

Rober, I am very sorry, i'm really ignorant with github, i was trying to download the project to the branch v1-9 using the command

Code: Select all

hg clone https://bitbucket.org/sasu_robert/ogre3d-directx11 -b v1-9
But when the clone is done, i look inside the samples and isn't the PN Triangles. I really want to help you with the tesellation and lights shader, but please help me, telling me what i am doing bad with the repository clone ( I hate it ) :evil: :evil:
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 09, 2013 3:11 pm

Use this code :

Code: Select all

hg clone hg clone https://sasu_robert@bitbucket.org/sasu_robert/ogre3d-directx11 -r v1-9
.
To push use this:

Code: Select all

hg push --branch v1-9
@Wolfmanx
My code is prepared for an eventual pull request. I wanted to finish the new tessellation sample and after that I will make the pull request. Probably this weekend.
0 x
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
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Fri Apr 12, 2013 4:20 am

Hi...

I've started solving the shaders issues with the Ogre/NoTessellation. I've changed some code in the sample and added textures.

Here is a pick, showing the improvements, like most accurate bump mapping and multi lighting.

Image

Now i want to commit the changes, but i'm affraid. If i jus run the command robert_sasu gives me

Code: Select all

hg push --branch v1-9
May i break some other change maded in the same files i am working?

If i jus want to commit some files and folders in different locations, and not all the changes i was made in the project what is the command to do it?

Once again, i'm filling me bad because i really don't know to much git.

Thanks.
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Fri Apr 12, 2013 7:07 am

Hi,

If you donwload the TortoiseHG program then you will have a graphical user interface for selecting what do you want to commit. You just right click on the local folder of the repository and select hg commit. Then you select all the files you want to add or commit, and write a commit message, then push commit. Finally you type the command I gave you. This is how I do these things :).
0 x
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
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Mon Apr 15, 2013 2:20 am

I've pushed the changes ..... :D
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Mon Apr 15, 2013 8:45 am

Nice work :) Thank you :)
0 x
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: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Mon Apr 15, 2013 12:28 pm

Here is a demontration of PN-Patches algorithm integrated to Ogre3D as a sample. The work was done by Juan Camilo Acosta Arango @ja0335 and myself. I will add some small improvements to the shaders in the next few days
http://www.youtube.com/watch?v=TXU55pj0 ... r_embedded
[youtube]TXU55pj0_NE[/youtube]
0 x
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: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 16, 2013 9:34 am

After this update, I want to make a pull request, but I have a question. Should I sync my code with the official repo before the pull request or not ? :)
0 x
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

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman » Tue Apr 16, 2013 9:39 am

sync
0 x
Watch out for my OGRE related tweets here.

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Wolfmanfx » Tue Apr 16, 2013 9:40 am

Yes and make you sure you merge it than with 1.9 so we can apply it over the webinterface.
0 x

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 16, 2013 9:48 am

I do not find the option of selecting a branch while syncing the official repo with my repo. I want to select branch v1-9 to sync, but I have no option there, just the default branch, which is outdated. Can you help me with this ?
0 x
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 1
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Wolfmanfx » Tue Apr 16, 2013 9:54 am

thats ok sync the default is outdated because i merged 1.9 back to default
0 x

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 16, 2013 11:00 am

I've synced the repos, but now I have 2 heads for v1-9 and the default branch. I tried to merge them local (did not do) but I swa a lot of changes and conflicts, and didn't seemed correct to me. I've tried to search what should be the correct approach for this problem, but couldn't find. Can you help me with this ? All Ogre developers have admin access to my repo.
0 x
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: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Tue Apr 16, 2013 1:10 pm

I have been able to merge everything into default, I compiled the code, and test the samples for mistypes or anything what occured when merging and created the pull request after.
0 x
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

fabio71
Gnoblar
Posts: 11
Joined: Thu May 12, 2011 10:18 am

Re: DirectX 11 render system - work-in-progress

Post by fabio71 » Thu Apr 18, 2013 10:22 am

Hi, I'm interested in the DX11 Render System but didn't have a look at it yet (I'm waiting for the official 1.9 release). I have a couple of questions about it:

1. The sample BezierPatch can work with DX11 Tessellation? I mean the PatchMesh you can create with SceneManager::createBezierPatch.

2. Is it possible to use the WARP device maybe with a call to RenderSystem::setConfigOption?
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman » Thu Apr 18, 2013 11:06 am

1. No - but there is a different sample for tessellation.
2. Yes, it works, there is an option for that in the config.
0 x
Watch out for my OGRE related tweets here.

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Thu Apr 18, 2013 10:59 pm

Hi...

i've working on multi pass shader for the lighting a tessellated shader. Currently i reached a point in where i don't know what to do. The problem is:
I have a pass in where i tessellate the object and other pass for lighting, this last will be repeated once per light. If i do it in that way, the geometry generated in the first pass is different from the
generated in the secon pass ( no tessellated ). I don't know how to share the new created geometry from the first pass to the second pass. :evil:

if any one know some about this please share, it is for the ogre sample browser :D

Code: Select all

	technique
	{
		pass tessellation
		{
				.
				.
				.
		}
		pass perlight
		{
			iteration once_per_light
			scene_blend add

		}
0 x
Juan Camilo Acosta Arango

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Fri Apr 19, 2013 4:49 am

I've done some more improvements in the shaders:
- coding.
- In the tessellation shaders i only have added support for the first light.
- added more sliders to control the tessellation proximity and range.

Can i push the changes?

Image
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Fri Apr 19, 2013 6:56 am

Nice work, you can push the change, but be careful because I have synchronized my repo with the official repo. So make sure you push just the changeset you made. First you have to pull, then update and merge the code, after that you can also push it :)
0 x
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
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Fri Apr 19, 2013 9:48 pm

hey robert...

I found a great hole in the directx 11 render system. OgreD3D11RenderSystem.cpp. You have no a way to sample textures from domain or hull shaders.

i thinks is just add something like

Code: Select all

mDevice.GetImmediateContext()->DSSetShaderResources(static_cast<UINT>(0), static_cast<UINT>(opState->mTexturesCount), &opState->mTextures[0]);
And...

Code: Select all

mDevice.GetImmediateContext()->HSSetShaderResources(static_cast<UINT>(0), static_cast<UINT>(opState->mTexturesCount), &opState->mTextures[0]);
And in the texture unit add support for

binding_type <vertex|fragment|hull|domain>

Do this, is necessary because when adding displacement support i need sample a texture from the hull shader. I've looking the code and added support but when i close the app it crash, this is why i think is best you do it because you must know where the changes must be done. :D

I'll be waiting for it to add a displacement sample i'm working on.
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Fri Apr 19, 2013 10:03 pm

Thanks for your observation, I will look and resolve this problem this weekend :). I probably missed this out when added support for tessellation.
I think the app crashes because after hitting the exit button the destructors are called and probably there is some memory violation somewhere. This is a guess now. But you can push the code, and will debug it :). I see all the changes you do :)
0 x
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
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 » Sat Apr 20, 2013 12:08 am

Giving a more in depth look to the code, it looks like a titanic task :|
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu » Sat Apr 20, 2013 7:25 am

Not a problem, I will do it in the next days. Just push everything you have done and I will finish it :).
0 x
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