Zanir » Programming

Archive for the ‘Programming’ Category

J000 – noise

18.10.2004

J000_noiseDownload:
runable jar
source code

Applet:

Read the rest of this entry »

J00x – Java programs

18.10.2004

javaI made my own 3D renderer in java due to school task. Programs draw all in software. I don’t use OpenGL or Direct3D. I don’t use Java3D.

Program 19 – Offset Mapping

21.09.2004

019_Offset_Mapping_Offset_roomOffset mapping use new texture coordinations for sample base and normal map. These is computed from original texture coordinations with equation:

new_texture_coordinations = (0.04*height-0.02)*eye + original_texture_coordinations Read the rest of this entry »

Program 18 – Motion blur

15.09.2004

031_motion_blur_with_pbufferProgram uses pixel buffer, for rendering scene to texture. Motion blur is make with equation:
frame(t+1) = alpha*texture + (1-alpha)*frame(t)
Frame buffer doesn’t need clear. Frame buffer doesn’t contain z-buffer. Alpha is preset on 0.18. Texture has 1024 * 1024. Texture contain z-buffer. Program is equivalent to OpenGL program 31. On my graphical card however DX is fastest. DX 127 FSP, OpenGL 104 FSP.

source code and executable – 700kB

Program 17 – Many Per Pixel Lights

13.09.2004

017_Many_Per_Pixel_Lights_2Program uses pixel shaders for lighting scene with many point lights. Light have diffuse, specular and attenuation. One lights request one pass. Because not each triangle is lighting with all lights, each triangle is draw only for lights which lighting his. In program is possible to add light with push left mouse button. Count of lights in scene is limited by count of vertex shader constants. For GF3 and GF4 is maximum count of lights 45, for Radeon 8500 is 90. 017_Many_Per_Pixel_Lights_1

Request pixel shader 1.1. Uses also pixel shader 1.4.

source code and executable – 500kB

Program 16 – Per Pixel Lighting

23.08.2004

016_Per_Pixel_LightingProgram uses pixel shaders for lighting scene with one point light. Light have ambient, diffuse and specular factor.

- variable specular exponet
- cube map normalization
- attenuation with choice from 7 equation
- 3 various technique for attenuation

Request pixel shader 1.1. Uses also pixel shader 1.4.

source code and executable – 720kB

Program 31 – Motion blur with p-buffer

08.08.2004

031_motion_blur_with_pbufferProgram uses pixel buffer, for rendering scene to texture. Motion blur is make with equation:
frame(t+1) = alpha*texture + (1-alpha)*frame(t)
Frame buffer doesn’t need clear. Frame buffer doesn’t contain z-buffer. Alpha is preset on 0.18. Texture has 1024 * 1024. Texture contain z-buffer.

Request: WGL_ARB_pbuffer, WGL_ARB_pixel_format and WGL_ARB_render_texture.

source code and executable – 640kB

Program 15 – ASE Loader

26.07.2004

027_ASE_loader_0This program is approximately identical to OpenGL program 27.

There are:
- lighting with light-map, who was created with radiosity in 3ds max
- better collision
- gravitation and jumps
027_ASE_loader_1
source code and program – 712kB without jpeglibm.lib
model to 3ds max – 90kB

Program 30 – Particle system

23.07.2004

030_Particle_system

source code and executable – 100kB

Space 2004 – Fatal collison

16.04.2004

Space2004Demo uses DX8.1 and was created for contest on web page mikrogen.

Press F1 show menu. Recommended pixel shader 1.1.

source code and executable – 1.5MB