directx

HLSL for getting cylinder effect

[亡魂溺海] 提交于 2019-11-29 12:16:58
I need to write an application with Silverlight 4 and need to show images like wrapped on cylinder. I need some HLSL code, as I wont to do that with Effects of Silverlight. I don't wont to do that with 3D libarries for silverlight. I only need HLSL code for changing pixels. I need for my image to look like this Thanks. This seems to be the effect you want, you may wish to change the 0.2 value to increase or decrease the effect or make this adjustable in your shader but that's a simple change to do. I'd recommend Shazzam if your not using it for writing shaders for WPF or Silverlight. sampler2D

WPF and DirectX 11 via D3DImage

和自甴很熟 提交于 2019-11-29 09:53:50
问题 I want to use DirectX 11 from unmanaged C++ code and use WFP for the GUI. SlimDX is not suitable for me. I have found the solution to make working WPF with DirectX 10: WPF & DirectX 10 via D3DImage But I couldn't manage to work it with DirectX 11. Just blank screen with two buttons. Does anybody know how to make WPF working with DirectX 11. Also I had seen that when I'm just running this example the CPU usage is about 4-5% for Intel i5 750 (Windows 7 64 bit, NVidia Geforce 430). I think it's

DirectX:New Project in VS2019

孤人 提交于 2019-11-29 09:45:19
Tag DirectX下的博客主要用于记录DirectX的学习过程,主要参考《DirectX 12 3D 游戏实战开发》。 官方示例工程 在www.d3dcoder.net下载d3d12工程之后便可以基于官方工程构建自己的项目。这里选用的IDE为VS2019,在 新建项目 时选择 C++空项目 ,然后把官方示例工程的Common文件夹复制到自己的工程目录,为了测试运行结果,同时把官方工程第六章有关box的 BoxApp.cpp 和 Shaders 文件夹也复制到工程目录,在头文件添加上述的 .h 文件,在源文件添加上述的 .cpp 文件。此时直接开始调试会发现如下报错: 可以看出,报错内容都是和字符串有关,这是因为字符集设置错误,在 项目属性 - 配置属性 - 高级 下,把字符集设置为 Unicode 再次调试,报错就消失了。但这时又出现了新的错误: error LNK2019: 无法解析的外部符号 _main , _main 是在链接窗口子系统时引用的一个标识符,而载我们构建空项目时默认链接的是控制台,所以需要在 项目属性 - 配置属性 - 链接器 - 系统 下,把子系统修改为 窗口(/SUBSYSTEM:WINDOWS) 后再开始调试,就可以运行box项目了。 来源: https://www.cnblogs.com/Li-F/p/11511339.html

How to control stereo-frames separately with C#? (NVIDIA 3D shutter glasses)

守給你的承諾、 提交于 2019-11-29 09:40:28
问题 I’m trying to make a very simple application which would display different images on each eye. I have Asus VG236H monitor and NVIDIA 3D Vision kit, the stereo 3D shutter glasses. The I’m using C#, .NET Framework 2.0, DirectX 9 (Managed Direct X) and Visual Studio 2008. I have been searching high and low for examples and tutorials, have actually found a couple and based those I have created the program but for some reason I can’t get it working. When looking for examples how to display

DirectX:Affine Transformation

