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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Change Antialiasing method from C++

Is there a way to change the antialiasing method between FXAA and Temporal AA from C++? I'm trying to put this ability in a game settings menu, and so far I haven't seen a way to actually switch the method, say through GEngine->GameUserSettings.

Product Version: Not Selected
Tags:
more ▼

asked Oct 23 '14 at 05:28 PM in C++ Programming

avatar image

reynoldsa14
11 2 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

It's possible. You can change console variable r.DefaultFeature.AntiAliasing by C++ code

more ▼

answered Oct 23 '14 at 05:46 PM

avatar image

TimGS
621 20 23 237

avatar image reynoldsa14 Oct 23 '14 at 07:32 PM

And, sorry, how do I change a console variable from C++?

avatar image TimGS Oct 23 '14 at 08:25 PM

If you want to do some action and be sure that AA is set before then use

IConsoleManager::Get()->FindConsoleVariable(TEXT("r.DefaultFeature.AntiAliasing")) to get your AA variable, set callback for it https://docs.unrealengine.com/latest/INT/API/Runtime/Core/HAL/IConsoleVariable/SetOnChangedCallback/index.html and then set it https://docs.unrealengine.com/latest/INT/API/Runtime/Core/HAL/IConsoleVariable/Set/2/index.html

But read cautions before

avatar image reynoldsa14 Oct 23 '14 at 08:31 PM

No, thanks, the first one did it. Is there a built in way to make that persist, e.g. writing to DefaultEngine.ini, or do I have to roll my own?

avatar image TimGS Oct 23 '14 at 08:42 PM

Of course you can write to ini. Use global GConfig variable and its function SetInt() https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FConfigCacheIni/SetInt/index.html and use another variable GEngineIni as Filename argument. It won't write to default ini, though, but it will write to user-specific ini which overrides default settings.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Check out the UGameUserSettings class. From there you can access anti-aliasing settings.

more ▼

answered Oct 23 '14 at 07:57 PM

avatar image

undercover
843 123 111 138

avatar image DCVolo Nov 13 '17 at 03:52 PM

Thanks ! That's the right way to do it :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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