Tag Info

New answers tagged

0

You can't use SV_Position for this in hlsl, you should get the position from an other output slot without the SV_Position semantic instead. output.mPosition = float4(output.mTexcoord * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f); output.mNewPos = output.mPosition; //use mNewPos in the pixel shader SV_Position is just for the rasterizer.


0

Ah ok I didn't think I needed the input layout any more Changing the second example to include this ... vertices = Buffer.Create(device, BindFlags.VertexBuffer, data); var inputLayout = new InputLayout( device, ShaderSignature.GetInputSignature(vertexShaderByteCode), new[] { new InputElement("POSITION", 0, ...


1

So the short answer is to turn on the debug layer. Thanks to @Nathan Reed for pointing that out. I tested it out and verified that it does indeed detect when shader signatures are incompatible. I also verified that new SV inputs to a shader stage must come last in the list of inputs.


0

Have a look at Reoriented Normal Mapping, it will allow you to blend several normal maps on top of each other and give the intuitively expected result. The main idea is to transform the the normal to blend to the local space of the surface your blending on, or in this scenario, the normal mapped space of the surface.


0

Since there is no value for this listed in the Direct3D 11 Resource Limits I don't think there is a limit. However according to the documentation 9_1 feature level devices only support 16-bit index buffers.


2

Play some game with your system. Check FPS you are getting. Analyze what is on the screen of the game and compare to yours. If your one cube is rendering slower than game screen, you are obviously doing something wrong. I would expect one cube with all the normal stuff applied running atleast 500-1000fps on my computer. I can run games like Battlefield 4 ...


0

Well I wasn't able to find if a straight conversion from a Xaml string to a Direct2D Geometry object exists. I used this SE answer to build my own version. It works by parsing the markup and converting the resulting instructions to GeometrySink commands.


1

You could do something as simple as XMVector3TransformNormal of the direction light with the original Rotation. Generally in SIMD-friendly coding, individual component access is a performance hit, so you want to avoid doing it whenever possible. That's why in DirectXMath (aka XNAMath version 3) the individual element members _11 - _44 were removed from ...


0

Before you get too deep into this project I'd like to comment. It looks like you're drawing the whole cube for each block in the world. If I am wrong, then ignore this, but if I'm right you should definitely consider a more efficient approach. You do want one normal per face, which probably means drawing cubes with 24 vertices (4 vertices per face, instead ...


0

If you would do hard normals for these boxes it would eliminate your problem. For that you have to have a normal not per vertex, but per face. You could do this by having four vertices with the same normal for each face of the cube, that is 24 vertices. That way, a whole face will receive an even amount of light. You also mention that you tried to combine ...


3

No, you can write to the stream output buffer from the vertex or geometry shader in D3D11. You must create your shader using ID3D11DeviceContext::CreateGeometryShaderWithStreamOutput call to enable this function. You can call it for a vertex shader or a geometry shader too. You also need to create a buffer which you write to and set it with ...


1

Effects 11 is not supported by Windows Store apps for Windows 8.0 because it requires D3DCompile APIs at runtime. Hence, 'technique11' and it's kin are deprecated. Effects 11 also has specific compiler support in the HLSL compiler, which in the latest (#47) is still there but emits a warning. Some newer DX 11.1 and DX 11.2 constructs are not supported with ...


1

I think you might be overengineering, or at least abstracting too much away. While the GameEngine can certainly utilize composition in the form of services, I wouldn't treat the GameEngine as an Entity along with the rest of your game objects. If you are planning to have a 1:1 mapping of component types and services, I would definitely let each service ...



Top 50 recent answers are included