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"

How can I use this shader in UE4?

https://www.shadertoy.com/view/4t3GDj I have tried for many times ,there is a big problem alt text

How can I use recursive function in UE4 material editor or any other way to achieve this kind of effect

Product Version: UE 4.22
shader.png (172.2 kB)
more ▼

asked May 16 '19 at 09:25 AM in Blueprint Scripting

avatar image

6 1 2

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

2 answers: sort voted first

Those are buffers. Shaders can't access surrounding pixels, primery because GPU does not guaranty that other pixels are already done as GPU specifications don't define how those pixels are generated by GPU and what order they are. So instead you need to run one shader that do first pass in to the buffer inside GPU memory and then access that buffer like a texture in 2nd shader, that does things based on what shader 1 did.

This requires doing things in CPU, and in shader toy you do that by creating buffer tab and in UE4 you can do this by rendering to Render Target:



RenderTaget then can be accessed same as a texture exactly as what shadertoy shader does

more ▼

answered May 16 '19 at 07:13 PM

avatar image

37.3k 936 172 1117

avatar image 橙月X May 17 '19 at 03:45 AM

It all fell into place ,thanks for your response.

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

You can search for Custom material node which enables you to paste direct shader code for more complex functions. That way you can avoid spaghetti shader but be aware that it might use more instructions at the and as it would prevent Unreal from doing Constants Folding optimization. Most of the time it is not an issue, just be aware of it.

more ▼

answered May 16 '19 at 04:20 PM

avatar image

Vertex Soup
288 4 22 16

avatar image 橙月X May 17 '19 at 03:21 AM

I have tried custom node,Probably because I`m noob, I did not achieve recursive,that`s the point , thanks anyway.

(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