走远了吗. 提交于 2019-11-29 08:33:06
Tag DirectX下的博客主要用于记录DirectX的学习过程,主要参考《DirectX 12 3D 游戏实战开发》。本篇主要是顺着DX12龙书的节奏温习线性代数中的仿射变换。 仿射变换 仿射变换是在线性变换的基础上加入平移变换得到的。之前线性变换的对象都是3维向量,向量只表示方向,对向量作平移是没有意义的,因此平移只能作用于点。齐次坐标表示法可以统一对点和向量的平移变换。 齐次坐标 在普通3维坐标的基础上加入第四维w即构成齐次坐标。参考《3D数学基础:图形与游戏开发》,可以通过“投影”来理解齐次坐标。先考虑2D的齐次坐标(x,y,w),截取w=1处的平面,对坐标系内的点作关于原点的透视投影,投影之后的坐标值为(x/w,y/w,1)。而当w=0时,除零可以看作趋于无穷,即形如(x,y,0)的点在无穷远处,此时我们用它来表示方向。类比2维,可以推出3维的情况,截取w=1处的超平面作投影即可。类似地,我们可以用(x,y,z,1)表示点,用(x,y,z,0)表示向量。 仿射变换 仿射变换即在线性变换的基础上增加一个平移变换,通常用下式表示: \[ \alpha(\vec u)=\tau(\vec u)+\vec b,\vec b为平移向量 \] 又或者:(其中,M为线性变换矩阵,b为平移变换向量) \[ \alpha(\vec u)=\vec u\times M+\vec b=[x

NV_STEREO_IMAGE_SIGNATURE and DirectX 10/11 (nVidia 3D Vision)

主宰稳场 提交于 2019-11-29 08:08:41
I'm trying to use SlimDX and DirectX10 or 11 to control the stereoization process on the nVidia 3D Vision Kit. Thanks to this question I've been able to make it work in DirectX 9. However, due to some missing methods I've been unable to make it work under DirectX 10 or 11. The algorithm goes like this: Render left eye image Render right eye image Create a texture able to contain them both PLUS an extra row (so the texture size would be 2 * width, height + 1) Write this NV_STEREO_IMAGE_SIGNATURE value Render this texture on the screen My test code skips the first two steps, as I already have a

Whole screen capture and render in DirectX [PERFORMANCE]

大兔子大兔子 提交于 2019-11-29 07:42:08
I need some way to get screen data and pass them to DX9 surface/texture in my aplication and render it at at least 25fps at 1600*900 resolution, 30 would be better. I tried BitBliting but even after that I am at 20fps and after loading data into texture and rendering it I am at 11fps which is far behind what I need. GetFrontBufferData is out of question. Here is something about using Windows Media API , but I am not familiar with it. Sample is saving data right into file, maybe it can be set up to give you individual frames, but I haven't found good enough documentation to try it on my own. My

Does XNA effectively replace Managed Directx? [duplicate]

帅比萌擦擦* 提交于 2019-11-29 06:37:34
Possible Duplicate: Comparison between XNA and DirectX (C#) The subject speaks for itself. Does XNA effectively replace Managed DirectX? We have a few projects using managed DirectX in VB.NET. I was considering porting one over to XNA, but wonder whether it's worth the effort. Does XNA effectively replace Managed DirectX? According to the wikipedia entry for MDX it does. At least for game development purposes. XNA aims to be a framework for making games, so it is easy to get started. Managed DirectX is "just" a managed wrapper over the APIs, so you have more freedom but probably have to do

Alternative to __uuidof in C

牧云@^-^@ 提交于 2019-11-29 06:11:48
I'm working with a C project that's using DirectX and I've run into a problem. Certain DX calls require a IID object, typically generated with __uuidof . One thing this is required for is creating a RenderTargetView. The DirectX samples/tutorials do this: ID3D11Texture2D* pBackBuffer = NULL; hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer ); When I try to call __uuidof in my C code, I get an compiler error: Error 19 error C4233: nonstandard extension used : '__uuidof' keyword only supported in C++, not C . DirectX has a C interface, so I imagine there must

Drawing 3D lines in WPF

南楼画角 提交于 2019-11-29 03:11:23
问题 I am working on a CAD application and thinking of using WPF for rendering my entities. But it seems like WPF doesnt support drawing 3D lines. Is there any ways for drawing 3D lines in WPF? I dont like to create a mesh for each line entity I need to draw as I am afraid, this would cause a major performance hitch for me as I would have to create number of line entities in my application. If this is not possible through WPF, will it be possible to do this in DriectX 9 or 10? Can I mix directX in