Similar Content

Hi all,
As a part of the debug drawing system in my engine, I want to add support for rendering simple text on screen (aka HUD/ HUD style). From what I've read there are a few options, in short:
1. Write your own font sprite renderer
2. Using Direct2D/Directwrite, combine with DX11 rendertarget/ backbuffer
3. Use an external library, like the directx toolkit etc.
I want to go for number 2, but articles/ documentation confused me a bit. Some say you need to create a DX10 device, to be able to do this, because it doesn't directly work with the DX11 device. But other articles tell that this was 'patched' later on and should work now.
Can someone shed some light on this and ideally provide me an example or article on how to set this up?
All input is appreciated.

I've just started learning about tessellation from Frank Luna's DX11 book. I'm getting some very weird behavior when I try to render a tessellated quad patch if I also render a mesh in the same frame. The tessellated quad patch renders just fine if it's the only thing I'm rendering. This is pictured below:
'
However, when I attempt to render the same tessellated quad patch along with the other entities in the scene (which are simple triangle-lists), I get the following error:

Am trying a basebones tessellation shader and getting unexpected result when increasing the tessellation factor. Am rendering a group of quads and trying to apply tessellation to them.
OutsideTess = (1,1,1,1), InsideTess= (1,1)

Hello,
I've stumbled upon Urho3D engine and found that it has a really nice and easy to read code structure.
I think the graphics abstraction looks really interesting and I like the idea of how it defers pipeline state changes until just before the draw call to resolve redundant state changes.
This is done by saving the state changes (blendEnabled/SRV changes/RTV changes) in member variables and just before the draw, apply the actual state changes using the graphics context.
It looks something like this (pseudo):
void PrepareDraw()
{
if(renderTargetsDirty)
{
pD3D11DeviceContext->OMSetRenderTarget(mCurrentRenderTargets);
renderTargetsDirty = false
}
if(texturesDirty)
{
pD3D11DeviceContext->PSSetShaderResourceView(..., mCurrentSRVs);
texturesDirty = false
}
....
//Some more state changes
}
This all looked like a great design at first but I've found that there is one big issue with this which I don't really understand how it is solved in their case and how I would tackle it.
I'll explain it by example, imagine I have two rendertargets: my backbuffer RT and an offscreen RT.
Say I want to render my backbuffer to the offscreen RT and then back to the backbuffer (Just for the sake of the example).
You would do something like this:
//Render to the offscreen RT
pGraphics->SetRenderTarget(pOffscreenRT->GetRTV());
pGraphics->SetTexture(diffuseSlot, pDefaultRT->GetSRV())
pGraphics->DrawQuad()
pGraphics->SetTexture(diffuseSlot, nullptr); //Remove the default RT from input
//Render to the default (screen) RT
pGraphics->SetRenderTarget(nullptr); //Default RT
pGraphics->SetTexture(diffuseSlot, pOffscreenRT->GetSRV())
pGraphics->DrawQuad();
The problem here is that the second time the application loop comes around, the offscreen rendertarget is still bound as input ShaderResourceView when it gets set as a RenderTargetView because in Urho3D, the state of the RenderTargetView will always be changed before the ShaderResourceViews (see top code snippet) even when I set the SRV to nullptr before using it as a RTV like above causing errors because a resource can't be bound to both input and rendertarget.
What is usually the solution to this?

Hello,
I wrote a MatCap shader following this idea:
Given the image representing the texture, we compute the sample point by taking the dot product of the vertex normal and the camera position and remapping this to [0,1].
This seems to work well when I look straight at an object with this shader. However, in cases where the camera points slightly on the side, I can see the texture stretch a lot.
Could anyone give me a hint as how to get a nice matcap shader ?
Here's what I wrote:

Recommended Posts

right now I'm having a program which is supposed to render multiple passes. So my theory was as following:

Shader Pass Color Alpha = 1.0f/AmountOfPasses

And this would be true for all shaders. But the problem is that it doesn't really work. It it like e.g. two passes, first.alpha: 0.5 second.alpha:1 or something like that?

Well my method doesn't really seem to work as the second pass isn't visible for some reason. But no matter if my shaders are somehow wrong, what is the correct way to render multiple passes to get one image?