当前位置:网站首页>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;
}
边栏推荐
猜你喜欢

【刷题篇】接雨水(一维)

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

Pdf editing tool movavi pdfchef 2022 direct download

The latest activation free version of Omni toolbox

JS实现图片懒加载
![[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN](/img/7e/50fa6f65b5a4f0bb60909f57daff56.png)
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN

Database management tool, querious direct download

使用BENCHMARKSQL工具对KingbaseES执行测试时报错funcs sh file not found

竞品分析撰写

Introduction of pointer variables in function parameters
随机推荐
Classes in TS
Which code editor is easy to use? Code editing software recommendation
[set theory] set concept and relationship (set family | set family examples | multiple sets)
用户体验五要素
拆一辆十万元的比亚迪“元”,快来看看里面的有哪些元器件。
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
sd卡数据损坏怎么回事,sd卡数据损坏怎么恢复
[set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
IPv6 foundation construction experiment
C language series - Section 3 - functions
【刷题篇】多数元素(超级水王问题)
MongoDB 慢查询语句优化分析策略
redis 持久化原理
[literature reading] sparse in deep learning: practicing and growth for effective information and training in NN
Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness
[nlp] - brief introduction to the latest work of spark neural network
使用BENCHMARKSQL工具对kingbasees并发测试时kill掉主进程成功后存在子线程未及时关闭
JS实现图片懒加载
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN
MPLS setup experiment