Lightmapped 4WayBlend: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:
  Lightmapped_4WayBlend
  Lightmapped_4WayBlend
  {
  {
$basetexture de_cbble/stone_alt/brick_a
    "$basetexture"        "de_cbble/stone_alt/brick_a"
$bumpmap de_cbble/stone_alt/brick_a_normal
    "$bumpmap"            "de_cbble/stone_alt/brick_a_normal"


$basetexture2 de_cbble/stone_alt/brick_a_damaged
    "$basetexture2"        "de_cbble/stone_alt/brick_a_damaged"
$bumpmap2 de_cbble/stone_alt/brick_a_damaged_normals
    "$bumpmap2"            "de_cbble/stone_alt/brick_a_damaged_normals"
$texture2_uvscale "[1.0 1.0]"
    "$texture2_uvscale"    "[1.0 1.0]"
$texture2_lumstart 0.0
    "$texture2_lumstart"  "0.0"
$texture2_lumend 0.8
    "$texture2_lumend"    "0.8"
$texture2_blendstart 0.8
    "$texture2_blendstart" "0.8"
$texture2_blendend 0.9
    "$texture2_blendend"  "0.9"


$basetexture3 de_cbble/stone_alt/brick_a_bottom_grime
    "$basetexture3"        "de_cbble/stone_alt/brick_a_bottom_grime"
$texture3_blendmode 0
    "$texture3_blendmode"  "0"
$texture3_uvscale "[2.0 2.0]"
    "$texture3_uvscale"    "[2.0 2.0]"
$texture3_lumstart 0.005
    "$texture3_lumstart"  "0.005"
$texture3_lumend 0.05
    "$texture3_lumend"    "0.05"
$texture3_blendstart 0.8
    "$texture3_blendstart" "0.8"
$texture3_blendend 1.0
    "$texture3_blendend"  "1.0"


$basetexture4 de_cbble/stone_alt/brick_a_top_grime
    "$basetexture4"        "de_cbble/stone_alt/brick_a_top_grime"
$texture4_blendmode 0
    "$texture4_blendmode"  "0"
$texture4_uvscale "[2.0 2.0]"
    "$texture4_uvscale"    "[2.0 2.0]"
$texture4_lumstart 0.0
    "$texture4_lumstart"  "0.0"
$texture4_lumend 0.2
    "$texture4_lumend"    "0.2"
$texture4_blendstart 0.90
    "$texture4_blendstart" "0.90"
$texture4_blendend 0.99
    "$texture4_blendend"  "0.99"


$detail "detail\noise_detail_01"
    "$detail"              "detail\noise_detail_01"
$detailscale "[ 20 20 ]"
    "$detailscale"        "[ 20 20 ]"
$detailblendfactor ".7"
    "$detailblendfactor".7"
$detailblendfactor2 ".4"
    "$detailblendfactor2".4"
$detailblendfactor3 ".2"
    "$detailblendfactor3".2"
$detailblendfactor4 ".2"
    "$detailblendfactor4".2"
  }
  }



Revision as of 15:24, 20 January 2014

Lightmapped_4WayBlend is the shader used to blend the vertices of a displacement surface between four different materials. It handles four at once by using mirrored sets of parameters with "2", "3", or "4" in their name.

The pattern of the blend is defined by Hammer's alpha painting tool. The blend can be tuned between being a linear gradient and a more realistic look using the luminance of each basetexture adjusted by parameters.

Note.pngNote:This shader only works on displacements.
Note.pngNote:This shader is only available in CS:GO.

Example

Lightmapped_4WayBlend
{
    "$basetexture"         "de_cbble/stone_alt/brick_a"
    "$bumpmap"             "de_cbble/stone_alt/brick_a_normal"
    "$basetexture2"        "de_cbble/stone_alt/brick_a_damaged"
    "$bumpmap2"            "de_cbble/stone_alt/brick_a_damaged_normals"
    "$texture2_uvscale"    "[1.0 1.0]"
    "$texture2_lumstart"   "0.0"
    "$texture2_lumend"     "0.8"
    "$texture2_blendstart" "0.8"
    "$texture2_blendend"   "0.9"
    "$basetexture3"        "de_cbble/stone_alt/brick_a_bottom_grime"
    "$texture3_blendmode"  "0"
    "$texture3_uvscale"    "[2.0 2.0]"
    "$texture3_lumstart"   "0.005"
    "$texture3_lumend"     "0.05"
    "$texture3_blendstart" "0.8"
    "$texture3_blendend"   "1.0"
    "$basetexture4"        "de_cbble/stone_alt/brick_a_top_grime"
    "$texture4_blendmode"  "0"
    "$texture4_uvscale"    "[2.0 2.0]"
    "$texture4_lumstart"   "0.0"
    "$texture4_lumend"     "0.2"
    "$texture4_blendstart" "0.90"
    "$texture4_blendend"   "0.99"
    "$detail"              "detail\noise_detail_01"
    "$detailscale"         "[ 20 20 ]"
    "$detailblendfactor"   ".7"
    "$detailblendfactor2"  ".4"
    "$detailblendfactor3"  ".2"
    "$detailblendfactor4"  ".2"
}

Supported effects

The effects supported by LightmappedGeneric plus:

See also