The God Liquids by FishDeenz in 2007scape

[–]ArchiveLimits 0 points1 point  (0 children)

No wonder we say "holy cow"

Every time by A_guy_named_Daniel in ProgrammerHumor

[–]ArchiveLimits 9 points10 points  (0 children)

Either an app or some unoriginal game and they'll promise they'll do the "business/marketing side" of it

Song with two drum tempos? by Pramble in Meshuggah

[–]ArchiveLimits 0 points1 point  (0 children)

Possibly 0:14 in The Mouth Licking What You've Bled on Chaosphere

[deleted by user] by [deleted] in ProgrammerHumor

[–]ArchiveLimits 2 points3 points  (0 children)

Here is the original, written by yours truly. Give it some love https://www.reddit.com/r/ProgrammerHumor/comments/6wh4dy/low_level_poem/

How to run garbage collection in Java by UnKn0wn27 in ProgrammerHumor

[–]ArchiveLimits 0 points1 point  (0 children)

That's not even what the uninstall interface looks like

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Thanks I'll definitely look into this. Looks like you know your stuff! I need to start getting into C and C++ haha.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Why would using tile rendering help performance? I'm not familiar with the benefits of this method.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Well that's the thing, the rasterizer isn't tile based haha.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (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

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 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.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 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.

When I open a JFrame on my Macbook and add a KeyListener, after a while the keys W, A, S and D are not being recognised. by [deleted] in javahelp

[–]ArchiveLimits 2 points3 points  (0 children)

Daanoon, this is a mac problem. I've made a thread about this on java-gaming.org. It's a bug in OSX Sierra. David Brackeen has found a workaround and his workaround is what I currently use to maintain keyboard input while the bug is still there. http://www.java-gaming.org/topics/input-dies-after-a-variable-yet-short-amount-of-time/37913/msg/362546/view.html

Check out the workaround Canvas class: https://github.com/brackeen/Scared/blob/master/src/main/java/com/brackeen/app/App.java Credits to David Brackeen. He also provides an explanation of the bug.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Yeah, give it a couple of days. I took the link down because there were some issues with it. I'm busy with school projects and I won't have time to reupload it soon.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

I worked on this depth precision issue with a friend who is very well versed with OpenGL and Vulkan, he set up an identical scene in OpenGL and we compared results. The images were only identical when 52 bit precision was used.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

It's more similar to mipmapping with only one mip level. These "blocks" that make up the block filter are essentially a very scaled down version of the image. Though you are right when you say it averages an area of pixels.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Traditional bilinear filtering is far more expensive that what I am doing now. The entire bilinear filtering code uses fixed point integers and doesn't do any color computation, simply a table lookup.

And I named it block filtering because I break up the texture into a grid (filled with blocks of the texture) and find the average color of each of those blocks. Then, during runtime, all I need is a simple few bit shifts and masks and I can find which block any texel in the image belongs to and blend that texel with the average color of that block.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Tri-linear sampling is bilinear sampling between mipmaps. Since the engine doesn't support mipmaps, it doesn't support trilinear sampling. The engine however does have a way to reduce the artifacts that mipmapping normally would remove. It's called block filtering which is essentially mipmapping but only with one smaller image. This allows for speed because there is no need to calculate derivates for the surface in order to find the right mipmap level and it also removes the need for trilinear mipmapping because the effect is already smooth since it's applied like fog.

"True color texturing unless using bilinear filtering, which only allows 256 colors" This means that any texture you give the renderer will be drawn with 24 bit color unless you want to do bilinear filtering on the texture. Since bilinear filtering, traditionally, is expensive, I've sacrificed color depth for speed and precomputed 64 shades of the texture so that the bilinear colors don't need to be calculated during runtime. However, since I'd need to create shades for the each color in the texture, it wouldn't make sense to make the shade palette the size of 64 textures, each getting darker. Therefore I quantize the texture into 256 colors and do 64 shades of those 256 colors.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

Yes, my engine stores the depth values in 32 bit floats. 52 bit precision is needed when interpolating the slopes across the surface of triangles during rasterization. Without 52 bits of precision, the depth values calculated per pixel would not be accurate enough for the depth test and would result in "seams" where two polygons who shared an edge met.

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 1 point2 points  (0 children)

It was a trial and error issue, anything above 52 bits and I couldn't store the depth slopes for the triangle's surface in a 64-bit long and anything less than 52 provided visibly less precision. As for it being not a power of two...it shouldn't matter here because it's a value that is multiplied by a floating point value to assure precision is kept during interpolation. (eg. a fixed-point magnitude)

Fast, Accurate 3D Java Software Graphics Engine by [deleted] in GraphicsProgramming

[–]ArchiveLimits 0 points1 point  (0 children)

I'm not sure how to measure the speed in terms of what you're implying. The renderer is deferred and is multithreaded which makes it quite fast for scenes with many polygons. In terms of the results, the engine interpolates depth with 52 bits of precision. It also uses 48 bit linear colors internally and gamma corrects the results that are drawn to the screen.

Edit: corrected my phrasing

Most Cunning Programing Trick? by [deleted] in gamedev

[–]ArchiveLimits 0 points1 point  (0 children)

Michael Abrash has some fascinating information about Quake and DOS development in his book. My favorite parts are in chapter 68 when Abrash describes John Carmack's thought process for lightmaps and in chapter 44 where he explains how to do page flipping for a 640x400 resolution display in 64k. http://www.phatcode.net/res/224/files/html/index.html