当前位置:网站首页>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;
}
边栏推荐
- Which Bluetooth headset is cost-effective? Four Bluetooth headsets with high cost performance are recommended
- 跨境电商多商户系统怎么选
- CVPR 2022 | Dalian Technology propose un cadre d'éclairage auto - étalonné pour l'amélioration de l'image de faible luminosité de la scène réelle
- Interaction free shell programming
- 540. Single element in ordered array
- Nat. Comm. | 使用Tensor-cell2cell对细胞通讯进行环境感知去卷积
- 深潜Kotlin协程(二十):构建 Flow
- 【刷题篇】接雨水(一维)
- 怎么用Kotlin去提高生产力:Kotlin Tips
- China Mobile Internet of things oneos and onenet were selected in the list of 2021 Internet of things demonstration projects
猜你喜欢

redis 持久化原理

Deep dive kotlin synergy (19): flow overview

Supervised pre training! Another exploration of text generation!

GFS分布式文件系统(光是遇见已经很美好了)

JMeter starts from zero (III) -- simple use of regular expressions

Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg

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

vulnhub HA: Natraj

Preliminary cognition of C language pointer

Competitive product analysis and writing
随机推荐
[NLP]—sparse neural network最新工作简述
[mathematical logic] predicate logic (toe normal form | toe normal form conversion method | basic equivalence of predicate logic | name changing rules | predicate logic reasoning law)
PostgreSQL database high availability Patroni source code learning - etcd class
xrandr修改分辨率與刷新率
Design and implementation of kubelet garbage collection mechanism to protect nodes from being preempted by containers image GC high threshold
2022-07-02: what is the output of the following go language code? A: Compilation error; B:Panic; C:NaN。 package main import “fmt“ func main() { var a =
金仓数据库KingbaseES 插件kdb_database_link
Taking two column waterfall flow as an example, how should we build an array of each column
Arduino application development - LCD display GIF dynamic diagram
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
Deep dive kotlin synergy (19): flow overview
Practical operation of vim
Sklearn data preprocessing
Square root of X
[pat (basic level) practice] - [simple simulation] 1063 calculate the spectral radius
因子选股-打分模型
[mathematical logic] predicate logic (predicate logic basic equivalent | eliminate quantifier equivalent | quantifier negative equivalent | quantifier scope contraction expansion equivalent | quantifi
How do you use lodash linking function- How do you chain functions using lodash?
mysql字段userid逗号分开保存按userid查询
智能合约安全审计公司选型分析和审计报告资源下载---国内篇