Hi guys!
I’ve been trying to learn how to write my own shaders. It’s been a great learning experience for me.
I’m posting this here in particular because I’d love to hear any feedback you guys might have on the existing features, how I’ve implemented things, or any of my planned features. Any feedback would be great!
much respect to RobG, his eye shader was a big inspiration for me to tackle this one!
Features:
[ul]
[li]Diffuse maps: Separated Cornea and Iris Diffuse and Normal maps with seperate texture coordinates[/li][li]Normal maps: Separate Cornea and Iris Specular controls[/li][li]Parallax Offset Mapping (POM): used to simulate Iris Indentation and Cornea Refraction. Hard to ‘see’ in still image.[/li][li]Pupil Dilation: Similar in concept to Valve’s pupil dilation, this is done entirely through UV math![/li][li]Cubemap Reflections: Cubemap-based reflections with Strength, Contrast and Fresnel Falloff controls[/li][li]Image-based Ambient: Cubemap-based Ambient lighting[/li][li]Hemispherical Ambient: Hemispherical ambient lighting in UV-space.[/li][li]Shadow Map: Shadow map used to simulate eyelid-shadowing.[/li][li]3-Light support![/li][/ul]
Possible Future Features:
[ul]
[li]“bounced” specular for iris interior[/li][li]Specular “Shape” mask? What if we can mask specular to a shape, to fake a light source?[/li][li]“negative” fresnel strength support (for flipped fresnel calculation) per Pior’s suggestions[/li][li]“hemisphere shadowing”, as an alternative to shadow-mapping. might be more flexible and overall better.[/li][li]Investigate adding fake chromatic abberation to pupil specular, maybe with a texture?[/li][li]optional second cubemap for ambient[/li][li]Tint masking: 3 color mask texture (Iris outer, iris inner, pupil)?[/li][li]1D tint masking?: what if we just map a black&white iris to a 1D ramp? more color range and control? harder to author?[/li][/ul]