1
vote
0answers
43 views

How to setup a particular blend state where the alpha channel is additive?

I would like to set a blend state to be "additive" and do the following: Result.R = Source.R + Destination.R; Result.G = Source.G + Destination.G; Result.B = Source.B + Destination.B; Result.A = ...
0
votes
0answers
16 views

Having trouble getting shader to work with sprite batch in XNA #4

I found a neat "CRT screen" effect shader on the web, but I've never used shaders before and I can't seem to get it working properly. If I do the second sprite batch in my code here normally without ...
0
votes
0answers
35 views

HLSL - Binary operations

I'm trying to do binary operations with integers in the hlsl code. For example: int n = 10 & 15; Binary value of 10 = 1010 and Binary value of 15 = 1111. With this, n = 10, because (1010 & ...
2
votes
0answers
99 views

How to implement simple shadows on XNA?

UPDATE: See photos below the description I try desperately to implement shadows on my XNA games. My game is a style of games like Voxel (minecraft). The problem is that I do not find support / ...
8
votes
1answer
376 views

Picture rendered from above and below using an Orthographic camera do not match

I'm using an orthographic camera to render slices of a model (in order to voxelize it). I render each slice both from above and below in order to determine what is inside each slice. The model I ...
2
votes
2answers
122 views

Properly rendering transparent areas of textures

I'm rendering a tree that contains branch meshes with partially transparent textures. If I render it with AlphaTestEffect and set the ReferenceAlpha to something low, I'll get this. I want to ...
2
votes
1answer
176 views

Is there a penalty to using render targets versus textures?

I figured that the best way to ship 2D art for multiple resolutions is to instruct my artist to create the fullscreen background images sized for the highest resolution and then scale them down during ...
1
vote
2answers
265 views

Anti-aliasing a sphere

I render everything in my game in 2D with SpriteBatch with the exception of a spherical entity (orb) that I render as a spinning and dynamically lit (custom effect) sphere in 3D. I capture the sphere ...
4
votes
4answers
855 views

Face-Click Detection ( like in Minecraft )

I am working on a box-based game engine like minecraft and I was wondering how to detect the "clicked face" when placing blocks. I have created this engine in C++ ( DirectX / D3D ), C# ( XNA ) and ...
2
votes
1answer
127 views

Any possibility to render XNA scene via POV-Ray

We are creating special purpose application. Its not game but its 3d Application that functions like game. We require app to have different places and we want to allow user to roam inside such places ...
3
votes
0answers
166 views

SSAO Distortion [closed]

I'm currently (attempting) to add SSAO to my engine, except it's...not really work, to say the least. I use a deferred renderer to render my scene. I have four render targets: Albedo, Light, Normal, ...
0
votes
2answers
206 views

HLSL Pixel Shader Compile, Flow Control, Instruction Count, XNA Issue

im trying to find help with an issue im having moving from the XNA 3.1 framework to XNA 4.0. The shaders I wrote for my 2D game work fine in XNA 3.1, but wont even compile in 4.0. At first I got ...
-3
votes
1answer
910 views

Which should I learn: DirectX or XNA? [closed]

I've worked with the Microsoft Foundation Classes(MFC) and now I want to enter the world of game development.But should I start with directX or XNA? I'm hesitant towards DirectX because I feel it ...
-4
votes
1answer
139 views

My 2d Shader in XNA falls apart the second I put it into Farseer [closed]

I wrote a simple light shader that I tested in a simple 2d spaceship shooter and it worked fine. Once I imported it into my friend's farseer project with rotatable shapes, it doesn't seem to work ...
5
votes
1answer
490 views

What are the rest of the blending functions used for?

In general, I know of five ways to make use of blending functions (these are for OpenGL, but replace glBlendFunc() with SetRenderState(D3DRS_SRCBLEND) and SetRenderState(D3DRS_DESTBLEND) for DirectX): ...
8
votes
1answer
295 views

Curious Transparent Holes Render Artifact

So I'm trying to implement "smooth" terrain in my block engine by giving each surface block a heightmap. Basically, what I do to generate these "heightmaps" for each block is I generate the heights ...
0
votes
4answers
773 views

