Questions tagged [sharpdx]

SharpDX is an open-source third-party managed DirectX wrapper.

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

Is there any performance difference between Draw() and DrawInstanced(1)?

The background of the question is, does it make sense to introduce an if case when drawing a mesh for whether there is instancing or not? This is using DirectX 11 ...
0 votes
1 answer
888 views

Zoom at a specific point using Orthographic camera

Currently I can perform Zoom which seems to be working fine but essentially what I'm really trying to do is zoom on a position offset from center as currently when I zoom then zoom is performed at the ...
1 vote
2 answers
675 views

SharpDX instancing with D3D11

Could anybody provide working code using SharpDX with D3D11, which does instancing and uses SharpDX's content pipeline? I have several problems there. I came to understand that one should use a ...
1 vote
1 answer
653 views

SharpDX Error 'The Parameter is Incorrect', how to debug from dx?

I have written some code to handle a DX device. When the code is finished and makes it's call to DX the DX engine is complaining. What I'm looking to understand is how one goes about debugging on the ...
2 votes
1 answer
227 views

Retrieving shared video memory using SharpDX

I am trying to retrieve the total available video memory using SharpDX via DXGI, using the Description of the best available adapter. The DedicatedVideoMemory is correct (1GB in my case), but the ...
0 votes
1 answer
1k views

Off-Screen Image processing with SharpDX

I need help with a image processing task... I'm using SharpDX which I am very new to. I have a device3D, device3DContext... I have a Texture2D for off-screen rendering... I have a RenderTargetView... ...
0 votes
1 answer
30 views

XInput (SharpDX) not returning 0 on thumb sticks when they're idle

When querying XInput for the status of the thumb sticks, it doesn't return 0 when the sticks are not in a moved position. Instead, it returns an arbitrary value which is a small portion of the value ...
2 votes
2 answers
1k views

How can I get the color of a pixel in a SharpDX Direct2D bitmap or render target?

I am working on a simple drawing game and I need to get a Flood Fill algorithm working for a Paint Bucket tool. I have the game running on WinForms at the moment which is extremely slow, but I have a ...
0 votes
0 answers
20 views

Unable to draw Primitives on Texture in SharpDX

I have a little problem with rendering in my SharpDX Direct11 App. I had being tested rendering scene on a texture, and then draw this texture on the backBuffer. ...
0 votes
2 answers
284 views

How the game engine handles camera view in DirectX

I am quite confused with how the game engine handles camera view in DirectX. I know all the matrix stuffs, but where the projection matrix goes finally seems rarely mentioned. I looked up in the ...
-1 votes
1 answer
218 views

vertex manipulation in instanced shader hlsl SHARPDX 4.2

I am using the same vertex shader and pixel shader for my instances. I am sending ONE FLAT array that contains all the instanced chunk bytes that make the cube of the Minecraft terrain. My goal is to ...
10 votes
1 answer
5k views

Is SharpDX mature enough to adopt yet or should I just start using SlimDX right now?

