I use “SceneTextureLookup(UV, TexIndex, false)” to get scene texture in my Material expression custom node code. The code work fine on PC but crash on mac. And I pretty sure that “SceneTextureLookup(UV, TexIndex, false)” cause the crash. Because after I comment this line, it won’t crash any more. Plz help me. BTW Is there any way to get the scene texture as texture object?
Did you ever solve this? I’m getting this exact same crash issue, on UE4 4.18 using macOS High Sierra, on a Mac mini (late 2014). Can confirm it is the SceneTextureLookup like that crashes it. Same thing, its fine on PC, but crashes on Mac
This problem has been around for a long time. I only remember that I changed the way of implementation. HLSL is the language under windows system. If you want to know about HLSL and GLSL. Maybe this website can help you. If you are convenient, you can tell me what you want to achieve, I can help you write the code.
I am sorry that my English is very bad. I hope that you can understand what I said.
Thanks for your reply, I really appreciate it!
ahh, so UE4 uses HLSL for Windows, but does a HLSL->GLSL conversion for Mac? That makes things trickier.
What I’m trying to accomplish is a outer edge border around my characters. With SceneTextureLookup, I basically want to offset the character’s pixels(object with custom stencil depth value) to give the illusion of a border. Here is the Material Custom Expression, and the Material itself (I stripped out the color stuff I was doing, for clarity):
Sorry for reply delay.
[Is this what you want?]
what I want to do is more like this: UE4 Tutorial 101 — Glow em cores - YouTube
In fact, I followed that tutorial to do it.
So, Have you solved your problem?
no I have not. Do you have any insights? I may just solve this without the use of shaders, by dynamically generating a duplicate mess behind the objects each frame, and just setting that duplicated meshes’ color to whatever I like. If you know of any purely shader technique, I’d love any and all help.
Please don’t use your method, it will make your program more performance-consuming.
If I have time in the near future, I will make a material for you, maybe tomorrow, after work.
you would be my hero. Thanks!
Please give me your email address or another contact information. So that I could send you my material file or project.
So I learned this is a bug with engine version 4.18 (and earlier probably, as OP was on 4.14 at the time of asking). It does not crash on 4.21. If you want to stay on version 4.18, you’ll need to switch out your custom material expression call to SceneTextureLookup for SceneTexture nodes using the material editor. In my case it sucked a lot in my case, as I really needed a for loop, which can only be done in custom material expressions, and not with the visual material editor. But at least it’s no longer crashing.