Sunday, December 18, 2011

John Conway's Game of Life HLSL edition

On my Quest to learn HLSL Shader programing i stubeled upon a blog where some one built an implementation of John Conway's game of life using compute shaders after looking up the rules i though about tryingto build one using pixel shader.

here is the result running 1024*1024 at 449 iteration per seconds( i might even be able to get a few more out of it)

in my edition the dead cells leave a corps behind that slowly fade
the color tel wich rule killed them.

it runs on pixel shader 2.0 directx 9 while my hardware run shader model 4.1 i generaly build for the lowest possible hardware.

randoom cells can spawn from just about any type of image but if you wanna try to manualy build a cell you will need to edit a file pixel per pixel and the file will need to be exactly 1024*1024
So here is the download link

this version currently require that you install microsoft visual C++ redistribuable
here are the links for the download provided by microsoft

for windows x86

for windows x64

i'm currently working on an update version with some other function and that would include the c++ redist to instal them without any intervention from the user

Saturday, December 17, 2011

Atmospheric Scattering

here comes atmospheric scattering

this implementation is based on Sean O'Neil openGL implementation wich has been ported to directx for ogre by HexiDave.
The original converted implementation was vertex shader based for mie and rayleight color calculation and mixed them in pixel shader to try to obtain a smooth result this made sens when Sean O'Neil implemented it on the merly begning graphic hardware but it gave horrible artifact unless you have a over tesselated sphere irrlicht's 256 polygon sphere were just not cutting it.
So i updated the code to make all the calcultations in pixel shader giving a much smoother result independent of the poly count of the sphere.
And for the sake of it a nice sunrise at 1920x1080 (i can't take screen shot in full screen -.-)

I just need to verify the license and i will release the completed shader code with constant what is messing and why you most likely are not getting it to work in case you stumbled on my blog by googling HLSL atmospheric scattering

Wednesday, December 14, 2011

for your viewing pleasure

i began working with shaders honestly it's such a wonderfull thing

shaders allow the splating of many textures based on height

and now with a normal map deduced from the heightmap all this done in real time

PS: 4 fps is not fast but it drop to that because of the sniping tool

right now it runs fast because my laptop is a monster but my shader code is obese and need to cleaned up idealy i would also move some part of it off because they don't need to be rendered in real time

also my noise algorithm (wich i though was perlin noise and was not) reached it's limit the more i use it the more visual artifact there are so i will try to create a new one idealy perlin noise for real this time