mame/3rdparty/bgfx/examples/44-sss/fs_sss_unlit.sc
Бранимир Караџић 1a6a018fc3 Update bgfx to latest
2021-08-10 20:28:56 +02:00

22 lines
547 B
Python

$input v_normal, v_texcoord0, v_texcoord1
#include "../common/common.sh"
#include "parameters.sh"
#include "normal_encoding.sh"
void main()
{
vec3 albedo = vec3_splat(1.0);
// get vertex normal
vec3 normal = normalize(v_normal);
float roughness = 1.0;
vec3 bufferNormal = NormalEncode(normal);
// write data to alpha channel of color buffer to signify different handling
// while lighting/shading these pixels in the gbuffer combine pass
gl_FragData[0] = vec4(toGamma(albedo), 0.0);
gl_FragData[1] = vec4(bufferNormal, roughness);
}