Answer Questions
Luis Esteban Valencia Muñoz Does texel space offset result in dependent read?
Ok, so here is the problem. I have PCF, and I am doing something like: [unroll] for (int y = ...; ...; ++y) [unroll] for (int x = ...; ...; ++x) tex.Sample(sampler, input.texcoord, int2(x, y)); Everything is fine, unless I want to optimize it and for example do PCF only for shadowed points. I put loops into an if() branch, and the compiler puts texture sampling instructions outside the branch, leaving only arithmetic ones inside. Obviously not what I wanted. Ok, I had the same issue with D3D9, where texel-space offset needs to be simulated via arithmetic instructions, which causes a dependent read - and this in turn causes a problem with mip level estimation - because if a branch is executed in one pixel in a block (2x2 ) of ...Show All
Tom Hollander Problem with DirectX and Visual Studio 2k5
Hey, I've noticed something very wierd. I am using Visual Studio 2k5 for sometime but I've never tried to complile my previous Direct3D relelated projects on this release of Visual Studio, maybe because it never occured because the machine that I was developing them had 2k3. Now for the Problem if you create a Win32 default application with MFC support (or not) that you try to write the following stuff you get linker errors and sometimes complier errors. I've never had them before and I don't know why they are occur. I checked for the Project Properties, altered some stuff (such the use of precompiled headers etc with no luck :S). The DirectX samples compile fine but I don't know the cause of the pr ...Show All
Sto King Trouble with XNA Game Launcher
I am having some trouble with the XNA Game Launcher... I have had it up and running since December, but today for some reason, whenever I launch XNA Game Launcher(while signed into Xbox Live) it tells me it could not establish a connection with Xbox Live. So I decided to delete XNA Game Launcher and redownload. When I go to redownload it, it will not let me do so. The download acts like it wants to start, then freezes at 1%. I thought at first something might be wrong with my connection to Xbox Live, but I just started downloading the demo of Alien Hominid, and it is at 97% right now... Anyone else experiencing any trouble at all I know it has only been a few hours now...but am I to take it that nobody else is experienc ...Show All
SN Ngaihte help please Rendertarget on xbox360
i have look at this sample by Manders vs. Machine i use 2 rendertarget and it work in winxp but not on xbox360 when you graphicsDevice.ResolveRenderTarget(0); ( you get a copy of what you just have render) so you can say this Texture2d mytex = Myrendertarget.gettexture(); now i shood have a copy of the rendertarget copy from xbox fast mem to local mem stored in my mytex now shwicth rendertarget and do the same and render to a screenquad on both textures this dos not work xbox so thery u can onlye have one rendertarget on xbox one for shadow and the mesh but i what to postprocess the mesh example bluer it a bit so i need a rendertarget more we can do this on windows but not on xbox i have converted ab ...Show All
Phil Nicholas XNA Visual C#, requirements, I have Visual C++...
I was wandering, if someone could tell me... (since I have "visual c++" and it is evolved from "visual c#", do I have to have visual c#, I mean I have visual c++, when I open instalation, it says I need viusal c#, but I have visual c++. Is there a way to avoid this Please help. Thanks. Sorry there! Guess we were typing at the same time! Ok, thanks for the help. Michael Klucher - MSFT wrote: Sorry there! Guess we were typing at the same time! LOL, I'm just after your job! Hello, Yes Visual C# Express is required for XNA Game Studio Express, it will run side by side with your exsisting install of Visual C++. Thanks! There's currently no way to avoid that at this time. You w ...Show All
paso Help on writing text on the screen?
I'm well on my way to finishing my first mini game called planet defender. What I need now is a way to display the score the player has on the screen. How do I draw text onto the screen Here's a quick image of my game so far :): http://www.rocketsoft.gm-school.uni.cc/uploads/Screenshot.JPG OrpheusTheBard wrote: Message="Object reference not set to an instance of an object." Hope this post was able to help you at least a bit... You should look into Object Oriented Programming tutorials and books to get a better grasp of these concepts, because it's a vital part of working with C#. So just put "SpriteBatch batch = new SpriteBatch(graphics.GraphicsDevice);" on your Draw function, or otherwise declare the referen ...Show All
S.Jan Windowed Graphics Scaled?
Hi, I'm running an application in 1280x1024 - same as the native resolution and desktop resolution for my monitor. When I run it in full screen, the background image is displayed as it should. However - when running windowed at same size, it seems to scale the background slightly, and it seems the window's exterior is 1280x1024, but the client area is less Does this seem correct, and any ideas how to handle this, so it also looks good in windowed mode IIRC, you can't create a window larger than the desktop dimensions, so Windows scales the window down to fit. If you request a client area of 1280x1024 on a 1280x1024 desktop, Windows will scale it down so that the window decorations fit and reduce ...Show All
Keyth Cannot Display Graphics
When I tried the tutorial for 3D graphics, but whenever I run it, it tells me that "Both a valid vertex shader and pixel shader (or valid effect) must be set on the device before draw operations may be performed." Can anyone tell me what's going wrong Also, with the 2D graphics tutorial, when I run the program it tells me that the following method is "Invalid:" spritebatchA = new SpriteBatch(graphics.GraphicsDevice); Can anyone help me I'm very confused. Did you in fact, set any shaders before drawing the model My suggestion would be to use the BasicEffect class for this. I believe it's what's in the tutorial. But you probably have that in there, so I would refer to the previous post if you did in f ...Show All
Wee Bubba DVD Media Access on 360
If I burn a DVD that contains regular files, will my app be able to read the files from the media when running on the 360 I'm assuming that writing files to the 360 hard drive will be supported (things like saving persistant data, high scores, configuration settings, etc) I'm sure I'll be able to work around the restrictions. I'm not talking about MMORPG level data. Launching or copying files from CD/DVD media will not be supported. aL Thanks Albert, Although, I wasn't really thinking about copying from the DVD (to the HDD) and definitely not launching programs. What I was mostly thinking was the ability to load assets from the DVD. For instance I might want to make some ...Show All
Kujo1987 DirectX October 2006 SDK does not extract? What should I do?
I recently downloaded the October 2006 DirectX sdk. When I try to install it, the extraction process never completes! The status bar moves three notches and goes back to zero. This process repeats itself and never terminates! I have already uninstalled my previous installation of directx sdk. I have disabled norton auto protect. My file system is NTFS. My computer configuration: WinXP Pro SP2, PIV 2.0GHz, 32mb Graphics Card, 512mb Ram. I downloaded the file using "free download manager" as my area is plagued by power failures and I keep getting disconnected from the internet. Please help me! Having the same problem, after uninstalling all previous DirectX SDKs and atte ...Show All
ekkapop Transparent Texture Mapping
Hi all, I know this forum probably isn't for general graphics programming techniques, but since I'm using XNA I was wondering if perhaps I could get some pointers on what to search for on the web :-) What I'm trying to achieve is basically this, I have a texture (png) with a transparent background. I would like to apply this texture and have the areas textured with the transparent section to be ... well ... transparent :-P Right now, the sections that are supposed to be transparent are showing up white. Thanks for any help you might be able to offer. What's the code you're using to do this Sweet! all I had to add was: graphics.GraphicsDevice.RenderState.SourceBlend = Blend.SourceAlpha; graphics.GraphicsDevice.RenderS ...Show All
JKountouroglou String to char[]
Does anyone know how to pull the individual chars from out of a string String s = "abc"; char c = s[2]; // c contains 'c' ....easy enough. Thanks bro ...Show All
pjhunter Calculating normals for large mesh with no vertex to triangle info
I have a mesh of 100.000 triangles where I need to calculate the normals for the vertices. The datastructure, I am using, does not point from vertices to triangles, but only the other way arround. I therefore defined my vertex normals as the sum of the triangles using them, weighted by the triangles size. I simply set all vertex normals to zero and then run through my triangles (when running through them anyway for some other task) and add a triangles normal (weighted) to the vertices it uses. The I run through all vertices and normalize the normals. This is suposed to give me a valid normal for the vertices. I am not much liking waht i see though. The entire terrain is filled with little pyramids. Light ones and dark ones. When I ...Show All
John Gooding What am i working on MDX-1.1 or MDX 2.0 or anything else........?
Well all i know is i installed the DirectX Aug2005 SDK...update..........and i have installed Visual Studio 2005......and i found references for microsoft.directx and microsoft.directx.direct3d and now i am developing directx CAD app in VB.net and problem is i have been reading on many sites and forums that....MDX2.0 is dead. what am i developing stuff on am i using MDX 2.0 or MDX 1.1 or this new XNA.... i have installed .NET Framework 2.0 in my system. At least the docs for MDX 2.0 are removed from there... I assume you mean August 2006 SDK right This SDK only contains MDX 1.1, which is the version that you should be using instead of MDX 2.0... Actually August still had MDX 2.0 in it, thoug ...Show All
SandeepLohani Future D3DX's not supporting SM1.x??
I saw this in the October SDK readme October 2006 DirectX readme! wrote: Preview Release of the new HLSL Shader Compiler for Direct3D 9 Targets This release has a beta version of d3dx9d_31_beta.dll that includes the Direct3D 10 HLSL compiler enabled for Direct3D 9 targets (shader models 2.0 and later). The new compiler has no support for 1_x targets. This debug-only DLL allows developers to utilize the new Direct3D 10 HLSL compiler for their Direct3D 9 shaders, and will become the default compiler for all Direct3D shaders. Please try the new compiler by building your application with d3dx9d_31_beta.dll instead of d3dx9d_31.dll. Does this mean in future SDKs SM 1.1 will not be supported any more, or is this limitation j ...Show All
