переведи: {{Language subpage}}{{Shader|PBR|engine={{strata|4.1}}}} It uses many different texture maps to create a more accurate simulation of light.

{{note|Similar unrelated PBR-based shaders are also used in {{tfbranch|4.1}} and {{Source2|4.1}}.}}
==Supported Parameters==
<!-- list and descriptions from P2CE shaders.json -->
===Basics===
{{MatParam|$basetexture|texture|Base texture with lighting built in.}}
{{MatParam|$basetexture2|texture|Blended texture for use with displacements}}
{{MatParam|$flags|int|Flags}}
{{MatParam|$flags_defined|int|Flags_defined}} {{todo|What do flags do?}}
{{MatParam|$flags2|int|Flags}}
{{MatParam|$flags_defined2|int|Flags_defined}}

===Appearance===
{{MatParam|$basetexturetransform|matrix|Transforms the texture before use in the material. This does not affect [[lightmaps]] on the surface.}}
{{MatParam|$color|color|Adjusts the color of the texture}}
{{MatParam|$color2|color|Ditto}}
{{MatParam|$frame|int|Sets which frame to use if $basetexture is animated}}
{{MatParam|$frame2|int|Sets which frame to use if $basetexture2 is animated}}
{{MatParam|$srgbtint|color|Tint value to be applied when running on new-style srgb parts}}

===Flashlight===
{{MatParam|$flashlighttexture|texture|Flashlight spotlight shape texture (default is effects/flashlight001)}}
{{MatParam|$flashlighttextureframe|int|Animation frame to use if $flashlighttexture is animated}}

===PBR===
{{MatParam|$mraotexture|texture|Defines an MRAO map to use. Needed for the texture to actually use PBR features. Metalness is on the red channel, roughness is on the green, and ambient occlusion is on the blue channel.}}
{{MatParam|$mraoframe|int|Frame to use if $maraotexture is animated}}
{{MatParam|$mraotexture2|texture|Defines an MRAO map to use for the blended texture. Needed for the texture to actually use PBR features. Metalness is on the red channel, roughness is on the green, and ambient occlusion is on the blue channel.}}
{{MatParam|$mraoframe2|int|Frame to use if $maraotexture2 is animated}}
{{MatParam|$parallax|boolean|Enables parallax mapping on the material.}}
{{MatParam|$mraoscale|color|Specifies the strength of Metalness(R), Roughness(G), and Ambient Occlusion(B) for $mraotexture}}
{{MatParam|$mraoscale2|color|Specifies the strength of Metalness(R), Roughness(G), and Ambient Occlusion(B) for $mraotexture2}}
{{MatParam|$parallaxdepth|float|Defines the depth of the parallax map}}
{{MatParam|$parallaxcenter|float|Defines the center of the parallax map. 0.5 is a good start}}
{{MatParam|$blendtintbymraoalpha|bool|Blend tint by the alpha channel in MRAO texture. Similar to $blendtintbybasealpha for [[VertexLitGeneric|VLG]]}}

==={{p2ce}}Paint===
{{MatParam|$paintsplatnormalmap|texture|The paint splat normal map to use when paint is enabled on the surface}}
{{MatParam|$paintsplatbubblelayout|texture|The layout texture which defines the distribution of bubbles in the paint}}
{{MatParam|$paintsplatbubble|texture|The normal mapped texture of a single bubble}}
{{MatParam|$paintenvmap|texture|Envmap that is consistent across all painted surfaces}}

===Lighting===
{{MatParam|$bumpmap|texture|Sets the normal map (new way of setting normalmap)}}
{{MatParam|$bumbframe|int|Frame to use if $bumpmap is animated.}}
{{MatParam|$bumpmap2|texture|Sets the normal map to blend to (new way of setting normalmap)}}
{{MatParam|$bumbframe2|int|Frame to use if $bumpmap2 is animated.}}
{{MatParam|$normaltexture|texture|Normal map texture (deprecated, use $bumpmap)}}
{{MatParam|$emissiontexture|texture|Allows setting an emission texture. Enabled self illumination.}}
{{MatParam|$emissionframe|int|Frame to use if $emissiontexture is animated.}}
{{MatParam|$emissiontexture2|texture|Allows setting an emission texture to blend to. Enabled self illumination.}}
{{MatParam|$emissionframe2|int|Frame to use if $emissiontexture2 is animated.}}
{{MatParam|$emissionscale|color|Color to multiply $emissiontexture with}}
{{MatParam|$emissionscale2|color|Color to multiply $emissiontexture2 with}}
{{MatParam|$hsv|color|HSV color to transform $basetexture texture with}}
{{MatParam|$hsv_blend|bool|Blend untransformed color and HSV transformed color}}

===Reflection===
{{MatParam|$envmap|cubemap|Specular reflections}}
{{MatParam|$envmapparallax|matrix|{{todo|What is this?}} Should be in this format: {{code|<nowiki>[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]</nowiki>}}}}
{{MatParam|$envmapframe|int|Frame to use if material specified in $envmap is animated}}
{{MatParam|$envmaporigin|vec3|The world space position of the env_cubemap being corrected}}
{{MatParam|$bdrf_integration|texture|Texture to use for {{w|Bidirectional reflectance distribution}}}}

===Transparency===
{{MatParam|$alpha|float|Scales the opacity of an entire material.}}
{{MatParam|$alphatestreference|float|Specifies the minimum color value of the alpha channel in which the effect is rounded to 255. A value of ".3" will create a thicker shape while a value of ".7" will create a thinner shape.}}

%keywords - A list of keywords separated by commas. Examples of keywords are: architectural,brown,gray,grime,hanger,industrial,metal,modern,shed,urban,wall,floor

==See Also==
*[[Physically Based Rendering]]
*[[Adding PBR to your mod]]
*[[Adapting PBR Textures to Source]]