Tag Info

New answers tagged

0

There are a variety of formulae for converting colour to black and white. Furthermore, the programmer might mean something else when converting a vector into a scalar (length would be a common example). The shader compiler keeps things as simple as possible, just taking the first value in the vector, in your example. Experiment with different ways to get a ...


0

There are multiple approaches: Cut-out texture Create a fully transparent texture. Fill the texture with the ellipse shape on the CPU. Render the texture with alpha blend. You only need one texture per ratio of radii, so chances are you can generate some offline. Geometry Create a tessellated sphere, pass radii to vertex shader, deform shpere into ...


0

This portion of your code is not technically blend state, but could be affecting the behavior here: glDepthMask(FALSE) glDepthFunc(GL_EQUAL) D3D11 does have corresponding state to this, and you can set it by creating and binding a ID3D11DepthStencilState object, in a similar way to what you're doing with the ID3D11BlendState. See ...


0

Please also expand on this: "world matrix of the UI" and show how it's constructed. If you do not explicitly supply a World, View, or Projection, Identity is used. This has the effect of multiplying everything by 1 (no change). Using a world matrix without a view matrix is the same as using a view matrix without a world matrix; (X*1)==(1*X)==(X). I ...


1

Please consider this first-party library; it is from MS, so if it is not-third-party enough for you, it will make your life considerably easier. It provides an interface to DX11 that is very similar to XNA. Specifically, SpriteBatch, SpriteFont, etc.. Rastertek and Reimer's are generally helpful. For Rastertek, I linked directly to their DX11 2D tutorial, ...


1

I'm not familiar with either SharpDX nor Direct2D. However, my guess is that what you're seeing is caused by AlphaMode.PremultipliedAlpha. This is the blend equation for pre-multiplied alpha: blend(source, dest) = source.rgb + (dest.rgb * (1 - source.a)) As you can see, the alpha channel of the source is not taken into account, since the mode ...


1

There are very few resource on the web concerning this, but here is what I have been able to get : WIN32 : You can use win32 controls, but you won't be able to customize the look/feel and will have very limited features The big studio way : Custom code everything using Os event. Just thinking of a textbox gives me a headache. Displaying. The textbox's ...


0

The place to start is on MSDN's page on Direct3D feature levels. The row 'Max Vertex Index' indicates the value you are after: 11.1: 2^32 – 1 11.0: 2^32 – 1 10.1: 2^32 – 1 10.0: 2^32 – 1 9.3: 1048575 9.2: 1048575 9.1: 65534


1

Most games use an entirely separate system to do this, such as Scaleform, though there are some exceptions.


0

Graphics APIs have a function called "backface culling" where they omit drawing any triangle which is facing away from the viewpoint. This is determined by looking at the winding order of the vertices after projection, classifying them based on if it's clockwise or counter-clockwise. There is a mismatch between the winding of your source geometry and the ...


0

To close this up. As far as I know this is not possible. I solved it by using a different texture to store this information.


0

fixedTimeStep = false; //wide-open throttle vsync = false; //wide-open throttle void OnD3D9FrameMove(float elapsedSeconds) { Update(elapsedSeconds); //every frame static float oneFrameTime = (1.0f / 30); static float renderTime; renderTime += elapsedSeconds; if (renderTime >= oneFrameTime) { Render(renderTime); //All at ...


1

Verdict: One of the cBuffers was set to the incorrect stage. Edit: I'll leave this here because it was irrelevant, but not entirely worthless in the future. If your structs are cbuffers, they should be of type cbuffer. cbuffer cbBaseLight : register(b0) //16*2=32-bytes { float4 color; float4 intensity; }; cbuffer cbDirectionalLight : register(b1) ...


0

For DirectX 9 you can use a texture and a sprite. In DXHookD3D9.cs you could do something like the following in "DoCaptureRenderTarget". Don't create the resources each frame but for simplicity here it is all together. // Create resources SharpDX.Direct3D9.Texture tex = null; Sprite sprite = null; tex = SharpDX.Direct3D9.Texture.FromFile(device, filename); ...


1

If the system is not under heavy load, there is nothing inherent in DirectX that will reduce performance for a minimized or background window's process. If the system is under heavy load, the OS may prioritize scheduling of the foreground window's process above other processes. As @AlexandreVaillancourt mentioned, games will often intentionally throttle ...



Top 50 recent answers are included