Should I make a new thread specifically for my rendering engine, or should I just keep posting in this one?
substitute541 wrote:Reminds me of my own 3D engine which I discontinued because it sucked. I don't have my graphics card yet though, so I can't do anything that requires shaders.
I don't believe that it sucked. And if you don't believe that I don't believe, take a look at this (
http://love2d.org/forums/viewtopic.php?f=5&t=2494). I started out small. In fact, I was even doing some rendering stuff before that, back in 2008-ish. Projecting 3D points onto the 2D surface of a 3D object, with 3D objects. Yeah... But the point is, this isn't my first rodeo. I've had a long journey to get to where I am now. The most important advice I can give you is to not give up. I've been faced with numerous problems that I've nearly ripped my head off, trying to solve. I remember back when I was trying to wrap my head around matrices. I couldn't for the life of me understand what they were all about, but I kept trying. And now it's as simple as 2 + 3. You just need to be persistent. As cheesy as it sounds, never give up.
Jasoco wrote:I eschew per pixel z-indexing and shading for pure speed.
Actually, the depth buffer and shading hardly takes up any time at all. With 0.9, we can render to several canvases individually, from the shader. So all I do is just set 2 canvases and then pass the z buffer and color information to the z buffer and scene canvas respectively. And the shading is uber fast. Doesn't do anything to the performance. That is, as long as I keep it on the shader, and not in Lua. Can you imagine that? Running a calculation 480k times on the GPU with GLSL is A LOT faster than once on the CPU with Lua.
Jasoco wrote:That would be really cool. Maybe then I could see what I'm doing wrong and try to fix it. Though it sounds like you're using shaders to do all the 3D work. Is this correct?
That is quite incorrect. The scene is set up in Lua. The scene is processed in Lua. The scene is projected in Lua. And lastly, the scene is drawn using love.graphics.polygon, in Lua. I only use a shader for special stuff like the z buffer, shadows (which is basically just the z buffer), and more recently I've been doing texture/normal mapping which requires a shader, as well as some per pixel shading and effects like god rays. But the engine itself is governed by Lua. I can render a scene quite nicely without using a shader. In fact, the demo originally showcased in this thread (the rigid body stuff) doesn't use a shader at all. Everything is Lua.
ArchAngel075 wrote:Please do keep up the work! even if its not shared code wise, just seeing it possible and happen in LUA/LOVE is a brilliant read/inspiration!
Thank you! That means a lot to me. =)
Follow the potato. Achieve enlightenment.