当前位置:网站首页>X-ray normal based contour rendering
X-ray normal based contour rendering
2022-07-03 04:19:00 【uniGame】
result

principle :
Calculate the rendered color based on the normal of the object surface . Compare the direction of the normal of the object surface with the direction of the line of sight
The closer the normal direction is to the camera direction , Explain the position closer to the center of the object ,
conversely , Indicate the position at the edge
Key code :
v2f vert (appdata_full v)
{
v2f o;
o.pos = mul(UNITY_MATRIX_MVP,v.vertex);
o.viewDir = normalize(TransformWorldToObject(GetCameraPositionWS()));
o.normal = v.normal;
return o;
}
float4 frag (v2f i) : COLOR
{
float rim = 1 - saturate(dot(i.viewDir,i.normal ));
float4 color = _RimColor*pow(rim,_RimPower);
return color;
}
边栏推荐
- eth入门之简介
- [nlp] - brief introduction to the latest work of spark neural network
- 2022-02-12 (338. Bit count)
- xrandr修改分辨率与刷新率
- 因果AI,下一代可信AI的产业升级新范式?
- 服务器无法远程连接原因分析
- 金仓数据库KingbaseES 插件kdb_exists_expand
- 【毕业季·进击的技术er】职场人的自白
- Esp32 series (3): GPIO learning (take simple GPIO input and output, ADC, DAC as examples)
- 【刷题篇】多数元素(超级水王问题)
猜你喜欢

Redis persistence principle

使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错

Fcpx template: sweet memory electronic photo album photo display animation beautiful memory

深潜Kotlin协程(十九):Flow 概述

vulnhub HA: Natraj

【刷题篇】多数元素(超级水王问题)

When writing a web project, SmartUpload is used for file upload and new string () is used for transcoding, but in the database, there will still be random codes similar to poker
![[brush questions] find the number pair distance with the smallest K](/img/e1/4118e2b37b5cea0454d65b877b507f.png)
[brush questions] find the number pair distance with the smallest K

因果AI,下一代可信AI的产业升级新范式?

国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
随机推荐
What are the Bluetooth headsets with good sound quality in 2022? Inventory of four high-quality Bluetooth headsets
[set theory] set concept and relationship (set represents | number set | set relationship | contains | equality | set relationship property)
vulnhub HA: Natraj
有监督预训练!文本生成又一探索!
sd卡数据损坏怎么回事,sd卡数据损坏怎么恢复
220214c language learning diary
Causal AI, a new paradigm for industrial upgrading of the next generation of credible AI?
The latest activation free version of Omni toolbox
[NLP]—sparse neural network最新工作简述
树莓派如何连接WiFi
Solve BP Chinese garbled code
【刷题篇】 找出第 K 小的数对距离
Five elements of user experience
Which Bluetooth headset is good about 400? Four Bluetooth headsets with strong noise reduction are recommended
Mutex and rwmutex in golang
2022 beautician (intermediate) new version test questions and beautician (intermediate) certificate examination
Which code editor is easy to use? Code editing software recommendation
MySQL field userid comma separated save by userid query
Introduction to eth
x Problem B