Jump to content

  • Log In with Google      Sign In   
  • Create Account

Wilhelm van Huyssteen

Member Since 22 Mar 2008
Offline Last Active Dec 25 2014 03:28 PM

Topics I've Started

Software Fallback?

10 November 2014 - 02:07 PM

Hi.

 

Im doing the programming on a certain 2D project. I'm using my own game engine and I'm developing on a windows pc. The person I'm working with unfortenetley has a mac wich means I need to be able to make mac test builds for him to test. Now Ive made a build that seems to work on his mac but he says it runs extremely slowly (as in theres a good amount of time between frames whereas the game should run at 60 fps and is not intensive at all).

 

Im thinking it might be the video driver falling back to software but Im not sure how to go about it especially since I don't have access to a mac to test it myself :/

 

Hes graphics hardware is Intel HD Graphics 3000 512 MB

 

Is this hardware perhaps known to give such issues? And if yes is there anything one can do about it?

 

I've also uploaded a version of the prototype for if there is anyone with a mac willing to help me test it. Especially if you have a better graphics card. Due to an NDA I've stripped all the artwork and replaced it with colored squares. But if you see any squires moving across the screen then it means its working. 

 

https://drive.google.com/file/d/0ByipJlGRu1zsV0dWMXFxOTE4eFE/view?usp=sharing

 

Thnx in Advance!


MSAA and offscreen render target issue

19 September 2014 - 01:04 PM

Hi.

 

Im probaly just missing something small but i cant get anti aliasing working with offscreen rendering. When i set the sample count above 1 the offscreen textures seem to always return (0,0,0,0) when i sample them regardless of what im rendering to them and even if I clear them to a different colour. Rendering to the backbuffer works with anti aliasing though.

 

to test it im trying 2x aa.

 

ive set the sample count to 2 in the DXGI_SWAP_CHAIN_DESC and in the depth texture and in all render targets. Is there anything else i need to do? (The Quality for all of them is set to 0)

 

I can post code but im not sure were the problem would be. Please ask for more information/code if needed.

 

Thnx in Advance


Mip mapping issue

11 September 2014 - 11:10 AM

Hi.

 

I am busy writing a directx renderer for my engine that up until now was opengl only. Here is a screenshot rendered in opengl that demonstrates what Im trying to achieve.

 

sR6n5y.png

 

Here is the same scene rendered in directx

 

c0jNt4.png

 

Looking at the far away terrain the mipmapping in the directx version seems a bit of (well I think its the mipmapping). You can clearly see some ugly patterns forming the further you go.

 

The only only difference between the 2 (that i can think of) is the way the mip maps are generated. In the opengl one the mipmaps are created using gluBuild2DMipmaps. In the direcx one I generate the mipmaps myself and i  simply average the nearest 4 pixels together when downscaling. So my first thought was that gluBuild2DMipmaps uses a different algorithm to downscale the image but I cant seem to find more information on it. Maybe the problem is something else entirely? Either way any help will appreciated.

 

Thnx in Advance!

 

 

 

 


Directx 11 constant buffer question

11 August 2014 - 10:23 AM

Hi.

 

I had the following constant buffer

 

cbuffer constantBuffer0 : register(b0)
{
  matrix modelMatrix;
  float3 colour_modifier;
  float brightness_modifier;
  float transparency_modifier;
}
 
Then i added one more float3 variable to it so i had:
 
cbuffer constantBuffer0 : register(b0)
{
  matrix modelMatrix;
  float3 colour_modifier;
  float3 w;                                     //<- added this one
  float brightness_modifier;
  float transparency_modifier;
}
 
But then it stopped working. somehow the other variables were no longer aligning properly with the data i send through. (I did add in the 12 bytes for the new float3)
 
then i tried the following:
 
cbuffer constantBuffer0 : register(b0)
{
  matrix modelMatrix;
  float3 colour_modifier;
  float w1;float w2;float w3;    //now using 3 normal floats instead of 1 float3 
  float brightness_modifier;
  float transparency_modifier;
}
 
and then it worked... I simply replaced the float3 with 3 normal floats but I dont understand why that would make a difference (as far as i understand both would use the same 12 bytes). Im very new to directx so im hoping i might just miss something obvious.
 
Thnx!

 


OpenGL to DirectX. Constant buffers.

01 July 2014 - 02:21 AM

Hi.

 

Im busy creating a directX11 renderer for my game. I did the neccesary refactoring to seperate the graphics calls from the rest of the engine by creating an interface and moving all the opengl code into an implementation of the interface. Then i created a directx implementation of the interface and started implementing it bit by bit. Now I pretty much have most of it down except for constant buffers.

 

The interface very much caters towards opengl since thats the first implementation i wrote (and before now I didnt know any directX). As a result the directX implementation looks more like opengl emulation than a proper directx implementation. But thats fine for now. Once i get the game fully rendered in directX il start looking at ways to improve that.

 

So now my implementation has a method named. sendUniform1i (string uniformName, int value) wich would in the opengl implemenation of course set the int uniform named 'uniformName' to the value in 'value' for the current shaders. Im strugling to figure out how i would implement (emulate?) this in directx. Remember this is just my intermediate step i dont care how dirty it is for now. I was thinking along the lines of giving each constant variable in directx its own constant buffer but as far as i can tel the only way to reference this buffer in code would be by its 'buffer slot number' (: register(b0) etc). Whereas i need a way to get a handle on it by its name. The constant buffer as declared in a shader does have a name but i cant seem to find any example of how you can use that name. I might just be mssing it.

 

Any suggestions?

 

thnx in Advance


PARTNERS