Jump to content

  • Log In with Google      Sign In   
  • Create Account

SIC Games

Member Since 22 Jun 2012
Offline Last Active Today, 09:54 AM

Topics I've Started

What you think of my Depth Pass AA?

25 August 2014 - 04:00 PM

I'm wanting to implemend Nvidia's FXAA and TXAA inside my game - however, I figure I create my own AA. Perhaps, someone already has already came up with the type of AA and there's more work to do to enhance the blurring. I want your feedback and let me know what you think. It's rough demonstration not perfect quite yet.


The firest picture is when it's just using the 8x MSAA on high setting possible. The second image is the 8x MSAA and my Depth Pass AA implematation.


I'm still working on how to make it better. Was just fascinated on the descripton in Nvidia's website how FXAA works - this is when I started to think about trying out my own. I have a simple blur but I am thinking about making it box blur with two passes or possibly gaussian blur.

Shadow Mapping Deferred Shading or Forward Pass?

21 August 2014 - 10:17 AM

I'm try to implemend shadow mapping in my deferred shading and I was aquiring the best approach. Whether it would be forward passing mixed with the deferred rendering or if I can create a depth map in the deferred buffer. When i attempt to create a depth map in the deferred for a light in the deferrer buffer - the scene turns black. I believe it's my mistake in the shader part.


The deferred rendering is using DXGI_FORMAT_R16G16B16A_UNORM. Does the Depth Map have to be a certain texture format for the render target?

Camer Shake Effect when big scary monster comes charging

02 August 2014 - 12:19 AM

I want to make a camera shake effect when a scary monster comes chasing after you or at least for a cinematic effect then the player can do whatever.

if (isKeyPressed(0x56))  //-- If V key is pressed.
			static float shakeAmount = cameraYaw;
			static float maxShake = cameraYaw + 1.0f * (XM_PI / 4.0);
			static float rndJerkiness = ((rand() % 2) - 4);

			shakeAmount += cameraYaw + rndJerkiness; // ((rand() % 2) + cameraYaw - 2); // +(XM_PI / 4.0f);

			if (shakeAmount > 1.0f  * maxShake) {
				shakeAmount -= rndJerkiness;
			if(shakeAmount < -1.0f * maxShake) {
				shakeAmount += rndJerkiness;
			cameraYaw *= shakeAmount;
			std::ofstream out("Logs/Camera.log", std::ios_base::app);
			out << cameraYaw << ":" << cameraPitch << std::endl;
			//shakeAmount = 0.0f;


As of now it's just tied to the V key for testing purposes. The camera yaw is tied to the updateCamera function which is tied into the pitch, roll and yaw function of the xnamath.h header file.


I'm getting close the camera shakes alright - sometimes it gets out of control and the screen turns black inside the level editor. Possibly something happened and it went past the sky box which is literally impossible because the skybox is scaled for infinity. I'm not sure what's causing that anyways. The random jerkiness is to make it appear jerkier and spazmatic. I was trying to make it random from - 2 to 2. It's outputted for now so I know what's going on inside the log file. The cameraYaw is initialized as 0.0.


I was just wondering if there was something I can do better inside the code?

3D Volumetric Texturing is Stranger than Friction

28 July 2014 - 07:14 PM

My journey to make volumetric texturing is leaving me a weird path. Below in the image you see there's words, images, and other - I didn't snap shot and place the images there. The image I used was stone02.dds which was 2D texture loaded and I attempted to convert it to 3D Texture. There's a thread about it where you can check it out. I changed a couple of things - I created a new sampler state and set the W to CLAMP. This is when I saw what's the image below.


I'm viewing a website about Volumetric Texture in OpenGL and there's an open mountain scene that's from the website that's on my cube?!




Talk about nightmares - this has been definately a weird day! It's like taking images from my desktop and even Icons. I didn't create a desktop snap shot either. I have zero clue what the world is going on.

Stack has been corrupted while creating 3D Texture from 2D Texture.

27 July 2014 - 10:32 AM

I am getting this stack corrupted around VolTex. I'm trying to create 3D texture from a 2D texture loaded from file.

                                ID3D11Texture3D *volText;

				D3D11_TEXTURE3D_DESC volDesc;
				volDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
				volDesc.Usage = D3D11_USAGE_STAGING;
				volDesc.CPUAccessFlags = 0;
				volDesc.Format = DXGI_FORMAT_R8G8B8A8_UINT;
				volDesc.Depth = 1;
				volDesc.Height = 1024;
				volDesc.Width = 1024;
				volDesc.MipLevels = 1;
				volDesc.MiscFlags = 0;


				ID3D11ShaderResourceView *volSRV;
				result = device->getDevice()->CreateShaderResourceView(volText, NULL, &volSRV);
				if (FAILED(result)) {
					MessageBox(0, L"Unable to create Volumetric Texture.", L"Volumetric Creation Failed.", 0);
					diffuseSRV = volSRV;

The tempSRV is the SRV from D3DX11CreateShaderResourceFromFile paramater.

So, a stack is corrupted around volTex - perhaps this would mean a paramter is incorrect or something like that?