gzdoom-gles/wadsrc/static/shaders/glsl/func_pbr.fp
Magnus Norddahl 9c74c9629a - rewrite the user shader support for materials - new syntax is to create a 'Material ProcessMaterial()' function
# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/hwrenderer/textures/hw_material.cpp
#	src/r_data/gldefs.cpp
#	wadsrc/static/shaders/glsl/main.fp
2018-08-20 01:22:34 +02:00

14 lines
426 B
GLSL

Material ProcessMaterial()
{
Material material;
material.Base = getTexel(vTexCoord.st);
material.Normal = ApplyNormalMap(vTexCoord.st);
material.Metallic = texture(metallictexture, vTexCoord.st).r;
material.Roughness = texture(roughnesstexture, vTexCoord.st).r;
material.AO = texture(aotexture, vTexCoord.st).r;
#if defined(BRIGHTMAP)
material.Bright = texture(brighttexture, vTexCoord.st);
#endif
return material;
}