Download

Shader code of the BRDF shading model

Hey folks,

I am trying to reconstruct the painting results of UE 4 in WebGL. Is there any way to view the corresponding shader file (HLSL code)? So that I can easily transfer it to GLSL code…

I found the HLSL code under the window tab in the material editor, but it only shows the functions that return the material parameters (base, metallic and roughness), not the core shading code (BRDF, etc.).

If there are no ways to directly get the shader file, I will implement the UE 4 Shading Model introduced in siggraph course 2013:

Thanks a lot :smiley:
gypsyshen

Look in the Engine\Shaders directory. All source for the shaders are in there. BRDF.usf is the one that contains the actual BRDF shader code.

Thank you Ehamloptiran!! The BRDF shader file is exactly the same as they presented in the siggraph notes :smiley: