54 lines
959 B
GLSL
54 lines
959 B
GLSL
#define USE_GLOW
|
|
#define USE_MAP_MATERIAL
|
|
|
|
T_BPMaterial BPMaterials[1] = {
|
|
{ vec3( 1 , 1 , 0 ) * .1 , vec3( .1 ) , 4 , .1 }
|
|
};
|
|
|
|
T_PBRMaterialOld PBRMaterialsOld[1] = {
|
|
{
|
|
// Albedo / specular colors
|
|
vec3( 1 , 1 , 0 ) , vec3( 1 , 1 , .4 ) * .1 ,
|
|
// Roughness , anisotropy , subsurface , metallic
|
|
.8 , .8 , .1 , .9
|
|
}
|
|
};
|
|
|
|
T_PBRMaterial PBRMaterials[1] = {
|
|
{
|
|
// Albedo color
|
|
vec3( 1 , 1 , .4 ) ,
|
|
// Roughness , metallic , subsurface , anisotropy
|
|
.3 , .1 , 0 , .0 ,
|
|
// Specular strength / tint%
|
|
1 , 1
|
|
}
|
|
};
|
|
|
|
vec3 Glow[1] = {
|
|
vec3( 0 , 0 , 0 )
|
|
};
|
|
|
|
void mapMaterial(
|
|
in int matIndex ,
|
|
out int type ,
|
|
out int tIndex ,
|
|
out int glowIndex )
|
|
{
|
|
if ( matIndex == 0 ) {
|
|
type = 0;
|
|
glowIndex = -1;
|
|
} else {
|
|
type = 1;
|
|
glowIndex = 0;
|
|
}
|
|
tIndex = 0;
|
|
}
|
|
|
|
vec2 map( vec3 pos )
|
|
{
|
|
pos = pos - vec3( 0 , 0 , 0 );
|
|
vec3 q = pos;
|
|
//q.xy = mod( q.xy + 4. , 8. ) - 4.;
|
|
return vec2( length( q ) - 1.8 , step( 0. , 1.9 - length( pos.xy ) ) );
|
|
}
|