I wrote this small demo in the past year or so, don’t really know any more when I started.
During this time I developed my OpenGL and C++ Skills and rewrote certain parts of my small
framwork countless Times. Finally I want to start on my first game, so I declare this demo
as finished. I know there would be still much to do and to improve but I simply don’t want
to develop on this demo any more.
Currently it features
- XML shader system (from shader 2.0 to 4.0. System is captable of using geometry shaders but
I didn’t use it in this demo)
- real time shadows (I used a method to improve the quality of the shadows which was developed
by Thomas “Schrompf” Schulze – www.dreamworlds.de)
- Small GUI (used for the value and camera editors)
- value and camera editor (for easily chaning parts of the demo)
- terrain rendering with smooth blending between two detail levels
- Water with “correct” reflections
- some sort of pseudo instancing for the gras. Uses new draw_instanced extension if aviable
- Frustrum culling an lots of other standard stuff
Lately disscussed with a friend about penumbra shadows. I found a paper about this theme which used a edge detection filter to achive penumbra shadows, so I wrote a edge-detection filter in rendermonkey. Basically it looks if the difference between 5 pixels, which are ordered in a cross, are to high, then it is a edge pixel.
edge-filter.rfx (RenderMonkey 1.80)
If you generate some data with the GPU or CPU, for example with the marching cubes algorithm, you don’t have texturecoordinates to texture the generated mesh. To solve this problem I wrote a 3 way mapping shader, which generates texturecoordinates, binormals and tangents only out of the vertex position and vertex normal. This technique was also presented in Nvidia’s “Cascades Demo Secrets” paper. To test the mapping I applied my parallax occlusion mapping shader.
- EXT_gpu_shader4 – only because of parallax occlusion mapping
3way-mappping.rfx (RenderMonkey 1.80)
I recently played Freelancer again. While I where playing I had a idea how to create a trail effect with a particle system using a vertex shader.
trail.rfx (RenderMonkey 1.80)
I wrote a parallax occlusion Shader in Rendermonkey. Unfortunately due to the fact that the devartives in flow control elements are undefined, the ARB_texture_lod extension would be neccesarry for this shader in glsl with shadermodel 3.0. Until this extension is released EXT_gpu_shader4 has to be used as replacement. So this shader only runs on gForce 8+ cards. Ati doesn’t support that extension yet.
parallax.rfx (Rendermonkey 1.80)