I'm about to stop my game-project in XNA because from what I can gather it's development is coming to an end (and it's already behind current technology). Therefore, I need to adopt a new framework or ...
0 votes
1 answer
447 views

How to create a texture SRV with different sRGB format from a render target in DX11?

Is it possible to bind a texture with a different format as render target and as shader resource view? Specifically with a different _SRGB suffix. My goal is to render a shader into an R8G8B8A8_UNORM ...
0 votes
1 answer
175 views

VSSetConstantBuffers1 does not appear to be working

I'm experiencing something very strange here when using VSSetConstantBuffers1. I have a projection * world matrix that I'm sending to a constant buffer to rotate a triangle on an axis. When I do ...
3 votes
1 answer
3k views

How do I use SharpDX with the .NET Core framework?

I started a project to build a game engine. As a result of circumstance, I won't have the luxury of building the engine in C++, so I'm going to have to settle for C# with the .NET Core. Given that ...
1 vote
1 answer
69 views

Polygon draw order issue

I'm working on a software and I'd to move the rendering API from SlimDX to SharpDX. I've done that but I noticed that the solid polygon are not drawn correctly i.e., even if the polygon is at the back ...
2 votes
1 answer
457 views

What is the proper strategy to manage vertex buffers?

I have created a large variety of shaders for my game engine for different use cases. The vertex input for the shaders depend on what I want to do with them. For example, if I want to just render the ...
0 votes
1 answer
134 views

Creating Compute Shaders throws E_INVALIDARG exception in SharpDX

I've recently been working on a small helper for creating and using compute shaders in C# along with Monogame/XNA. My end goal is simply to have compute shaders working in C#. My main issue is as such:...
1 vote
0 answers
260 views

Optimized way to show Unity RenderTexture in WPF using SharpDX

I'm writing a Unity plugin which uses WPF for UI , Plugin runs in same process of Unity and has direct access to unity's memory. Unity Code : ...
3 votes
0 answers
172 views

Simulating wind (vertex bending)

Right now I'm using the Crytek vegetation bending technique, vertex colors control how much force is applied to the branches, leafs and trunks. I have it working and it looks nice but I'm just using ...
1 vote
1 answer
279 views

Calculating 3D character movement based on YAW and Pitch

I'm not sure how to calculate an XYZ immediately to my characters left based on the direction they are facing. I am learning to create a 3D game in Monogame on top of .Net Core 3.1 in c# using ...
4 votes
1 answer
2k views

How to Convert DirectX Texture2D to a DXGI Surface for WPF Rendering?

I have an image in my WPF application that uses a D3DImage to render DirectX content. On the DirectX side I render everything to a ...
0 votes
2 answers
501 views

How can I install SharpDX for my project?

Unfortunately, as an experienced developer, I can not find the download link for SharpDX's binary files on SharpDX's download page here https://www.nuget.org/packages/SharpDX/4.2.0 I am very ...
0 votes
0 answers
143 views

HLSL setting data on ONE Geometry instance - For chunk Terrain gen. SharpDX 4.2

I am just trying to send the size of an array from my c# script to my HLSL shader in order to initiliaze a vertex array inside the shader. It just ain't working. As I have read everywhere, we can't ...
0 votes
1 answer
59 views

Extrude only vertices where the assigned texture is transparent?

I am looking at implementing a water surface on my spherical object and have created a texture with transparent pixels where the water should be. However, I am currently confused on how I can extrude ...
0 votes
2 answers
167 views

Swapping Y and Z causes problems with Camera

I am trying to swap the Y and Z axis in my program. Everything worked great when Y used to be the axis coming out of the plane. After having swapped y and x, I have been able to draw my terrain ...
0 votes
1 answer
602 views

How can I send effects to joystick connected to my PC USB using C# and sharpdx?

I can get a list of the joysticks connected to my PC. But now I want to send effects for example to send a command that will make a button click for example the triangle button or the square button. ...
1 vote
0 answers
133 views

HLSL - GPU Performance Impacts of degenerate triangles

The background: After refactoring some code last night and realising I have had an issue that may of been impacting GPU performance. My particle system uses the geometry shader to expand a single ...
0 votes
1 answer
2k views

How do I draw text using DirectX 12?

I'm currently tasked with porting a control from Direct 11 to DirectX 12. How do I draw text on the screen? How do I draw any 2D on a DirectX 12 device? Current Text rendering code is below: <...
0 votes
0 answers
410 views

Crash on creating pipeline state - "the parameter is incorrect" - HRESULT 0x80070057

All input appears valid, although the DirectX12.ShaderByteCode() pointer is null - I don't know if that's indicative of anything; the buffer does contain data. Edit: Diagnostic hub output: ...
1 vote
1 answer
1k views

Pixel Shader stage did not run

I can't figure out why the pixel shader won't run. I'm using the Blinn-Phong per-pixel shader from here. Only change I've made is that I pass an aditional color per vertex which gets multiplied by the ...
-1 votes
1 answer
42 views

How do i rotate my view on its own center

PROBLEM I am trying to translate and rotate my view, the translation works fine but when rotating the rotation is happening on the center of the world(0,0,0) instead of the view position. EXAMPLE ...
0 votes
1 answer
434 views

Grainy texture from distance

I am using SharpDX, a C# wrapper over DirectX 11 to render terrain. While I am able to render terrain correctly, I noticed that moving around creates a lot of visual noise and makes the texture of ...
2 votes
2 answers
1k views

Shortest path from BitmapSource to DX11 Texture2D

Does anyone know a way to get from (WPF) System.Windows.Media.Imaging.BitmapSource to a DX11 Texture2D without going to System.Drawing.Bitmap? I'm trying to strip out all System.Drawing references as ...
0 votes
1 answer
262 views

Should I rotate the Camera using the View or World?

I have an issue with roll/rotation. I have a Camera defined to move along X and Y axis at a given Z for zoom. The camera is always pointed straight down the Z axis so there is not any yaw or pitch. I ...
1 vote
1 answer
193 views

Ugly Textures in the Distance

I'm here with another question about direct 3d 11 (sharpdx). My terrain engine is working good, but theres a problem with texture mip maps or filter which I can't figure out :/ The problem is basic. ...
0 votes
1 answer
238 views

Instancing mirrored geometry

I'm rendering mirrored geometry by flipping it's world matrix. Before rendering mirrored geometry I set CULL_FRONT rasterizer state (for normal geometry it's ...
0 votes
1 answer
418 views

SharpDX DirectInput Force feedback actuators are missing

I am using a simple code to read input from a DirectInput device. I would like to add force feedback to the device, however when I run this test, I cannot find any ForceFeedbackActuator, however my ...
0 votes
0 answers
161 views

A question about HLSL debugger in Visual Studio Graphic Diagnostics

Here 's the thing. I developed a graphic project using SharpDx. Every time I actived the graphic diagnostic and debuged some hlsl code in my shaders, It always showed me the disassembling code rather ...
0 votes
0 answers
266 views

Sharpdx 2D Camera not moving

I am trying to move a camera to the right, but it isn't moving. i use this code to move: Camera.Position.X = gameobject.transform.Position.X; This is the camera ...
0 votes
1 answer
1k views

How do i get a list of all joysticks connected to my pc in usb using sharpdx with c# ? Getting errors

The code: ...
0 votes
1 answer
259 views

SharpDX Y position inverted

I am currently drawing objects and it works perfectly, when i make x bigger the objects go right and when i make x lower they go left perfect, but when i make y bigger the object goes down and when i ...
0 votes
1 answer
1k views

Freeing texture memory in SharpDX - what am I missing?

I'm having a torrid time trying to resolve an issue whereby my total GPU memory consumption keeps rising throughout the course of my application, until the application fails with a DX out of memory ...
1 vote
1 answer
71 views

Multiple Mesh Renderes with Matrices. (Direct X11, C#)

im just confused: Im trying to render 2 cubes instead of one. So in my main class i have my WORLD matrix. Then if i render the mesh the camera is multiplying all matrices with the ...
0 votes
1 answer
169 views

How the sharpdx set vertices by reading the vertex information files instead of coding the vertices?

During my developing, I always spend much time to fill up my vertex array by coding every vertex information when I have to create some complex models. It's quite inconvenient. It's will be very ...
1 vote
1 answer
373 views

Device Disposing Memory leak issue

I have a memory issue after disposing all my D3D objects and lastly disposing the device. I want to free all memory and, depending on user interaction, creating a new device, but removing all memory ...
0 votes
1 answer
168 views

A question about SharpDx Colored Cube

Recently I start to study SharpDx, so I am a newbie for it. I try to create a cube which has difference color on each vertex such as the picture below. However, what I created after my coding is ...
1 vote
0 answers
63 views

Why do I are my quads outlined when rendered?

I have a 3x3 quad wall I am rendering to. I render to a 3x3 because the complete image exceeds the maximum single texture limit. So I've cut the image into a 3x3. The issue I'm having is that when ...
0 votes
1 answer
770 views

How to export FBX models to use in SharpDX?

I am trying to export a model from 3ds Max 2014 as a fbx file and use it in my SharpDX driven project. In the SharpDX example solution, there is a project named ...
0 votes
1 answer
772 views

How to pan a perspective camera over a 2D scene with click & drag

I have an issue panning, my camera with the mouse. The camera travels on x and y. I'm using z to zoom. The camera travels over a single textured quad. I have the camera set up with a View(LookAtLH) ...