Difference between revisions of "SolidEnergy"

From Valve Developer Community
Jump to: navigation, search
(Type 2 Example)
(Type 2 Example)
Line 57: Line 57:
 
  {
 
  {
 
       $basetexture "effects/projected_wall"
 
       $basetexture "effects/projected_wall"
$detail1 "effects/projected_wall_draw"
+
      $detail1 "effects/projected_wall_draw"
$detail1scale 1
+
      $detail1scale 1
$DETAIL1BLENDMODE 1
+
      $DETAIL1BLENDMODE 1
$detail2 "effects/projected_wall_noise"
+
      $detail2 "effects/projected_wall_noise"
$detail2scale 1
+
      $detail2scale 1
$detail2blendmode 0
+
      $detail2blendmode 0
$surfaceprop glass
+
      $surfaceprop glass
"%keywords" Portal2
+
      "%keywords" Portal2
$translucent 1
+
      $translucent 1
$additive 1
+
      $additive 1
$vertexalpha 0
+
      $vertexalpha 0
$vertexcolor 0
+
      $vertexcolor 0
$nocull 1  
+
      $nocull 1  
$detailscroll1 "[0 0]"
+
      $detailscroll1 "[0 0]"
$detailscroll2 "[0 0]"
+
      $detailscroll2 "[0 0]"
$detail2componentscale "[1 1]"
+
      $detail2componentscale "[1 1]"
$basescroll "[0 0]"
+
      $basescroll "[0 0]"
$basescale "[1 1]"
+
      $basescale "[1 1]"
"!srgb?$outputintensity" .75
+
      "!srgb?$outputintensity" .75
Proxies
+
      Proxies
{
+
      {
Sine  
+
              Sine  
{
+
              {
sinemin 0
+
              sinemin 0
sinemax 0.94
+
              sinemax 0.94
sineperiod 5
+
              sineperiod 5
timeoffset 3
+
              timeoffset 3
resultVar "$detailscroll1[0]"
+
              resultVar "$detailscroll1[0]"
}
+
              }
LinearRamp  
+
              LinearRamp  
{
+
              {
rate -3
+
              rate -3
initialValue 0
+
              initialValue 0
resultVar "$detailscroll1[1]"
+
              resultVar "$detailscroll1[1]"
}
+
              }
LinearRamp  
+
              LinearRamp  
{
+
              {
rate 0.18
+
              rate 0.18
initialValue 0
+
              initialValue 0
resultVar "$detailscroll2[1]"
+
              resultVar "$detailscroll2[1]"
}
+
              }
Sine  
+
              Sine  
{
+
              {
sinemin 0.99
+
              sinemin 0.99
sinemax 1.01
+
              sinemax 1.01
sineperiod 0.125
+
              sineperiod 0.125
timeoffset 0
+
              timeoffset 0
resultVar "$detail2componentscale[0]"
+
              resultVar "$detail2componentscale[0]"
}
+
              }
Sine  
+
              Sine  
{
+
              {
sinemin 0.995
+
              sinemin 0.995
sinemax 1.005
+
              sinemax 1.005
sineperiod 0.1
+
              sineperiod 0.1
timeoffset 0.05
+
              timeoffset 0.05
resultVar "$basescale[0]"
+
              resultVar "$basescale[0]"
}
+
              }
LinearRamp  
+
              LinearRamp  
{
+
              {
rate 0.15
+
              rate 0.15
initialValue 0
+
              initialValue 0
resultVar "$basescroll[1]"
+
              resultVar "$basescroll[1]"
}
+
              }
TextureTransform
+
              TextureTransform
{
+
              {
translateVar $detailscroll1
+
              translateVar $detailscroll1
resultVar $detail1texturetransform
+
              resultVar $detail1texturetransform
}
+
              }
TextureTransform
+
              TextureTransform
{
+
              {
translateVar $detailscroll2
+
              translateVar $detailscroll2
scaleVar $detail2componentscale
+
              scaleVar $detail2componentscale
resultVar $detail2texturetransform
+
              resultVar $detail2texturetransform
}
+
              }
TextureTransform
+
              TextureTransform
{
+
              {
translateVar $basescroll
+
              translateVar $basescroll
scaleVar $basescale
+
              scaleVar $basescale
resultVar $basetexturetransform
+
              resultVar $basetexturetransform
}
+
              }
}
+
      }
}
+
}
  
  
  
 
[[Category:Shaders]]
 