At this point in time, avoid XNA? [closed]

XNA seemed like a valid option a few years ago, but XNA was never a real success, and now it seems like a footnote, even Microsoft seems to treat it that way. Should I just go the DirectX route ...
3
votes
1answer
192 views

Why are some objects not rendering properly?

Here's a button I exported from Blender into a .x format: Now here it is in the game with BasicEffect applied to everything: And now with my custom shader: And there's the problem. While the ...
7
votes
4answers
217 views

Game development for multiple Microsoft platforms

I intend to develop games for Microsoft's Windows Store, however, I'm confused between their platforms, so please clarify those questions: Is there any technology (XNA, DirectX), so a game can be ...
1
vote
1answer
163 views

How can I efficiently render a very large model?

I have a huge model I want to draw in my XNA application; due to its size I am experiencing a tremendous loss of performance. The model has about 50,000,000 edges and has a size on disk of 205 MB in ...
1
vote
1answer
116 views

Consistency of DirectX models

Is there a way to check the consistency of a DirectX model (.x) ? Whilst compiling .x files with XNA GameStudio 3.1 compilation is aborted with the following error message: Error 2 Could not read ...
5
votes
3answers
212 views

Depth is disabled - How to turn on?

In XNA 3.1 is there any other way to disable depth in 3D Worlds using DirectX models other than GraphicsDevice.RenderState.DepthBufferEnable = false; ? The reason for my question is I have quite a ...
0
votes
3answers
439 views

How do I switch from XNA to C++? [closed]

So, I heard somewhere that Microsoft intends to phase out XNA in favour of using the DirectX method. I've always wanted to learn, but all I ever did in XNA was simple 2D games. I was wondering if ...
12
votes
2answers
465 views

Best practice for setting Effect parameters in XNA

I want to ask if there is a best practice for setting Effect parameters in XNA. Or in other words, what exactly happens when I call pass.Apply(). I can imagine multiple scenarios: Each time Apply is ...
10
votes
1answer
1k views

Information about rendering, batches, the graphical card, performance etc. + XNA?

I know the title is a bit vague but it's hard to describe what I'm really looking for, but here goes. When it comes to CPU rendering, performance is mostly easy to estimate and straightforward, but ...
10
votes
6answers
21k views

Visual Studio 2012 and Game Development [closed]

Alright, I think it's a simple question, but I got difficulties to find some answers around. I already read that XNA wouldn't be in Visual Studio 2012. I recently learned to use XNA, but since I ...
1
vote
1answer
321 views

Highlight edge on 3d cube in directx

I want to make a 3d editor in DX9/XNA for a project I'm working on. I'm just thinking through how I would go about certain tasks and I'm stuck on one particular thing, which is crucial to making the ...
0
votes
1answer
366 views

XNA Multisampling only for 3D

I am working on a game which consists of 3D elements and a 2D GUI. I have it working properly, but I want to enable multisampling for only the 3D parts, and not the 2D Textures. Otherwise, the GUI ...
9
votes
3answers
2k views

Pixel-perfect rendering to a rendertarget with a fullscreen quad

I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
2
votes
1answer
849 views

Rotating a vector by a quaternion

I am trying to rotate a direction vector (0,0,1,0) by a rotation quaternion in DirectX. From what understanding, to rotate the vector you must do NewVector = rotQuaternion * Vector * ...
2
votes
3answers
584 views

Publishing a game — any way to target both WP7 and Win8 Store?

I'm at a dilemma which seems should soon become an important issue for a lot of developers. If I build a game in XNA, I won't be able to publish it on the Windows 8 Store, as it would be a classic ...
1
vote
2answers
948 views

XNA 4.0 Point Vertex Rendering

I have a buffer of about 134 million particles and a very powerful computer to render them smoothly, but I am getting an error when trying to render them as primitive lines. It says that I cannot ...
5
votes
2answers
4k views

Is using SharpDX or SlimDX easier than using DirectX directly from C++? [closed]

