17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 23:13:00 +01:00

Make the material shaders physically based

This commit is contained in:
2026-10-20 18:39:31 +02:00
parent cf36b24e8d
commit 7d0f76aaa9
20 changed files with 288 additions and 258 deletions

View File

@@ -43,6 +43,8 @@ uniform highp sampler2DArray layerspecgloss;
uniform highp sampler2D layertable;
#define NORMALMAP
// param[2] holds the placement of the chunk, not the weathering
#define NO_WEATHERING
#include <light_common.glsl>
#include <apply_fog.glsl>
#include <tonemapping.glsl>
@@ -111,7 +113,9 @@ void main()
}
else
{
gloss += weight;
// a layer without a specgloss map: a dielectric of the glossiness: of the material (a blinn-phong exponent)
specularity += 0.5 * weight;
gloss += (1.0 - phong_roughness(abs(param[1].w))) * weight;
}
reflectivity += layerreflection * weight;
total += weight;