Artificial, deliberate, per-object aliasing

by user234461   Last Updated May 15, 2018 18:13 PM

I'm making a 3D game with a retro feel1 and would like to shade a single object in such a way that the edges and colours look aliased: that is to say, it should look like the spatial sample rate of the fragment shader is much lower for the object in question than for other objects. Depth testing will still be required since the object in question can be occluded by other, full-res objects.

Obviously, from a texture point of view this could be achieved when generating texture sample points. However, it's the edges that will be the most noticeable and which concern me.

I don't think rendering transparent pixels at the edges is an option because that will lead to seams in the object among other occlusion issues. I don't think it's possible to exceed the edge of the object either.

I think the best option would be to render the object after the other objects at a lower resolution using a downsampled depth buffer from the initial render, outputting to a partially transparent texture that could then be composited into the final image. I don't mind the odd otherworldly artefact of the depth downsampling as long as it's under my control. Carefully choosing the resolutions of the two renders should prevent scaling artefacts. Does this sound feasible?

I'm using modern OpenGL (no third-party game engine).

Tags : opengl 3d graphics


Related Questions





Can you trilinear sample a non volume texture?

Updated May 23, 2015 21:05 PM


Cache file /home/queryxchang/public_html/apps/frontend/config/../cache/-q-14-158683-artificial-deliberate-per-object-aliasing- could not be written