Showing posts with label changelog. Show all posts
Showing posts with label changelog. Show all posts

Friday, May 13, 2011

Changelog 003

I mostly finished the work necessary for porting to OpenGL >3.
The model class got rewritten to use VBO's instead of immediate mode, and the imported collada vertices were changed to fit into the VBO's vertex structure. In retrospect, it was a straight forward process, even though there were some minor hiccups. There is still much to do, converting the actual existing code that is still using deprecated functions, but the worst part is done.

After mog mentioned he wants to code a 2d rotating ribbon effect, i thought about how i would realise it and today i was playing around with the shader realtime editor and built that oldschool 2d ribbon/twister effect, which is common in older demos.


I ended up playing around with the same code in the shadertoy and it ended up in a textured more dynamically moving twister thing (paste to the default Deform shader code and hit the compile button (or Alt-Enter)). You might need to manually enable WebGL in your FireFox about:config or use Chrome.

Friday, May 6, 2011

Changelog 002

This week i started out improving the shader editor, so it becomes actually useful. It still lacks some kind of selection of what shader currently is being edited, but i added some visual enhancements like fading the top and bottom code lines, adding a line counter, and error handling and parsing the errorlog to highlight the lines which makes the compilation fail.

Failed compilation with highlight on the errornous code line
Further i added tangent calculation from the texture coordinates for normal mapping and texture mapping on the sphere primitive.

Is this normal?!

Once upon a time in a galaxy far far away
In case you're wondering, theres a julia fractal being animated in the corners.

The rest of the week i was trying to port the engine to the OpenGL 3.3 core specs which includes uploading the modelview and projection matrices, and the actual vertex data to the shader, and stop using immediate mode ( i will miss it! ) for the sake of using Vertex Buffer Objects.

So hopefully i will be done porting most of the code by next week so i can focus on the fun stuff again.

Friday, April 29, 2011

Changelog 001

This was a quite successful week. I've learned a lot of things and started implementing them aswell.

The first thing i worked on was finally getting the per pixel lighting shader to work, which i did after numerous talks with several developers both on gamedev.net and irc. Eventually, all that was left to do was transforming the lights position by the camera matrix, so everything is in the same view space, and can be lit accordingly.

Failed lighting
Successful lighting
Currently it is only using diffuse lighting. Adding ambient and specular would be easy but it is not necessary right now, as for now i just like to tinker around with shaders and to get a better understanding of how to work with them.

Another thing i wanted to get done for month is model loading, and thus i started coding a collada importer. For now it is crudely hacked together, and it only supports triangulated models and no quads or other polygons. It took a couple of hours but eventually i got it working pretty good.

Quick and dirty model made in blender

I added another shader for texturing which includes the lightingcode from before and ..wow.. shaders really are awesome to work with!

Lastly, i want to give some credits to iq of rgba for writing this awesome shader live editor.
Something like this would really increase the workflow, and instead of alt-tabbing and recompiling all the time you just hit a button and see the results. So this encouraged me to remake this idea and write my own shader live editor. It took just a few hours, but for now it is more of a proof of concept. The editing capabilities are crude, but at least it is working!


I will keep working on it to make it a useful and fun tool eventually.