# New PBR Shader Breaking Changes

**URL:** <https://forum.babylonjs.com/t/new-pbr-shader-breaking-changes/16728>\
**Category:** Questions\
**Created:** [December 17, 2020, 7:47pm UTC](https://forum.babylonjs.com/t/new-pbr-shader-breaking-changes/16728 "2020-12-17T19:47:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [December 17, 2020, 9:05pm UTC](https://forum.babylonjs.com/t/new-pbr-shader-breaking-changes/16728/3 "2020-12-17T21:05:52Z")

</div>

Actually, those string replace is not the final fix we provided. You should instead do what I have described in this post:

> [@Recent Material Pipeline Changes](https://forum.babylonjs.com/t/recent-material-pipeline-changes/6885/13):
>
> So, a PR has been merged: With it, you can do this change in \_buildCustomShader: private \_buildCustomShader(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.PBRMaterialDefines, attributes?: string[], options?: ICustomShaderNameResolveOptions) : string { options!.processFinalCode = (type: string, code: string) =\> { if (type === "vertex") { return code; } const sci = new BABYLON.Shader…

With that in place, everything will (should) work as expected because the whole shader code (at least all the specific PBR code) will be inlined inside the `main` function. If that still does not work, please provide the final fragment shader code that you generate which fails and we will have a more deeper look.

---

_[View the full topic](https://forum.babylonjs.com/t/new-pbr-shader-breaking-changes/16728)._
