基础知识
文章平均质量分 55
xak
Sometimes when I look at the world, i can see a line behind it.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
The Mali GPU: An Abstract Machine
Mali GPU: An Abstract Machine - Frame Pipelining - Graphics, Gaming, and VR blog - Arm Community blogs - Arm CommunityWe will explore the fundamental macro-scale architectural structures and behaviors developers have to worry about, how this translates int转载 2022-03-28 14:38:41 · 543 阅读 · 0 评论 -
Shader Conditional Statements Performance Detail
What is it about shaders that even potentially makesifstatements performance problems? It has to do with how shaders get executed and where GPUs get their massive computing performance from.Separate shader invocations are usually executed in parallel, ..转载 2022-01-19 11:13:45 · 495 阅读 · 0 评论 -
About PositionNDC In URP
VertexPositionInputs GetVertexPositionInputs(float3 positionOS){ VertexPositionInputs input; input.positionWS = TransformObjectToWorld(positionOS); input.positionVS = TransformWorldToView(input.positionWS); input.positionCS = TransformWorl...原创 2021-09-14 14:41:23 · 1218 阅读 · 0 评论 -
How Much Does A Tex2D/TexCUBE Cost
On mobile, texture sample probably takes as much as "several to several dozen simple math operations".On PC, the ratio is higher, for one texture sample you can afford dozens to hundreds of math operations.And then there's funky hardware like PowerVR (e.转载 2021-06-16 12:51:32 · 521 阅读 · 0 评论 -
一分钟看完漫画搞懂卷积
作者:DBinary链接:https://www.zhihu.com/question/22298352/answer/797335876来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。一分钟看完漫画搞懂卷积...转载 2021-06-01 16:29:46 · 1038 阅读 · 0 评论 -
Understanding Memory on iOS
Understanding Memory on iOS- What kind of memory?• Physical/Resident Memory• Graphics Memory• Virtual Memory• Malloc Heap• Dirty Memory• Native Memory• Mono HeapPhysical Memory (RAM)• The total amount of memory on-chip• ...转载 2020-08-06 16:18:40 · 928 阅读 · 0 评论 -
Photoshop中PNG转TGA的方法
Photoshop中PNG转TGA的方法(也可以用来查看单独的RGB通道(不透明显示))1、Layer->Layer Mask->From Transparency2、Shift-click禁用Mask可以在Photoshop中预览不透明的图像效果(类似TGA的预览效果,也可以切换到通道面板预览对应的通道)3、. 复制Layer Mask通道作为Alpha通道,然后另存为T...原创 2019-11-18 10:58:18 · 8035 阅读 · 0 评论 -
3D Graphics with OpenGL-Basic Theory
1.Computer Graphics HardwareGPU (Graphics Processing Unit)Modern day computer has dedicated Graphics Processing Unit (GPU) to produce images for the display, with its own graphics memory (转载 2014-09-12 18:30:25 · 3739 阅读 · 0 评论 -
Unity destructor Or OnDestory
In 99% of all cases you don't want to use a destructor (finalizer) at all:http://stackoverflow.com/questions/3649066/use-of-destructor-in-chttp://blog.stephencleary.com/2009/08/how-to-implement-转载 2015-05-04 12:10:11 · 1316 阅读 · 0 评论 -
Shader Depth Offset [Polygon Offset]
Offset Factor, UnitsfactorSpecifies a scale factor that is used to create a variable depth offset for each polygon. The initial value is 0.unitsIs multiplied by an implementation-specifi原创 2016-07-11 15:19:58 · 4783 阅读 · 1 评论 -
Half精度解析
故事开始于Unity Doc中关于Half的进度的解释Medium precision: halfMedium precision floating point value; generally 16 bits (range of –60000 to +60000, with about 3 decimal digits of precision).Half precision i原创 2016-06-30 21:43:31 · 10933 阅读 · 1 评论 -
Default Access Modifiers (C#)
Short answer: minimum possible access Long answer:Non-nested types, enumeration and delegate accessibilities (may only have internal or public accessibility) | Defaul转载 2016-02-16 09:48:13 · 1200 阅读 · 0 评论 -
内存耗用:VSS/RSS/PSS/USS
内存耗用:VSS/RSS/PSS/USSTerms VSS - Virtual Set Size虚拟耗用内存(包含共享库占用的内存)RSS - Resident Set Size实际使用物理内存(包含共享库占用的内存)PSS - Proportional Set Size实际使用的物理内存(比例分配共享库占用的内存)USS - Unique Set Size进程独转载 2014-08-22 11:55:24 · 1501 阅读 · 0 评论 -
GTA V - Graphics Study
Part 1: Dissecting a Framehttp://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study/Part 2: LOD and Reflectionshttp://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-stu转载 2016-01-05 12:25:28 · 1401 阅读 · 0 评论 -
Edge Padding
http://wiki.polycount.com/wiki/Edge_padding转载 2015-11-02 16:52:13 · 2885 阅读 · 0 评论 -
C#委托的介绍(delegate、Action、Func、predicate)
委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递。事件是一种特殊的委托。 1.委托的声明 (1). delegate delegate我们常用到的一种声明 Delegate至少0个参数,至多32个参数,可以无返回值,也可以指定返回值类型。 例:public delegate int MethodtD转载 2014-09-26 11:07:29 · 8930 阅读 · 0 评论 -
Rectangle Bin Packing
1、From:http://www.blackpawn.com/texts/lightmaps/default.htmlPop Quiz: You have 765,618 lightmaps for a scene and very few of them have power of 2 dimensions, what do you do? If your answer was t转载 2015-08-24 11:59:24 · 3969 阅读 · 1 评论 -
如何计算两个有序整型数组的交集
例如两个含有n个元素的有序(非降序)整型数组a和b(数组a与b中都没有重复元素),求出其共同元素,a = 0, 1, 2, 3, 4b = 1, 3, 5, 7, 9那么它们的交集为{1, 3}。计算数组交集可以采用很多种方法,但数组的相对大小一般会影响算法的效率,所以需要根据两个数组的相对大小来确定采用的方法:(1)对于两个数组长度相当的情况,一般可以采取转载 2015-03-24 15:41:15 · 1207 阅读 · 0 评论 -
GPU截帧工具备忘
因为系统重装,需要用到GPU截帧工具来分析游戏的时候,瞎折腾了好久。一直以为自己原来用的是Nvidia的工具(因为电脑是Nviadia显卡),下载了多个版本的PerfHUD,不是本身报错,就是游戏启动报错。然后尝试SNight,也是进入到游戏之后,刚显示出HUD的时候,就报错了(尝试其他游戏是正常的)。分明记得原来自己分析过这款游戏的。后面实在没辙了,就想,换个工具吧。然后下载了GPA,一打开,看原创 2016-10-23 14:50:09 · 3575 阅读 · 0 评论 -
Null check not work for GameObject sometimes
Example Code: void Test(object obj) { if (obj == null) { //Something to do } }When the obj is an instance of G原创 2017-02-10 15:07:18 · 1301 阅读 · 0 评论 -
Lighting Models and BRDF Maps
A Bi-directional Reflectance Distribution Function (BRDF) is a mathematical function that describes how light is reflected when it hits a surface. This largely corresponds to a lighting model in U转载 2017-03-19 22:46:14 · 1198 阅读 · 0 评论 -
渲染状态改变消耗详情
参考:https://computergraphics.stackexchange.com/questions/37/what-is-the-cost-of-changing-statehttp://media.steampowered.com/apps/steamdevdays/slides/beyondporting.pdf原创 2017-08-29 10:53:44 · 1413 阅读 · 0 评论 -
C#字符串连接消耗
1、Concatenation is the process of appending one string to the end of another string. When you concatenate string literals or string constants by using the + operator, the compiler creates a single原创 2017-10-13 21:04:33 · 751 阅读 · 0 评论 -
Crunch compression of ETC textures
Introduction to Crunch: Compressing DXT textures.Crunch is an open source texture compression library © Richard Geldreich, Jr. and Binomial LLC, available on GitHub. The library was originally d转载 2018-01-05 11:33:28 · 2405 阅读 · 0 评论 -
Linear Vs Gamma For Textures Of Unity Standard Material
Albedo should be sRGB, not linear. It should be noted that for the most part it's not how they're saved but how they're created eventually read. The image formats themselves don't usually have a conce...转载 2018-07-06 12:08:40 · 605 阅读 · 0 评论 -
Depth Peeling
http://developer.download.nvidia.com/assets/gamedev/docs/OrderIndependentTransparency.pdf转载 2018-10-10 17:16:03 · 2185 阅读 · 0 评论 -
PBR TEXTURE CONVERSION
https://marmoset.co/posts/pbr-texture-conversion/#spectometal转载 2019-07-18 18:08:33 · 407 阅读 · 0 评论 -
PBR贴图校验
注:Substance中在进行校验的时候,非金属的Albedo值校验的时候,灰度值计算使用的是:Gray = (Red * 0.299 + Green * 0.587 + Blue * 0.114)金属的Specular值校验的时候,灰度值计算使用的是:Gray = (Red + Green + Blue) / 3...原创 2019-07-26 16:10:25 · 1189 阅读 · 0 评论 -
PNG Messy Alpha Problem - White Around Edges
The reason for this is due to how the texture image was authored, combined with the filtering that most 3d engines use when textures are displayed at different sizes on screen.Your image may have co...转载 2019-09-19 11:17:57 · 513 阅读 · 0 评论 -
Texture Wrapping Mode
在进行纹理帖图时,图象会出现在物体表面的(u,v)位置上,而这些值在[0.0,1.0]范围内。但是,如果超出这个值域,会发生什么情况呢?这由纹理的映射函数来决定。在OpenGL中,这类映射函数称为“Texture WrappingMode”;在D3D中,称为“Texture Addressing Mode”。常见的有下面几种: 1.重复(GL_REPEAT):图象在表面上重复出现。在算转载 2014-08-22 11:34:14 · 681 阅读 · 0 评论 -
C#中的委托和事件
文中代码在VS2005下通过,由于VS2003(.Net Framework1.1)不支持隐式的委托变量,所以如果在一个接受委托类型的位置直接赋予方法名,在VS2003下会报错,解决办法是显式的创建一个委托类型的实例(委托变量)。例如:委托类型委托实例 = new 委托类型(方法名); 欢迎浏览本文的后续文章: C#中的委托和事件(续) 引言委托 和 事件在 .Net转载 2014-08-22 11:53:49 · 538 阅读 · 0 评论 -
Alpha混合浅谈
Alpha混合浅谈 alpha混合技术对熟悉游戏的人来说不会陌生,这种技术在如今的游戏特效里已经被用烂了。3D的游戏就不说了,2D的游戏里,这种技术也是满眼皆是。 alpha混合听上去很神秘,实际非常简单,其作用就是要实现一种半透明效果。假设一种不透明东西的颜色是A,另一种透明的东西的颜色是B,那么透过B去看A,看上去的颜色C就是B和A的混合颜色,可以用这个式子来近似,设B物体的透明转载 2014-08-22 11:33:22 · 920 阅读 · 0 评论 -
几种常用的像素混合方法
前两天为大家介绍了处理透明光影效果的 Alpha-Blending技术,今次我将再为大家介绍其它几种常用的像素混合方法,这些方法一般在游戏中被用来处理光影效果。『Alpha-Blending』 前次已经说了,所谓Alpha-Blending,其实就是按照“Alpha”混合向量的值来混合源像素和目标像素,一般用来处理半透明效果。『Additive-Blending』 至于A转载 2014-08-22 11:33:24 · 2257 阅读 · 0 评论 -
256色调色板的匹配处理
有一天一个朋友问我如何使几张256色图片的条色板得到统一?如何在256色模式中实现Alpha混色,明暗等处理。问题很经典,我长期从事SDK研究所以这个是课题中不可少的一部分。结论在于不仅解决了调色板匹配问题。而且同时给出了一个相对目标调色板的查找表 charrgb_map[32][32][32]的查找表(RGB->256),相应RGB色可以在这张表里通过rgb_map[r][g][b]查到转载 2014-08-22 11:33:27 · 4100 阅读 · 0 评论 -
拾取操作的实现[OpenGL]
OpenGL中采用一种比较复杂的方式实现了拾取操作,即选择模式。选择模式是一种绘制模式,它基本思想是在一次拾取操作时,系统根据拾取操作的参数(如鼠标位置)生成一个特定视景体,然后由系统重新绘制场景中的所有图元,但这些图元并不会绘制到颜色缓存中,系统跟踪有哪些图元绘制到了这个特定的视景体中,并将这些对象的标识符保存到拾取缓冲区数组中。 在OpenGL中实现拾取操作主要包括以下步骤。转载 2014-08-22 11:34:24 · 1273 阅读 · 0 评论 -
Designing for Performance
To summarize, do not strive to write fast programs — strive towrite good ones; speed will follow. Do think about performanceissues while you're designing systems and especially while you'redesignin原创 2014-08-22 11:35:16 · 652 阅读 · 0 评论 -
NAT穿透
一、什么是NAT?为什么要使用NAT?NAT是将私有地址转换为合法IP地址的技术,通俗的讲就是将内网与内网通信时怎么将内网私有IP地址转换为可在网络中传播的合法IP地址。NAT的出现完美地解决了lP地址不足的问题,而且还能够有效地避免来自网络外部的攻击,隐藏并保护网络内部的计算机。 二、NAT的分类STUN标准中,根据内部终端的地址(LocalIP:LocalPort)到NAT出转载 2014-08-22 11:51:35 · 912 阅读 · 0 评论 -
MMX版本的Alpha Blend算法实现
这次我们的目标是:超越普通的CPU玩家,用CPU的母语来优化程序!实验器材:VC++ 4.2以上的编译器或C++ Builder4.0以上编译器MMX技术到现在来说可以算是基本大众化了,目前大多数个人电脑都应该能支持它。P55C,K6,PII,PIII...按照惯例,Intel公司将在以后的x86版本永远支持它。要了解MMX指令体系,请一定浏览以下URL,获得系统的MMX体系知识:ht转载 2014-08-22 11:33:29 · 1524 阅读 · 0 评论 -
RSA加密与DES加密比较
对称钥匙加密系统是加密和解密均采用同一把秘密钥匙,而且通信双方都必须获得这把钥匙,并保持钥匙的秘密。 非对称密钥加密系统采用的加密钥匙(公钥)和解密钥匙(私钥)是不同的。 对称加密算法用来对敏感数据等信息进行加密,常用的算法包括:DES(Data EncryptionStandard):数据加密标准,速度较快,适用于加密大量数据的场合。3DES(TripleDES原创 2014-08-22 11:49:58 · 5236 阅读 · 0 评论 -
(b3 << 24) >>> 8细节
public int readInt() throwsIOException { int b1 = is.read();//不能使用byte 不b1=is.read,应为只有转换成int才有32位,能进行后面的移位运算。 int b2 = is.read(); int b3 = is.read(); int b4原创 2014-08-22 11:35:23 · 981 阅读 · 0 评论
分享