随笔分类 -  开发随笔

摘要:《Introduction to 3D Game Programming with DirectX 9.0》的2.5节介绍了一种简易的卡通渲染方法:卡通渲染是一种特定类型的非写实渲染(non-photorealistic rendering),有时被称作风格化渲染(stylistic rendering)。卡通渲染主要有两个特征:1.明暗间过渡是不连贯,非平滑过渡。2.轮廓边一般会被勾出。要实现卡... 阅读全文
posted @ 2004-08-19 13:07 Pointer 阅读(2045) 评论(2) 推荐(0)
摘要:转换顶点到裁减坐标系中的两种方式 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;gl_Position = ftransform();转换顶点到眼坐标系中 vec4 ecPosition;vec3 ecPosition3; // in 3 space// Transform vertex to eye coordinates... 阅读全文
posted @ 2004-08-16 22:49 Pointer 阅读(853) 评论(0) 推荐(0)
摘要:程序判断片断是处于砖块位置还是水泥位置,然后分别进行着色。程序流程 使用内置函数说明: vec2 floor (vec2 x): Returns a value equal to the nearest integer that is less than or equal to x. vec2... 阅读全文
posted @ 2004-08-04 13:56 Pointer 阅读(3043) 评论(0) 推荐(1)
摘要:一个简单的逐顶点光照模型。光照效果由散射光和镜面反射光构成。程序流程 转化顶点与法线到当前的眼坐标系中vec3 ecPosition = vec3 (gl_ModelViewMatrix * gl_Vertex);vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal);得到 顶点->光源向量 与 顶点->观察点向量vec3 lig... 阅读全文
posted @ 2004-08-02 14:13 Pointer 阅读(1304) 评论(0) 推荐(0)
摘要:前几天学习骨骼模型,做了一个MD5Loader。因为没有用到GlossMapping BumpMapping,所以模型显得非常丑陋。Errr....打算不久后用GLSL完善一下,希望在DOOM3正式发售之前能够搞定。: ) 阅读全文
posted @ 2004-07-26 10:43 Pointer 阅读(684) 评论(0) 推荐(0)
摘要:嗯...在BLOGCN张帖代码什么的非常不方便,于是换到这里。把有价值的东西补贴一下先。 阅读全文
posted @ 2004-07-25 10:42 Pointer 阅读(481) 评论(0) 推荐(0)