Custom texture filtering

Hello, fellow game developers!

I see that in the texture editor I can select the image filtering algorithm - Bilinear, Trilinear, Nearest Neighbour.
My question is - can I define a custom algorithm of my own, in C++?

Thank you

Correct me if I’m wrong but Texture Filtering is the process of obtaining texture color for every pixel in the 2D representation of your 3D primitive. This is very low level stuff handheld in the OpenGL(or DirectX) - GPU interaction. Although theoretically possible to mess with this I’m not sure you would want to.

You can, however, make a shader that alters the pixel color after the Texture Filtering is done and create many different effects.

In UE4 shaders are made in the Material Editor but in general they are written in GLSL (OpengGL Shading Language) and maybe some other languages I am not aware of. I am not certain if you can import GLSL script in unreal.

I’m not sure what you are trying to do but I’m guessing this might be of interest to you.

If you want pixelated texture look check this video tutorial.

I see, you are saying that it’s not texture filtering I am after, but more like writing my custom shader? I will give it a try, specifically with the link you provided. Hope it works :slight_smile:
Thank you!

Okay, I have tried the example you provided, but something seems to be wrong.

Exactly! You are looking for a shader.

Well the example was more of a math thing explanation because I was not sure what you are aiming for.

If you want pixelated texture check this video tutorial.

To be honest, I am not that good with writing shaders so I can’t quite tell you where you got it wrong :slight_smile:

Turn off Mip Mapping for the texture if you want it to look pixelated.