After puzzling some time over the tutorials in Lighthouse3D, I finally learned how to prepare a GLSL shader and use it in an OpenGL render. In the beginning I thought a shader could be used on a particular set of vertices and fragments. However, it turned out that the shader was run every frame on every vertex and fragment you gave OpenGL to use. This meant that if you made a simple fragment shader that coloured the current fragment red, then everything you draw on the screen will be red. It turns out the shader replaces the so-called fixed-functionality in the rendering pipeline, which is basically a little assembly line where all the vertices and colours given to the video card gets processed. So instead of having the workers work their normal routine, a shader tells them what to do instead. To be honest I felt a little disappointed since I could not write something like actionscript would allow me to do, but I guess that is just because it isn’t meant to be actionscript.
astrobunny writing programs
Tags
2d
algorithm
beta
better way
blog
blogging
bsp
buffer
bunnyblogger
C++
client
constructor
data
demo
destructor
enhancement
example
exception
external
for
glew
glsl
intermediate mode
lightmap
loop
objects
OpenGL
packing
performance
populate
rbsptree
sdl
separator
shortening
simple
snippet
string.join
structure
throw
tree
unresolved
vbo
vertex
will it happen
wysiwyg
Categories
GitHub Projects
Blogroll
Archives