RenderMonkey
1,718
0
Advertisement
PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro โ $3/month.
So getting a little tired of doing my GUI library (which is still basically useable, just needs touchups) I decied to check out RenderMonkey and learn GLSL.
What a cool tool this is. I was able to create my first shader in no time. Took a little bit to learn exactly how data is passed from RenderMonkey to the shaders but it worked out. RenderMonkey provies quite a collection of variables that it will pass into your shaders.
for my first shader I wanted a simple plane (200 faces or so) to osolate up and down based on time.
Here is my shaders. fTime0_X is a RenderMonkey supplied variable that is the sine of value Time (float).
vertex
fragment
What a cool tool this is. I was able to create my first shader in no time. Took a little bit to learn exactly how data is passed from RenderMonkey to the shaders but it worked out. RenderMonkey provies quite a collection of variables that it will pass into your shaders.
for my first shader I wanted a simple plane (200 faces or so) to osolate up and down based on time.
Here is my shaders. fTime0_X is a RenderMonkey supplied variable that is the sine of value Time (float).
vertex
uniform float fTime0_X;void main(void){ vec4 pos = gl_Vertex; pos.z += fTime0_X * 3.0; gl_Position = gl_ModelViewProjectionMatrix * pos; //gl_Position = ftransform();}fragment
void main(void){ gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );}
Advertisement
Advertisement
Advertisement
Discussion