This article's documentation is for anything that uses the Source engine. Click here for more information.

PBR (Strata shader)

From Valve Developer Community
Jump to: navigation, search

Stub

This article or section is a stub. You can help by adding to it.

PBR

is a pixel shader available in Strata Source Strata Source.

English (en)русский (ru)
Edit

It uses many different texture maps to create a more accurate simulation of light. Strata Source Strata Source uses a modified version of Thexa4's PBR shader, which is capable of rendering lightmaps on brushes. It can be used on both brushes and models.

Note.pngNote:Similar unrelated PBR-based shaders are also used in Tf-16px.png Titanfall engine branch and Source 2 Source 2.

Supported Parameters

Basics

Base texture with lighting built in.
Blended texture for use with displacements

Appearance

Transforms the texture before use in the material. This does not affect lightmaps on the surface.
Adjusts the color of the texture
Ditto
Sets which frame to use if $basetexture is animated
Sets which frame to use if $basetexture2 is animated
Tint value to be applied when running on new-style srgb parts

Flashlight

Flashlight spotlight shape texture (default is effects/flashlight001)
Animation frame to use if $flashlighttexture is animated

PBR

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.
Frame to use if $maraotexture is animated
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.
Frame to use if $maraotexture2 is animated
Enables parallax mapping on the material. Needs a heightmap embedded into the alpha channel of the Bumpmap to work
Specifies the strength of Metalness(R), Roughness(G), and Ambient Occlusion(B) for $mraotexture
Specifies the strength of Metalness(R), Roughness(G), and Ambient Occlusion(B) for $mraotexture2
Defines the depth of the parallax map. Essentially the intensity of the heightmap. 0.10 is a good start.
Defines the center of the parallax map. Essentially how deep the highest point is. This is often used to make the parallax mapping flush with a wall or floor, as if it is not flush it can visually extend past the floor, which can be very distracting. 0.5 is a good starting point.
Blend tint by the alpha channel in MRAO texture. Similar to $blendtintbybasealpha for VLG
Enables its use on models. Must be set to work on models.

Portal 2: Community EditionPaint

The paint splat normal map to use when paint is enabled on the surface
The layout texture which defines the distribution of bubbles in the paint
The normal mapped texture of a single bubble
Envmap that is consistent across all painted surfaces

Lighting

Sets the normal map (new way of setting normalmap)
Frame to use if $bumpmap is animated.
Sets the normal map to blend to (new way of setting normalmap)
Frame to use if $bumpmap2 is animated.
Normal map texture (deprecated, use $bumpmap)
Allows setting an emission texture. Enabled self illumination.
Frame to use if $emissiontexture is animated.
Allows setting an emission texture to blend to. Enabled self illumination.
Frame to use if $emissiontexture2 is animated.
Color to multiply $emissiontexture with
Color to multiply $emissiontexture2 with
HSV color to transform $basetexture texture with
Blend untransformed color and HSV transformed color

Reflection

Specular reflections
Blank image.pngTodo: What is this?
Should be in this format: [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]
Frame to use if material specified in $envmap is animated
The world space position of the env_cubemap being corrected

Transparency

Scales the opacity of an entire material.
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.

See also