I decided to learn to program in DirectX yesterday, and, not being a huge C++ fanatic, went looking for a .Net wrapper. After reading about SlimDX and SharpDX, I decided I liked what the SharpDX ...
1
vote
1answer
567 views

A comparison of graphics libraries and their respective programming languages [closed]

A comparison of graphics libraries and their respective programming languages. A.K.A. "Which do I pick? With a twist." I'm a long time professional programmer who never gave up on programming as a ...
3
votes
3answers
4k views

XNA - Drawing 2D Primitives (Boxes) and Understanding Matrices in Computer Graphics

I have two issues which I wish to solve by creating 2D primitives in XNA. In my game, I wish to have a "debug mode" which will draw a red box around all hitboxes in the game (Red outline, ...
0
votes
2answers
859 views

Graphics capabilities differences between mobile and desktop/console platforms?

I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a ...
3
votes
2answers
409 views

Render only some of graphics?

In XNA I am building my own textbox, and listbox. For the textbox, I want it to render all text it can, and then cut off at the end of the textbox. But I don't want it to cut whole letters. I want it ...
7
votes
5answers
3k views

Best pathfinding algorithm for a tower-defense game? [duplicate]

What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points. ...
6
votes
2answers
348 views

Does it make sense to include an index for linelists?

Does it make sense to include an index by using DrawIndexedPrimitives, when using linelists performance wise? I could imagine it would be easy for the GPU to generate such indexes anyway.
3
votes
1answer
156 views

Instancing with empty data, or varying vertex counts?

I am new to game development, having only developed a few games before, in 2D space, but with 3D rendering. I have implemented instancing before, but this is only my 2nd time doing it. I have a ...
2
votes
2answers
749 views

Compatibility between DirectX 9 and DirectX 10 shaders

I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have ...
15
votes
1answer
2k views

The practical cost of swapping effects

I use XNA for my projects and on those forums I sometimes see references to the fact that swapping an effect for a mesh has a relatively high cost, which surprises me as I thought to swap an effect ...
0
votes
2answers
756 views

How to create a mini-game? [closed]

I am wondering how to creat a mini-game like "Diner Dash" or like "Big Fish Games". I want my game to be 2d, but it looks like 3d: see this image. ...
3
votes
3answers
2k views

How do I plot individual pixels using the XNA APIs?

If I wanted to fill my game screen with individually coloured pixels, how would I do this? For example, if I wanted to write a 'game of life'-type game where each pixel was a cell, how would I ...
-2
votes
3answers
2k views

Developing 3D card game. Is C# good enough?

I was thinking of developing several rather simple card games in DirectX (3D), but I'm not sure if C# and XNA are powerfull enough for this. Perhaps the most appropriate question is: can you choose ...
2
votes
2answers
1k views

3D game special effects, fire, lightning, water, and ice

I'm working on a 3d game using OpenGL and would like to take it in a fantasy direction. Specifically I'm thinking of having magic with effects for fire, water, ice, and lightning. My problem is I ...
6
votes
2answers
1k views

Looking for an example of glass with XNA or DirectX 9

Any good pointers on how to get the refractive look of glass? I'm looking to create a think piece of glass type of look, sort of the type that you'd have on bathroom shower doors.
5
votes
2answers
636 views

XBOX + Xna != DirectX?

I'm a bit confused. The question is: when I'm developing a XNA game for Xbox (or Windows), is it possible to use DirectX (to make use of the GPU)? Or is everything getting calculated by the CPU? A ...
5
votes
1answer
2k views

XNA or SlimDX (DirectX 10) for multitouch rhythm game simulator

I'm looking to develop a multitouch rhythm game in C#. It is aimed to be a simulator for an existing arcade game, similar to this: http://www.youtube.com/watch?v=TAiNNpA3wwg So far, I've decided on ...
8
votes
6answers
4k views

Good example of a multi-pass effect?

In XNA (and Direct3D in general AFAIK), rather than creating individual vertex and fragment shaders, you bundle potentially many related shaders into 'Effects'. When you come to use an effect you ...