[[Category:Shaders]]

Revision as of 04:35, 31 January 2020


SolidEnergy is a shader currently only found on Portal 2's fizzler and hard light bridge textures (in all games since [Portal 2]).

The shader is known to work in [Portal 2] Portal 2 and <Counter-Strike: Global Offensive> Counter-Strike: Global Offensive.

Supported effects

To do: What other effects does this shader support?


Type 1 Example

The example shown below is materials/effects/fizzler.vmt from Portal 2.

SolidEnergy
{
	$basetexture "effects/fizzler_ripples_dim"
	$flowmap "effects/fizzler_flow"
	$flowbounds "effects/fizzler_bounds"
	$FLOW_NOISE_TEXTURE "effects/fizzler_noise"
	$FLOW_UVSCROLLDISTANCE "0.25"
	$FLOW_TIMEINTERVALINSECONDS "1.2"
	$FLOW_NOISE_SCALE 0.003
	$FLOW_LERPEXP 1.5
	$FLOW_WORLDUVSCALE 0.008
	$FLOW_NORMALUVSCALE 0.008
	$FLOW_COLOR "[0.025 0.08 0.1]"
	$FLOW_VORTEX_COLOR "[0.64 2.058 2.56]"
	$surfaceprop glass
	"%keywords" Portal2
	$translucent 1
	$additive 1
	$FLOW_VORTEX_SIZE 35

	"360?$outputintensity" 2.8
	"SonyPS3?$outputintensity" .7
	"srgb_pc?$outputintensity" 2.3
	"!srgb_pc?$outputintensity" 1.7

	Proxies
	{
		FizzlerVortex
		{
		}
	}
}

Type 2 Example

The example shown below is materials/effects/projected_wall.vmt from Portal 2.

SolidEnergy
{
      $basetexture "effects/projected_wall"
      $detail1 "effects/projected_wall_draw"
      $detail1scale 1
      $DETAIL1BLENDMODE 1
      $detail2 "effects/projected_wall_noise"
      $detail2scale 1
      $detail2blendmode 0
      $surfaceprop glass
      "%keywords" Portal2
      $translucent 1
      $additive 1
      $vertexalpha 0
      $vertexcolor 0
      $nocull 1 
      $detailscroll1 "[0 0]"
      $detailscroll2 "[0 0]"
      $detail2componentscale "[1 1]"
      $basescroll "[0 0]"
      $basescale "[1 1]"
      "!srgb?$outputintensity" .75
      Proxies
      {
             Sine 
             {
             sinemin 0
             sinemax 0.94
             sineperiod 5
             timeoffset 3
             resultVar "$detailscroll1[0]"
             }
             LinearRamp 
             {
             rate -3
             initialValue 0
             resultVar "$detailscroll1[1]"
             }
             LinearRamp 
             {
             rate 0.18
             initialValue 0
             resultVar "$detailscroll2[1]"
             }
             Sine 
             {
             sinemin 0.99
             sinemax 1.01
             sineperiod 0.125
             timeoffset 0
             resultVar "$detail2componentscale[0]"
             }
             Sine 
             {
             sinemin 0.995
             sinemax 1.005
             sineperiod 0.1
             timeoffset 0.05
             resultVar "$basescale[0]"
             }
             LinearRamp 
             {
             rate 0.15
             initialValue 0
             resultVar "$basescroll[1]"
             }
             TextureTransform
             {
             translateVar $detailscroll1
             resultVar $detail1texturetransform
             }
             TextureTransform
             {
             translateVar $detailscroll2
             scaleVar $detail2componentscale
             resultVar $detail2texturetransform
             }
             TextureTransform
             {
             translateVar $basescroll
             scaleVar $basescale
             resultVar $basetexturetransform
             }
      }
}