I'm trying to come up with a contingency solution for when the relevant shader profile isn't available or isn't desired, and emulate the same functionality in software. As mentioned, it wouldn't be too difficult to do this through LUA or make use of Dalvik directly on Android, but since I'm curious and somewhat stubborn, I'd like to at least try and write my own native code compiler - for starters for x86. With a limited instruction set, no planned code-generation optimizations or code parsing (since the input is a graph system), this should be a simple matter of stacking CPU instructions on top of each other.
There is a lot of material on the web on compiler programming, but I have a feeling I don't really need to delve into most of this. Can anyone suggest good webpages to get the kind of information I need or would I be better off just taking a reverse engineering approach, implementing all of the required functionality in a higher level language and working it out from the disassembly?
Note that I really am trying to jump the gun here by avoiding getting knee-deep in a field that has decades of experience and literature to show for it. However, I feel that in view of my modest requirements and no interest in focusing too heavily on the topic, the time required to parse through hundreds of resources could be more effectively spent elsewhere while still achieving what I need. If I'm being naive in my assumptions, don't be shy to just say so - this is something I'd like to try to do myself, not something I absolutely need.
Edited by irreversible, 15 December 2012 - 05:33 AM.