x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.20
Tags:
more ▼

asked Sep 05 '18 at 09:03 AM in C++ Programming

avatar image

BorisKipi
5 1 3

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Sep 05 '18 at 10:09 AM

avatar image

dZh0
1.2k 6 5 8

avatar image BorisKipi Sep 05 '18 at 10:21 AM

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 :) Thank you!

avatar image dZh0 Sep 05 '18 at 01:33 PM

Exactly! You are looking for a shader.

avatar image BorisKipi Sep 05 '18 at 11:08 AM

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

alt text

example-hlsl.png (404.4 kB)
avatar image dZh0 Sep 05 '18 at 01:47 PM

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 :)

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Dec 02 '18 at 07:45 PM

avatar image

mightyenigma
3.7k 18 19 20

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question