当前位置:网站首页>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;
}
边栏推荐
- 使用BENCHMARKSQL工具对kingbasees并发测试时kill掉主进程成功后存在子线程未及时关闭
- Deep dive kotlin synergy (19): flow overview
- [set theory] set concept and relationship (set represents | number set | set relationship | contains | equality | set relationship property)
- Design and implementation of kubelet garbage collection mechanism to protect nodes from being preempted by containers image GC high threshold
- Social phobia of contemporary young people (II)
- Introduction of pointer variables in function parameters
- What's wrong with SD card data damage? How to recover SD card data damage
- Mutex and rwmutex in golang
- Js/ts bottom implementation double click event
- Causal AI, a new paradigm for industrial upgrading of the next generation of credible AI?
猜你喜欢

300+ documents! This article explains the latest progress of multimodal learning based on transformer

【刷题篇】 找出第 K 小的数对距离

Competitive product analysis and writing
![[NLP]—sparse neural network最新工作简述](/img/65/35ae0137f4030bdb2b0ab9acd85e16.png)
[NLP]—sparse neural network最新工作简述

有监督预训练!文本生成又一探索!

Introduction of pointer variables in function parameters

Esp32 series (3): GPIO learning (take simple GPIO input and output, ADC, DAC as examples)

Five elements of user experience

拆一辆十万元的比亚迪“元”,快来看看里面的有哪些元器件。

The latest activation free version of Omni toolbox
随机推荐
eth入门之简介
金仓KFS数据双向同步场景部署
The time has come for the domestic PC system to complete the closed loop and replace the American software and hardware system
Competitive product analysis and writing
Export of zip file
[brush questions] connected with rainwater (one dimension)
[brush questions] most elements (super water king problem)
【刷题篇】多数元素(超级水王问题)
vim 的实用操作
Appium automated testing framework
JMeter starts from zero (III) -- simple use of regular expressions
Introduction of pointer variables in function parameters
Dive Into Deep Learning——2.1数据操作&&练习
『期末复习』16/32位微处理器(8086)基本寄存器
Social phobia of contemporary young people (II)
[fxcg] inflation differences will still lead to the differentiation of monetary policies in various countries
智能合约安全审计公司选型分析和审计报告资源下载---国内篇
eth入门之DAPP
因果AI,下一代可信AI的产业升级新范式?
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