当前位置:网站首页>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;
}
边栏推荐
- 540. Single element in ordered array
- China Mobile Internet of things oneos and onenet were selected in the list of 2021 Internet of things demonstration projects
- What are the Bluetooth headsets with good sound quality in 2022? Inventory of four high-quality Bluetooth headsets
- Esp32 series (3): GPIO learning (take simple GPIO input and output, ADC, DAC as examples)
- Interaction free shell programming
- 【刷题篇】多数元素(超级水王问题)
- IPv6 foundation construction experiment
- [set theory] Cartesian product (concept of Cartesian product | examples of Cartesian product | properties of Cartesian product | non commutativity | non associativity | distribution law | ordered pair
- 以两列的瀑布流为例,我们应该怎么构建每一列的数组
- [software testing-6] & Test Management
猜你喜欢

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

JS realizes the animation effect of text and pictures in the visual area
![[NLP]—sparse neural network最新工作简述](/img/65/35ae0137f4030bdb2b0ab9acd85e16.png)
[NLP]—sparse neural network最新工作简述

使用BENCHMARKSQL工具对kingbasees并发测试时kill掉主进程成功后存在子线程未及时关闭

Deep dive kotlin synergy (19): flow overview

JS realizes lazy loading of pictures

The latest activation free version of Omni toolbox

Redis persistence principle

Bisher - based on SSM pet adoption center

Preliminary cognition of C language pointer
随机推荐
Five elements of user experience
[literature reading] sparse in deep learning: practicing and growth for effective information and training in NN
C language series - Section 3 - functions
服务器无法远程连接原因分析
Kubernetes源码分析(一)
怎么用Kotlin去提高生产力:Kotlin Tips
Xrandr modifier la résolution et le taux de rafraîchissement
220214c language learning diary
Appium automated testing framework
How to connect WiFi with raspberry pie
xrandr修改分辨率与刷新率
[set theory] Cartesian product (concept of Cartesian product | examples of Cartesian product | properties of Cartesian product | non commutativity | non associativity | distribution law | ordered pair
Deep dive kotlin synergy (20): build flow
[fairseq] error: typeerror:_ broadcast_ coalesced(): incompatible function arguments
Leecode swipe questions and record LCP 18 breakfast combination
[Chongqing Guangdong education] reference materials for design and a better life of Zhongyuan Institute of science and technology
[software testing-6] & Test Management
使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错
What's wrong with SD card data damage? How to recover SD card data damage
[set theory] set concept and relationship (true subset | empty set | complete set | power set | number of set elements | power set steps)