I just finished up this demo with lightmaps, vertex lights, GL lights, and decal lights. The same decal technique can be used for blood splatters or burns that wrap around the walls. The code is a mess, but I proved that it can be done:
http://www.leadwerks.com/gldemo.zip
Regarding the stencil buffer stuff: At this point, you are just casting a shadow onto the ground, right? I think that's a great place to start, rather than trying to cast onto the walls.
You can add parameters to the entity structure without breaking it. There are parameters that indicate where other entity data will go. For example, mesh data gets written to a bank stored in the entity structure at position "DEIMOS_ENTITY_MESH". If you need to, just change that const to a larger number and insert your own field. If you add a field to the entity structure, make sure you increase the bank that CreateEntity() creates. I HIGHLY recommend you do ALL programming using constants, rather than PeekInt(bank,64). The structures WILL change, but if you are using constant names, your code won't get screwed up.
I want to work on this CSG/BSP stuff, and that will take a while. If you work on the stencil buffer, we'll both have a pretty sizable task to keep busy with for the next week or so. The way I see it is that BSP needs to be done next, which will then make picking, visibility, occlusion, and lighting much easier.
Source is updated.
http://www.leadwerks.com/gldemo.zip
Regarding the stencil buffer stuff: At this point, you are just casting a shadow onto the ground, right? I think that's a great place to start, rather than trying to cast onto the walls.
You can add parameters to the entity structure without breaking it. There are parameters that indicate where other entity data will go. For example, mesh data gets written to a bank stored in the entity structure at position "DEIMOS_ENTITY_MESH". If you need to, just change that const to a larger number and insert your own field. If you add a field to the entity structure, make sure you increase the bank that CreateEntity() creates. I HIGHLY recommend you do ALL programming using constants, rather than PeekInt(bank,64). The structures WILL change, but if you are using constant names, your code won't get screwed up.
I want to work on this CSG/BSP stuff, and that will take a while. If you work on the stencil buffer, we'll both have a pretty sizable task to keep busy with for the next week or so. The way I see it is that BSP needs to be done next, which will then make picking, visibility, occlusion, and lighting much easier.
Source is updated.