Questions tagged [sharpdx]
SharpDX is an open-source third-party managed DirectX wrapper.
178
questions
0
votes
1
answer
287
views
Force Feedback on joystick device using SharpDX DirectInput API
The Goal (for context)
Get input from a USB joystick device in the Unity Game Engine and activate Force Feedback functionality on the joystick from Unity.
The Method
I am using the SharpDX.DirectInput ...
1
vote
1
answer
147
views
D3D11 ERROR ("invalid arguments") from HLSL shader
I am using MonoGame 3.8.1.303 with Windows/DirectX.
I am just rendering a TriangleList using DrawIndexedPrimitives, but I am ...
-1
votes
1
answer
34
views
SharpDX 3d Camera Rotation clamping Camera y rotation
Im trying to make some 3D graphics in C#.
Everything been working out great so far except for one thing.
I want a fps-like camera, that stops when looking down / up.
I Tried:
Clamping the "...
0
votes
1
answer
208
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
143
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 ...
0
votes
1
answer
904
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 ...
2
votes
1
answer
833
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
220
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
1
answer
79
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 ...
1
vote
0
answers
374
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 :
...
1
vote
1
answer
507
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 ...
0
votes
2
answers
646
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 ...
-1
votes
1
answer
248
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 ...
0
votes
0
answers
153
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
64
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 ...
1
vote
0
answers
189
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
2
answers
221
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
0
answers
496
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
votes
1
answer
51
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
199
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 ...
0
votes
1
answer
535
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 ...
1
vote
1
answer
232
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
490
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
187
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
296
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
338
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 ...
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
vote
1
answer
92
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
203
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 ...
0
votes
1
answer
213
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
1
answer
449
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 ...
1
vote
0
answers
66
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
298
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 ...
0
votes
1
answer
881
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) ...
3
votes
0
answers
102
views
How would one get the pixel value of a texture under the cursor?
I have a requirement to detect which pixel of a texture is under the cursor in the 3D world. I assume that Ray casting is involved however, after that I'm not sure how one would accomplish this.
Can ...
1
vote
1
answer
395
views
Processing large multi layered images with SharpDX
I'm currently working on an image processing project that pans and zooms on multi-layer high resolution images.
The goal is colorize (including color, gain and noise) ...
1
vote
1
answer
363
views
Merging multiple image with DirectX D3DImage best approach?
I'm currently rendering up to 6 images (7440 x 7440) together via a series of colorizing shaders (one each image) and then merging shaders (5 to merge colorizer result). I'm not getting the ...
3
votes
0
answers
393
views
Performance of ClearRenderTargetView
While profiling GPU usage in VS2017, I've noticed a strange disproportion in performance of ClearRenderTargetView compared to ...
0
votes
1
answer
212
views
Using DirectX(SharpDX) what is the best way to create a single large image from smaller images?
I'm looking for the best way to combine several images (1060 x 1060)each into on large image. I'm looking to create one texture to apply to a single Quad. I was thinking multiple quads and then just ...
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 ...
1
vote
1
answer
135
views
SharpDX(DirectX 11) N-tier layering of images
I have an project I'm looking for a better solution to. I have a need to render n images over each other the previous one. So I have loop if you will. This should simulate alpha bending via basic ...
3
votes
2
answers
317
views
Why does rendering to a texture cause transparency here?
As a quick background, this is in the context of a custom game engine I'm writing in C# on top of the SharpDX framework. In the engine, when I render UI, I do so by creating a canvas object with its ...
-1
votes
3
answers
268
views
Render an mesh topmost
I can render anything 3d with SharpDX. However, my mind is mixed what should I do to render a mesh topmost. (Example: menu and all things behind). How can I render something front of the all other ...
0
votes
1
answer
250
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 ...
1
vote
3
answers
841
views
SharpDX Constant buffer not passing values
I'm trying to pass values to a Pixel Shader. I've added the following to the HLSL files.
cbuffer QuadShaderValues : register(b0)
{
float3 PixelDropThresholds;
float4 OverlayColor;
uint ...
0
votes
1
answer
148
views
Tile-Based Deferred Lights Flicker
I'm using Tile-Based Deferred rendering and I have run into an issue with my lights flickering.
For a long time now I would just add all my lights at once and let the renderer do its thing eg. build ...
0
votes
1
answer
157
views
Direct3D fails to render when on Laptop with nvidia optimus
I'm developing a Direct3D control which needs to run on a Dell XPS with a NVIDIA Optimus. I'm using SharpDX and C#. When I write code for the app on a workstation with only an NVIDIA graphics card it ...
0
votes
1
answer
281
views
SharpDX C#, Quad renderer not rendering as expected
I've been working on a Quad Renderer and have gotten close. However, It still does not render correctly. Can anyone spot what I'm doing wrong or give me a better option. See the rendered results below ...
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...
...