五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

TextureBased SDF Slice

2022-08-03 12:21 作者:DeadCyber  | 我要投稿

Background

I want to have 3D font in my game.

????However,it seems my Quadratic Bezier SDF Algorithm is too heavy when I place the 'B' into the scene.You can see from up above,it makes FPS from 50 down to 20.?

????It's very frustrating.Because when I created the font in an empty scene initially,the FPS seems OK to me:

?

quadBezier spline 'B' in an empty scene,500FPS
'B' is created by 1 box and 2 splines

I look back on the empty scene without 'B',wow it's 1000FPS:

1000FPS:SDF Trace simple geometry is very fast

It seems like absolute FPS doesn't mean a thing,the relative proportion does.Our 'B' drop 50%!

Since a spline based 'B' is so heavy,I want to use texture based SDF.

Let's try it!

Generate SDF texture

????The important thing is that you save the value by pixel distance,and do not normalize it,otherwise there'll be a problem.I havn't fully found the reason, but this procedure solve the issue: don't normalize it in SDF Texture

sphereSDF.exr,save SDF in R channel

Calculate SDF Slice in Shader

With a bound condition,we get a single slice.Same view, up to 1000FPS,almost cost free:

FPS just like an empty scene

Get closer,the precision is acceptable.Afterall,it's texture based,can't compare with a 'perfect' spline based one:

TextureBased.Precision is acceptable.
SplineBased.Perfect but too expensive.

Thanks to SDF Trace and TextureBased SDF Slice,allows infinite instances at a relative cheap cost:


TextureBased SDF Slice的評論 (共 條)

分享到微博請遵守國家法律
塔河县| 寿宁县| 武乡县| 资源县| 南溪县| 庆元县| 全南县| 安宁市| 儋州市| 赣榆县| 满城县| 五家渠市| 长阳| 富平县| 四川省| 应城市| 镇江市| 怀安县| 科尔| 隆安县| 东平县| 饶河县| 大城县| 长治市| 梁山县| 襄城县| 垣曲县| 申扎县| 靖安县| 大港区| 永川市| 张家界市| 新巴尔虎左旗| 墨脱县| 鄄城县| 哈巴河县| 乌拉特后旗| 资兴市| 佛教| 泗水县| 垦利县|