WIP: HDR Rendering – Gaussian Filter using Compute Shader

Gaussian Blur Filter is one of the most used effect in graphics programming. It helps to achieve many other effects like Bloom, DOF, etc.

I coded a version of it using pixel shaders in my naive pixel shader based HDR Renderer earlier. Even though it served the purpose it was very limited in terms of performance and hence quality since we can’t increase radius beyond some levels for real-time rendering.

Then I posted about first compute shader based implementation here which based on Frank Luna’s algorithm but even that was limiting in the fact that we can’t go beyond some blur radius (depends on GPU) for performance reasons.

Here’s a screenshot (800 x 600)-

chEngineCSGuassBlur_old_img1 (2)

Read the rest of this entry

JAGE – Update

I got busy with work-for-pay projects from last few months so development on JustAnotherGameEngine stopped.

But I have started the work on JAGE again and will be posting progress on BLUR filter soon.

My Thoughts on DMC: Devil May Cry

Original Devil May Cry released in 2001 was one of the best games of last decade. It was meant to be Resident Evil 4 but it made Resident Evil look like a SLOW ZOMBIE. Knowing it won’t fit in the resident evil franchise developers gave it its own plot, story & hence a new franchise was born and born with it a whole new genre of action games. There were 3 more games released in that series and it inspired a lot of new games like God Of War, etc. It’s a benchmark for 3D action games even now. Well to be honest I haven’t completed the first the original Devil May Cry ( I was hoping Capcom would release the HD collection on PC also, but sadly they didn’t yet ) but I have played the 3rd and 4th game in the original series and they were unlike anything I had ever played.

Read the rest of this entry

My Thoughts on Halo: Combat Evolved

I just started this game without much expectation (it’s a very old game after all) as I didn’t have anything else to play that time. And of course like many others I have also heard it was a good game, etc. But after couple of hours of game play it sucked me right in & I can’t stop playing it. It’s an amazing game and over next couple of weekends I finished it & here I am writing my thoughts on this amazing game.

Read the rest of this entry

Weekly Update

So I am still working on some optimizations on my GuassBlur Compute Shader. I have also started writing some parts of ToneMapping also using Compute Shader, hoping to finish something worth a screenshot or something by weekend.

I am testing some different permutations of Guass mean, filter size, etc. Also I am looking in repeating / rolling box filter using Compute Shader even though I am not a big fan of blocky / boxy filter for blurring the images but Nvidia Direct3D 11 had a demo of Guass Blur using repeated box filter so I want to explore that also.

But I am not sure which one I will be doing first I have done little bit of work both on ToneMapping and Repeated Box – Guass Filter .

Update : Forgot to mention earlier I am re-writing my DMC review since previous one got lost in the HDD crash.

Another HDD Crash

Gone are the days when I used to blindly trust Western Digital for HDD . Second HDD crash in 6 months taking away all projects whether personal or freelance work. But after spending whole week I recovered important ones. My engine is recovered I am happy. Funny thing is 10 days before that it just came to my mind and I was searching for some options to host my project on some free private svn or git repository online. So somehow my spider sense knew it was coming. But I preferred to spend that weekend playing Dota 2 than completing job of finding a good option and uploading the code DAMN VALVE – ” why u make so addictive games ? ” .

After I am done with the recovery hopefully by tomorrow Western Digital is going to get a very nice email from me with lots of love apart from usual RMA details.

 I still have Seagate HDD 6 yrs old still working flawlessly giving me 70-80 MB/s transfer rate same as on the first day.

My previous HDD crash happened in November so WD sent me a HDD which wasn’t event being detected on the PC (yes I checked it in BIOS too) then took another couple weeks to send me  this new one. After 6 months it crashed again WTF. I mean I still have Seagate HDD 6 yrs old still working flawlessly giving me 70-80 MB/s transfer rate same as on the first day.

I lost my trust in Western Digital I am not buying another WD HDD again.

WIP: HDR Rendering – GaussBlur Filter

So  as I mentioned earlier I have been working on implementing HDR rendering using compute shaders. It’s my first time with compute shaders and I hate that we can’t debug compute shaders (at least not in vs graphics debugger or pix). One of the part of HDR renderer is GuassBlur filter which will be used for bloom and later for DOF, Motion Blur, etc.

Right now I am implementing GuassBlur Filter using Compute Shaders. Here’s some screenshots of my first Implementation -

(With Blur)


Read the rest of this entry

Weekly Update

I have been busy with my new contract which is on site & it was little involving in few initial days, so wasn’t getting a lot of free time to work on the engine. Also I whatever free time I was getting whether on weekend or couple of hours in weekdays I was trying to finish the mobile game about which I posted earlier.

But Initial crunch is kinda over and I have resumed the work on the engine again. So currently I am working on HDR renderer. I have implemented my first version using usual pixel shader pipeline and now I am working to implement it using Compute Shaders.

Apart from tech stuff I have been playing a lot of new DevilMayCry so I will be posting “My thoughts on DevilMayCry” article soon.

WIP : HDR Rendering

As a part of task to make a physically based rendering pipeline I am working on HDR rendering nowadays. The motivation behind HDR rendering is that normal RenderTargets and the display devices have R8G8B8A8 format and we can only use individual colors from 0.0f – 1.0f floating point range which is very limited specially if you want to model real work lighting & shading because values easily go past 1.0f and we need more precision more bits per channel. So we use one of the HDR rendet targets R16G16b16A16 , etc. But display devices still can only display 8 bits per channel so we have to map those 16bit per channel back to 8 bit per channel for which we use ToneMapping.

Normally the term HDR rendering is referred to a group of effects including rendering things to HDR render target, Tone-mapping, Bloom, Eye Adaptation, etc. And  I have finished my first basic implementation including couple of those effects using pixel shaders . I am sing R16G16B16A16 render target. For luminance I am averaging scene luminance by downscaling the scene luminance render target and then using Erik Reinhard’s method for Tone-mapping. Also implemented a bright-pass filter followed by Gaussian blur for Bloom.

So this is first very naive implementation. There are some bugs, I am working on itand also some more experiments with some different techniques. I am also thinking to try it using compute shader.

Here’s a Scene Rendered to HDR render target -


And after final pass with Tone-mapping -


And here are the views of 3 different areas keeping all settings same and also shown all the passes that are combined to produce the final image ( check how the floor shade changes depending on the total illumination of the scene ). -


My Thoughts on TombRaider

I am mostly a pc gamer and used to keyboard + mouse for shooters for years. For Tomb Raider I used Xbox controller for change, also because I found it easier to control 3rd person characters with a controller in games like Assassin’s Creed, Batman, etc. Though aiming with a controller was challenging.

Tomb Raider is an action adventure game about a girl looking out for adventures. Their ship gets wrecked on a mysterious island and then first 60 to 90 minutes is about the struggle to survive and finding the other crew members. This initial part is focused more character development of Lara Croft and game might feel little restrictive/slow at this early time but it opens up later on. I really like this character development part, how all this cruelty on the Island and this struggle to survive contributes to her growth as a character she’s famous for. There’s not much focus on other crew members but you get some detail about other characters in the form of these documents that you will find while exploring the Island.
Read the rest of this entry


Get every new post delivered to your Inbox.

Join 248 other followers