This article relates to the game "Counter-Strike 2". Click here for more information.
This article relates to the software/tool "Counter-Strike 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Csgo Simple 3layer Parallax

From Valve Developer Community
Jump to: navigation, search

English (en)Translate (Translate)

Csgo Simple 3layer Parallax is a shader in Counter-Strike 2 used to give simple fake depth to flat surfaces. This shader is used on most windows on de_Inferno and de_Italy. Page is loosely organized based on how it appears in Material Editor.

Todo: Cleanup, document, and organize.
If you'd like to check out the VMAT for this example, it can be downloaded here!

Material Variables

Color

Diffuse color texture for this layer. Typically you will want to remove any baked in lighting information from this texture. This layer is still usefull to the parallax effect, as it gives detail to the actual flat part of the surface.

  • Color (Image Input)
    • Image Suffix: _color
  • Color Tint - Multiplies the specified color over the entire layer.
  • Tex Coord Scroll Speed - [Clarify]
    • Left Box - [Clarify], U Coord
    • Right Box - [Clarify], V Coord


  • Tint Mask (Image Input)
    • Image Suffix: _mask
Note.png Note:  Variable appears when Tint Mask is enabled.

Normal

Normal map input.

  • Normal (Image Input)
    • Image Suffix: _normal

Lighting

Roughness
Roughness map input. Controls how reflective the surface will be.

  • Roughness (Image Input)
    • Image Suffix: _rough

Metalness
Controls color tinting of the specular highlites. The tint color is based on the underlying diffuse color texture. Typically used for metal materials but is useful on all surfaces when used sparingly.

  • Metalness - Controls the metalness for the whole texture. (Range 0.000 - 1.00)
  • Metalness (Image Input)
    • Image Suffix: _metal
Note.png Note:  Variable appears when Metalness Texture is enabled.

Ambient Occlusion

Todo: Description
  • Ambient Occlusion (Image Input)
    • Image Suffix: _ao
  • Use Secondary Uv For Ambient Occlusion - Whether to use the secondary UV for the ambient occlusion
Note.png Note:  Variable appears when Secondary Uv is enabled.

Fog

  • Fog Enabled - Choose whether or not material is affected by fog.

Layer 0

Masks the Color input.

  • Layer 0 Mask (Image Input)
    • Image Suffix: _mask

Layer 1

Second layer of the stack. Useful for things like curtains, as seen on Italy and Inferno windows.

  • Layer 1 Color (Image Input)
    • Image Suffix: _color
  • Layer 1 Mask (Image Input)
    • Image Suffix: _mask
  • Layer 1 Emissive Tint - [Clarify]
  • Layer 1 Emissive Level - [Clarify]
  • Layer 1 Offset - [Clarify]
  • Use Secondary Uv For Layer 1 - Whether to use the secondary UV for Layer 1
Note.png Note:  Variable appears when Secondary Uv is enabled.

Layer 2

The final layer of the stack.

  • Layer 2 Color (Image Input)
    • Image Suffix: _color
  • Layer 2 Emissive Tint - [Clarify]
  • Layer 2 Emissive Level - [Clarify]
  • Layer 2 Offset - [Clarify]
  • Use Secondary Uv For Layer 2 - Whether to use the secondary UV for Layer 2
Note.png Note:  Variable appears when Secondary Uv is enabled.

Texture Address Mode

Controls how the material will tile on both U and V.

  • Address Mode U
    • Wrap - Default behavior, will tile normally, infinitely.
    • Mirror - [Clarify]
    • Clamp - Disables tiling.
    • Border - [Clarify]
    • MirrorOnce - [Clarify]
  • Address Mode V
    • Wrap - Default behavior, will tile normally, infinitely.
    • Mirror - [Clarify]
    • Clamp - Disables tiling.
    • Border - [Clarify]
    • MirrorOnce - [Clarify]


Shader Features

Shadows

  • Do Not Cast Shadows - Disables shadows being cast from this material.

2-Sided Rendering

  • Render Backfaces - Disables culling on backfaces.
  • Don't Flip Backface Normals - Doesn't flip the backfaces normals, when Render Backfaces is enabled.

Z-Buffering

  • Disable Z Buffering - [Clarify]

Z-Prepass

  • Disable Z Prepass - [Clarify]

PBR

  • Metalness Texture - When enabled, adds an image input to the Metalness variable.

Vertex Color

  • Paint Vertex Colors - Allows the material to be painted with Vertex Colors inside Hammer.

Per-Instance Tint Mask

  • Tint Mask - When enabled, adds a Tint Mask section to the Color variable.

Secondary UVs