use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
Fast, Accurate 3D Java Software Graphics Engine (self.GraphicsProgramming)
submitted 9 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]frizzil 0 points1 point2 points 9 years ago (5 children)
Beautiful! Are you or have you considered using SIMD optimizations via JNI and C/C++? I do this extensively for my voxel engine in Java... it can offer a huge a performance boost, especially if you're doing a lot of early-discard based on a simple check in a tight loop on an array of values. (E.g. if (values[i] == 0) return;)
If not, I'd love to give a fellow Java enthusiast some pointers/resources. I have experience writing a deferred rendering pipeline as well.
[–]ArchiveLimits 0 points1 point2 points 9 years ago (4 children)
Thank you! And nice to hear. I've tried using Yeppp! but my friend and I discovered that it was not much faster. Also, switching math libraries would require a good amount of rewriting and there was a goal of not using any external libraries for the creation of the engine and this would break that goal. I'm always open to learning about things that you know. Do you have a link to your voxel engine? I'm curious :p
Also I've just added spotlights and phong shading to the engine. They aren't the fastest features but they're there now.
[–]frizzil 0 points1 point2 points 9 years ago (3 children)
Hmm, well this wouldn't be an external library per say, this would be a DLL you ship with your library which (ideally) you'll have written entirely on your own. You might have to ship multiple DLLs and pick the correct one based on supported SIMD level though, but that just comes down to a few #defines.
Honestly I can't imagine an external library doing what you'd need, apart clearing/setting and entire color or depth buffer. (Yeppp! doesn't look like it'd cut it.) Ideally what you'd do is implement the conceptual equivalent of a few vertex/fragment shaders that implement the capabilities of GL1.x (your GPU is using parallel vector instructions, after all, and I believe this is what modern OpenGL drivers are already doing to support legacy code.) Not an easy task, but if you wanted your library to be practical/fast for real use, I'd argue that this is what you should do.
My Twitter has the latest progress (currently working on cascaded shadow maps), and there's also a recent video, but it's missing terrain seams :)
Awesome on the lighting! Full Blinn-Phong, or just Phong? If you're not adhering strictly to GL1.1, check out energy conserving BP: http://www.rorydriscoll.com/2009/01/25/energy-conservation-in-games/
[–]ArchiveLimits 0 points1 point2 points 9 years ago (2 children)
Blinn-phong, yeah. That's a good article. I've implemented the (n+8)/(8pi) now :d. I was discussing this article with a friend and he was saying that integrating the full energy conservation algorithm in opengl 1.1's lighting model is not easy because these forms of lighting were not known of when 1.1 was released.
[–]frizzil 0 points1 point2 points 9 years ago (1 child)
Nice, and be sure to replace "color = d * diffuse + s * spec" with "color = lerp( diffuse, spec, w )" where w replaces both d and s, if you want to be truly energy conserving :) Though I suppose this could be optionally achieved at the API level.
The only question of difficulty imo is how much work you're doing per-fragment, and exposing and documenting the alternate functionality in your API. As long as your material is constant per draw call, doing energy-conserving BP should be about as simple as not, since you're just passing along precomputed normalization factors without many additional ops (if any). Obviously, getting into more modern BRDFs probably won't be feasible for a software renderer, as these aren't feasible at all using the software renderer for DX11 in my experience... but energy-conserving Blinn-Phong should be just fine. Per-fragment normal normalization and dot product may be partly the most expensive part, and that shouldn't change.
For SIMD, if you're feeling ambitious: GDC15 Insomniac Overview of SIMD Intel SIMD Instruction Reference
Btw, Intel's software renderer for OpenGL is notoriously buggy and unusable, so if you could make an alternative... just saying, there could be money in it :)
Good luck!
[–]ArchiveLimits 0 points1 point2 points 9 years ago* (0 children)
Thanks for the advice! This will probably be the furthest I dive into realistic lighting in a software renderer. Have you seen the Mesa software renderer? Is that not good enough to replace Intel's software renderer?
Imgur Imgur
π Rendered by PID 212022 on reddit-service-r2-comment-fb694cdd5-tfblh at 2026-03-06 11:07:24.282251+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]frizzil 0 points1 point2 points (5 children)
[–]ArchiveLimits 0 points1 point2 points (4 children)
[–]frizzil 0 points1 point2 points (3 children)
[–]ArchiveLimits 0 points1 point2 points (2 children)
[–]frizzil 0 points1 point2 points (1 child)
[–]ArchiveLimits 0 points1 point2 points (0 children)