f679078e75
Already working race with disabled advanced lighting :)
19 lines
353 B
GLSL
19 lines
353 B
GLSL
#ifdef Use_Bindless_Texture
|
|
layout(bindless_sampler) uniform sampler2D tex;
|
|
#else
|
|
uniform sampler2D tex;
|
|
#endif
|
|
|
|
in vec3 nor;
|
|
in vec2 uv;
|
|
out vec3 EncodedNormal;
|
|
|
|
#stk_include "utils/encode_normal.frag"
|
|
|
|
void main(void)
|
|
{
|
|
float glossmap = texture(tex, uv).x;
|
|
EncodedNormal.xy = 0.5 * EncodeNormal(normalize(nor)) + 0.5;
|
|
EncodedNormal.z = glossmap;
|
|
}
|