EyeRefract: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Revamped with MatParam changes)
m (Added information to $corneatexture)
Line 8: Line 8:
{{MatParam|$iris|texture|The texture for the iris. The alpha channel controls the noisiness of the cornea.}}
{{MatParam|$iris|texture|The texture for the iris. The alpha channel controls the noisiness of the cornea.}}
{{MatParam|$irisframe|int|The frame to start an animated <code>$iris</code> on.}}
{{MatParam|$irisframe|int|The frame to start an animated <code>$iris</code> on.}}
{{MatParam|$corneatexture|texture|A texture to specify the shape of the cornea, similar to a normal map. Influences lighting and dilation. The red and green channels are used for the normal mapping, the blue channel is a mask for parallax mapping (straight multiply), and the alpha channel seems to be a multiplier for lighting. {{todo|Requires more testing. Source code: eye_refract_ps2x.fxc - search for "fIrisHighlightMask"}}.}}
{{MatParam|$corneatexture|texture|A texture to specify the shape of the cornea, similar to a normal map. Influences lighting and dilation. The red and green channels are used for the normal mapping, the blue channel is a mask for parallax mapping (straight multiply), and the alpha channel seems to be a multiplier for lighting. Because the $iris is warped in various ways the normals will not match 1-to-1 with the base texture. {{todo|Requires more testing. Source code: eye_refract_ps2x.fxc - search for "fIrisHighlightMask"}}.}}
{{MatParam|$corneabumpstrength|float|Strength of the <code>$corneatexture.</code>}}
{{MatParam|$corneabumpstrength|float|Strength of the <code>$corneatexture.</code>}}
{{MatParam|$parallaxstrength|float|How much the viewing angle should influence the positioning of the eye. Stronger values cause the iris to be smaller, but also move slower, making it seem "inset further". Default <code>0.25</code>.}}
{{MatParam|$parallaxstrength|float|How much the viewing angle should influence the positioning of the eye. Stronger values cause the iris to be smaller, but also move slower, making it seem "inset further". Default <code>0.25</code>.}}

Revision as of 03:51, 1 May 2020

Eyerefract.jpg
This article is about the shader. For the preceding shader, see Eyes.  For the QC property of $model, see Eyeball./ For the tool, see qc_eyes.

Shader-ball.png EyeRefract It is used to create realistic eyes, which are affected by map lighting and dynamic lighting, such as those from flashlights. This shader is a successor to the Eyes shader from Half-Life 2 Half-Life 2 .

Icon-Bug.pngBug:Although this shader has support for $emissiveblend, it is not fully implemented and does not work properly.  [todo tested in ?]

Shader Parameters

$iris $irisframe $corneatexture $corneabumpstrength $parallaxstrength $dilation [[$lightwarptexture|$lightwarptexture]] [[$envmap|$envmap]] $glossiness $ambientoccltexture $ambientocclcolor [[$ambientocclusion|$ambientocclusion]] [[$halflambert|$halflambert]] $raytracesphere $spheretexkillcombo $eyeballradius

Other Parameters

$eyeorigin $irisu $irisv $intro $warpparam $entityorigin

Todo: Include cloak parameters in here?
Todo: Can this shader be used outside of a model with qc eyes, by using proxies (or in SFM override materials) to modify these shader values?