File size: 2,376 Bytes
2af6e9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
mdl 1.6;

import ::math::*;
import ::state::*;
import ::tex::*;
import ::anno::*;
import ::scene::*;
using .::OmniUe4Function import *;
using .::OmniUe4Base import *;

export annotation sampler_color();
export annotation sampler_normal();
export annotation sampler_grayscale();
export annotation sampler_alpha();
export annotation sampler_masks();
export annotation sampler_distancefield();
export annotation dither_masked_off();
export annotation world_space_normal();

export material M_ToolsAssets(
	int MaxTexCoordIndex = 3
	[[
		anno::hidden()
	]])
 = 
	let {
	float3 WorldPositionOffset_mdl = float3(0.0,0.0,0.0);
	float2 CustomizedUV0_mdl = float2(state::texture_coordinate(math::min(0,MaxTexCoordIndex)).x,1.0-state::texture_coordinate(math::min(0,MaxTexCoordIndex)).y);

	float4 Local0 = ::unpack_normal_map(tex::lookup_float4(texture_2d("./M_ToolsAssets/T_ToolsAssets_Normal_OpenGL.png",::tex::gamma_linear),float2(CustomizedUV0_mdl.x,1.0-CustomizedUV0_mdl.y),tex::wrap_repeat,tex::wrap_repeat));

	float3 Normal_mdl = float3(Local0.x,Local0.y,Local0.z);

	float4 Local1 = tex::lookup_float4(texture_2d("./M_ToolsAssets/T_ToolsAssets_Base_Color.png",::tex::gamma_srgb),float2(CustomizedUV0_mdl.x,1.0-CustomizedUV0_mdl.y),tex::wrap_repeat,tex::wrap_repeat);
	float4 Local2 = tex::lookup_float4(texture_2d("./M_ToolsAssets/T_ToolsAssets_Metallic.png",::tex::gamma_linear),float2(CustomizedUV0_mdl.x,1.0-CustomizedUV0_mdl.y),tex::wrap_repeat,tex::wrap_repeat);
	float4 Local3 = tex::lookup_float4(texture_2d("./M_ToolsAssets/T_ToolsAssets_Roughness.png",::tex::gamma_linear),float2(CustomizedUV0_mdl.x,1.0-CustomizedUV0_mdl.y),tex::wrap_repeat,tex::wrap_repeat);

	float3 EmissiveColor_mdl = float3(0.0,0.0,0.0);
	float OpacityMask_mdl = 1.0;
	float3 BaseColor_mdl = float3(Local1.x,Local1.y,Local1.z);
	float Metallic_mdl = float3(Local2.x,Local2.y,Local2.z).x;
	float Specular_mdl = 0.5;
	float Roughness_mdl = float3(Local3.x,Local3.y,Local3.z).x;
	float SurfaceThickness_mdl = 0.01;
	float Displacement_mdl = 0.0;

	} in
		::OmniUe4Base(
			base_color: BaseColor_mdl,
			metallic: Metallic_mdl,
			roughness: Roughness_mdl,
			specular: Specular_mdl,
			normal: Normal_mdl,
			opacity: OpacityMask_mdl,
			emissive_color: EmissiveColor_mdl,
			displacement: WorldPositionOffset_mdl,
			two_sided: false);