EyeRefract: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(fixed up info removed crap not important)
Line 6: Line 6:
----
----
'''Description'''  
'''Description'''  
EyeRefract is the latest eye shader by Valve.
EyeRefract is the latest eye shader by Valve, used in the popular tf2(Team fortress 2) and l4d (Left for Dead) Valve titles 
There are many other parameters however I have yet to figure out their functions.
There are many other parameters and features yet to be discovered which are found with each new build of Source.


{{todo|Add pictures and more info}}
{{todo|Add pictures and more info}}
Line 17: Line 17:
"EyeRefract"
"EyeRefract"
{
{
"$Iris"              "models/cra0kalo/ct_swat/eye-iris-brown"   // Iris color in RGB with cornea noise in A
"$Iris"              "models/cra0kalo/ct_swat/eye-iris-brown"     // Iris color in RGB with cornea noise in A
"$Irisframe" "0" // Frame for the iris texture, 0 being the default frame
"$Irisframe" "0"   // Frame for the iris texture, 0 being the default frame
"$AmbientOcclTexture" "models/cra0kalo/ct_swat/eye_ao"   // Ambient occlusion in RGB, A unused // default texture eyeball_l_ambient  
"$AmbientOcclTexture" "models/cra0kalo/ct_swat/eye_ao"     // Ambient occlusion in RGB, A unused // default texture eyeball_l_ambient  
//"$Envmap"            "models/cra0kalo/ct_swat/cubemap"    // Reflection environment map static
//"$Envmap"            "models/cra0kalo/ct_swat/cubemap"    // Reflection environment map static
"$Envmap"            "models/cra0kalo/ct_swat/eye-reflection-cubemap-"    // Reflection environment map
"$Envmap"            "models/cra0kalo/ct_swat/eye-reflection-cubemap-"    // Reflection environment map
"$CorneaTexture"      "models/cra0kalo/ct_swat/eye-cornea"                // Special texture that has 2D cornea normal in RG and other data in BA
"$CorneaTexture"      "models/cra0kalo/ct_swat/eye-cornea"                // Special texture that has 2D cornea normal in RG and other data in BA
"$lightwarptexture" "models/cra0kalo/ct_swat/eye_lightwarp" // 1D ramp texture for tinting scalar diffuse term
"$lightwarptexture" "models/cra0kalo/ct_swat/eye_lightwarp" // 1D ramp texture for tinting scalar diffuse term


"$EyeballRadius" "0.5" // Default 0.5
"$EyeballRadius" "0.5"   // Default 0.5
"$AmbientOcclColor" "[0.36 0.25 0.2]" // Default 0.33, 0.33, 0.33
"$AmbientOcclColor" "[0.36 0.25 0.2]" // Default 0.33, 0.33, 0.33
"$Dilation" "0.4" // Default 0.5
"$Dilation" "0.4"     // Default 0.5
"$Glossiness" "1" // Glossiness of eye (1 is default, 0 is not glossy at all)
"$Glossiness" "1"     // Glossiness of eye (1 is default, 0 is not glossy at all)
"$ParallaxStrength" "0.25"          // Default 0.25
"$ParallaxStrength" "0.25"          // Default 0.25
"$CorneaBumpStrength" "1.25" // Default 1.0
"$CorneaBumpStrength" "1.25"   // Default 1.0


"$halflambert" "1"
"$halflambert" "1"
"$nodecal" "1"
"$nodecal" "1"


// These effects are only available in ps.2.0b and later
// These effects are only available in ps.2.0b and later
"$RaytraceSphere" "0" // Default 1 - Enables raytracing in the pixel shader to make the eyeball look round
"$RaytraceSphere" "0"   // Default 1 - Enables raytracing in the pixel shader to make the eyeball look round
"$SphereTexkillCombo" "0" // Default 1 - Enables killing pixels that don't ray-intersect the sphere
"$SphereTexkillCombo" "0"   // Default 1 - Enables killing pixels that don't ray-intersect the sphere




//Unknown Parameters
//Unknown Parameters


"$eyeorigin" "[0 0 0]" // Origin for the eyes
"$eyeorigin" "[0 0 0]" // Origin for the eyes
"$irisu" "[0 1 0 0]"
"$irisu" "[0 1 0 0]"
"$irisv" "[0 0 1 0]"
"$irisv" "[0 0 1 0]"
"$Entityorigin" "4.0"
"$Entityorigin" "4.0"




}
}
// Eyerefract SDK_EyeRefract 2007 shader used in the popular Tf2 and l4d games
// Eyerefract SDK_EyeRefract 2007 shader used in the popular Tf2 and l4d games
// Advance params by Cra0kalo
// Check Discussion tab for more params
</pre>
</pre>

Revision as of 20:28, 19 July 2012

Stub

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

EyeRefract


Description EyeRefract is the latest eye shader by Valve, used in the popular tf2(Team fortress 2) and l4d (Left for Dead) Valve titles There are many other parameters and features yet to be discovered which are found with each new build of Source.

Todo: Add pictures and more info

https://dl.dropbox.com/u/10798900/Pictures/tut/eyerefract.jpg


Example Code

"EyeRefract"
{
 "$Iris"               "models/cra0kalo/ct_swat/eye-iris-brown"     // Iris color in RGB with cornea noise in A
 "$Irisframe" "0"    // Frame for the iris texture, 0 being the default frame
 "$AmbientOcclTexture" "models/cra0kalo/ct_swat/eye_ao"      // Ambient occlusion in RGB, A unused // default texture eyeball_l_ambient 
 //"$Envmap"             "models/cra0kalo/ct_swat/cubemap"    // Reflection environment map static
 "$Envmap"             "models/cra0kalo/ct_swat/eye-reflection-cubemap-"    // Reflection environment map
 "$CorneaTexture"      "models/cra0kalo/ct_swat/eye-cornea"                 // Special texture that has 2D cornea normal in RG and other data in BA
 "$lightwarptexture" "models/cra0kalo/ct_swat/eye_lightwarp"  // 1D ramp texture for tinting scalar diffuse term
 

 "$EyeballRadius" "0.5"    // Default 0.5
 "$AmbientOcclColor" "[0.36 0.25 0.2]" // Default 0.33, 0.33, 0.33
 "$Dilation" "0.4"     // Default 0.5
 "$Glossiness" "1"     // Glossiness of eye (1 is default, 0 is not glossy at all)
 "$ParallaxStrength" "0.25"          // Default 0.25
 "$CorneaBumpStrength" "1.25"   // Default 1.0

 "$halflambert" "1"
 "$nodecal" "1"

 // These effects are only available in ps.2.0b and later
 "$RaytraceSphere" "0"    // Default 1 - Enables raytracing in the pixel shader to make the eyeball look round
 "$SphereTexkillCombo" "0"   // Default 1 - Enables killing pixels that don't ray-intersect the sphere


 //Unknown Parameters
 

 "$eyeorigin" "[0 0 0]" // Origin for the eyes
 "$irisu" "[0 1 0 0]"
 "$irisv" "[0 0 1 0]"
 "$Entityorigin" "4.0"


}
// Eyerefract SDK_EyeRefract 2007 shader used in the popular Tf2 and l4d games
// Check Discussion tab for more params