Quantcast
Channel: Questions in topic: "hlsl"
Viewing all articles
Browse latest Browse all 206

Simple Unlit HLSL Shader with Rim Lighting?

$
0
0
Hi! I'm looking for a way to create Rim Lighting effect on a simple Unlit shader. Everywhere I looked people are using the surface shaders and I'm not familiar with them yet. Here is my current shader. Is simple Unlit that uses vertex colors. struct appdata { float4 vertex : POSITION; fixed4 color : COLOR; }; struct v2f { float4 pos : SV_POSITION; fixed4 color : TEXCOORD2; }; v2f vert (appdata v) { v2f o; o.pos = UnityObjectToClipPos(v.vertex); o.color = v.color; UNITY_TRANSFER_FOG(o, o.pos); return o; } half4 frag (v2f i) : COLOR { return i.color; } I would like to have this effect: ![alt text][1] Where could I find an example for this using standard HLSL shaders instead of the Surf ones. Thank you! [1]: http://kylehalladay.com/images/post_images/2014-02-23/FresnelRim.png

Viewing all articles
Browse latest Browse all 206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>