新渲染器Shader自动生成器原型完成,简单示例已可正常工作
11 2 月, 2011 by admin 无评论 »説到底,虽然是简单的3个示例:一个画3角形,一个画立方体,一个画网格。但依然让人很烦,因为三个示例对数据的依赖不同。
画三角形需要:顶点颜色
画立方体需要:全局颜色、顶点法线
画平面网格需要:全局颜色、全局法线
所以我必须为每一个示例都编写各自的Vertex Shader与Fragment Shader,以及对应的赋值代码,十分的繁琐。
忙碌一天,基本的Shader自动生成器终于完成,三个示例完美测试通过。
明天又将是忙碌的一天。
新渲染器OpenGL Core Profile模式基础物终于完成
30 1 月, 2011 by admin 无评论 »同上篇的三角形一样,虽然只是2个普通的方块,但它们确需要很高端的显卡。全OpenGL 3.3/4.1 Core Profile编程,文末附Shader.
#version 330
uniform mat4 projection_matrix;
uniform mat4 modelview_matrix;
in vec3 Vertex;
in vec3 Normal;
out vec3 fragment_normal;
void main(void)
{
fragment_normal=(modelview_matrix*vec4(Normal,0.0)).xyz;
gl_Position=projection_matrix*modelview_matrix*vec4(Vertex,1.0);
}
fragment_shader:
#version 330
in vec3 fragment_normal;
uniform vec4 color;
layout(location = 0, index = 0) out vec4 fragColor;
void main(void)
{
float intensity=max(dot(fragment_normal,vec3(0.0,0.0,1.0)),0.0);
fragColor=color*intensity;
}
《古月》旧渲染引擎版本继续,新渲染引擎用于下一代
18 1 月, 2011 by admin 无评论 »看到这一则声明,可能很多朋友有朝令夕改的感觉。刚説的旧版不再继续,结果现在又宣布要继续了。
其实本质上还是差不多的,因为新的渲染器影响到的内容太多,会导致整个引擎大部分重制。这样相比下载,还不如直接重构制作下一代。
所以我们决定继续旧渲染器的《古月》v18版本,下一代的《古月》v19才会用上全新的渲染器。
Ogg、Vorbis、Theora插件例行更新
14 1 月, 2011 by admin 无评论 »更新LibOgg到1.2.2、更新LibVorbis到1.3.2
libvorbis 1.3.2 (2010-11-01) — “Xiph.Org libVorbis I 20101101 (Schaufenugget)”
- vorbis: additional proofing against invalid/malicious streams in floor, residue, and bos/eos packet trimming code (see SVN for details).
- vorbis: Added programming documentation tree for the low-level calls
- vorbisfile: Correct handling of serial numbers array element [0] on non-seekable streams
- vorbisenc: Back out an [old] AoTuV HF weighting that was first enabled in 1.3.0; there are a few samples where I really don’t like the effect it causes.
- vorbis: return correct timestamp for granule positions with high bit set.
- vorbisfile: the [undocumented] half-rate decode api made no attempt to keep the pcm offset tracking consistent in seeks. Fix and add a testing mode to seeking_example.c to torture test seeking in halfrate mode. Also remove requirement that halfrate mode only work with seekable files.
- vorbisfile: Fix a chaining bug in raw_seeks where seeking out of the current link would fail due to not reinitializing the decode machinery.
- vorbisfile: improve seeking strategy. Reduces the necessary number of seek callbacks in an open or seek operation by well over 2/3.
新3D渲染器今日进度(WIP),像机控制漫游完成
7 1 月, 2011 by admin 无评论 »在最新的版本中完成了像机控制,下面这个例子的截图有一部分朋友可能在一年前的渲染器中见过,那一版失败了。虽然这一版从效果上看和旧版并无区别,但在处理上却有着本质上的差别。
旧版的像机控制使用 gluLookAt函数实现,所有的矩阵变换也全部依赖OpenGL API。而在这一版中,所有的全局变换矩阵运算完全在CPU完成。








