# Material Custom node not work after package to PS4

**URL:** <https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481>\
**Category:** Rendering\
**Tags:** build, unreal-engine, Shaders, hlsl, question\
**Created:** [September 17, 2019, 2:19pm UTC](https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481 "2019-09-17T14:19:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![windlox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@windlox](https://forums.unrealengine.com/u/windlox)\
**Post date:** [September 17, 2019, 2:19pm UTC](https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481/1 "2019-09-17T14:19:03Z")

</div>

I write a postprocess shader to blur the near scene, this works fine in the editor, but not work after package to ps4.  
Here is my material and Custom HLSL code. Can someone tell me where is the problem? Thanks ;D

 ![287586-shader.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/2/ba2168c92cf376e1ffb146b1bc520c82eecabb47.png)

And here is the code in custom node:

```
float4 res = (0.0f, 0.0f, 0.0f, 0.0f);

float2 invSize = View.ViewSizeAndInvSize.zw;

float2 uv = (0.0f, 0.0f);
uv = ViewportUVToSceneTextureUV(ViewportUV, 14);

int TexIndex = 14;
float weights[] =
{
  0.01f , 0.02f , 0.04f , 0.02f , 0.01f,
  0.02f , 0.04f , 0.08f , 0.04f , 0.02f ,
  0.04f , 0.08f , 0.16f , 0.08f , 0.04f ,
  0.02f , 0.04f , 0.08f , 0.04f , 0.02f ,
  0.01f , 0.02f , 0.04f , 0.02f , 0.01f
};

float offsets[] = { -2.0f * BlurIntensity, -1.0f * BlurIntensity, 0.0f, 1.0f * BlurIntensity, 2.0f * BlurIntensity };

uv *= (0.5f,0.5f);
for (int i = 0; i < 5; ++i)
{
	float v = uv.y + offsets[i] * invSize.y;
	int temp = i * 5;
	for (int j = 0; j < 5; ++j)
	{
		float u = uv.x + offsets[j] * invSize.x;
		float2 uvOffset = (u, v);
		float2 uvShifted = uv + uvOffset;
		float weight = weights[temp + j];
		float4 tex = SceneTextureLookup(uvShifted, TexIndex, false);
		res += tex * weight;
	}
}

return res;
```

---

<div class="post-metadata">

**Author:** ![windlox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@windlox](https://forums.unrealengine.com/u/windlox)\
**Post date:** [September 18, 2019, 1:40pm UTC](https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481/2 "2019-09-18T13:40:44Z")

</div>

or can someone tell me how to debug the Shader Compiler?

---

<div class="post-metadata">

**Author:** ![ThanhToan16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThanhToan16](https://forums.unrealengine.com/u/ThanhToan16)\
**Post date:** [February 20, 2023, 5:08am UTC](https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481/3 "2023-02-20T05:08:34Z")

</div>

I’m facing the same issue. Have you solved the problem ?

---

<div class="post-metadata">

**Author:** ![windlox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@windlox](https://forums.unrealengine.com/u/windlox)\
**Post date:** [April 6, 2023, 5:44am UTC](https://forums.unrealengine.com/t/material-custom-node-not-work-after-package-to-ps4/455481/4 "2023-04-06T05:44:58Z")

</div>

Yes, I have solved this problem. When writing HLSL code, your syntax needs to be very standardized, especially after floating point values, you must add f, for example float a = 0.0f; float4 b = float4(0.0f,0.0f,0.0f,1.0f), otherwise the GLSL compiler will not be able to correctly recognize your HLSL code.
