openGL
文章平均质量分 70
aquathinker
这个作者很懒,什么都没留下…
展开
-
FreeImage读取纹理,在OpenGL中实现透明纹理
FreeImage 是一款免费的、开源的、跨平台(Windows 、Linux 和Mac OS X )的,支持20 多种图像类型的(如BMP 、JPEG 、GIF 、PNG 、TIFF 等)图像处理库。其最大优点就是采用插件驱动型架构,具有快速、灵活、简单易用的特点,得到了广泛使原创 2011-07-22 14:05:55 · 2264 阅读 · 0 评论 -
GLSL 高级教程 – Geometry Shader Examples
In this page a set of examples of simple geometry shaders will be provided, to illustrate some of the features mentioned in the previouspage.Example 1 – a pass-through shaderThis example assu转载 2012-07-26 16:44:35 · 879 阅读 · 0 评论 -
GLSL 高级教程 – Fragment Shader
A fragment shader processes…fragments. The fragments that were discovered in the rasterization process, and whose attributes were computed in the interpolation phase, are now fed, one by one, to the f转载 2012-07-26 17:36:50 · 2537 阅读 · 0 评论 -
GLSL 高级教程 – Introduction
This will be the updated version of GLSL tutorial. Only the core version will be dealt in here. For compatibility features please go to the original GLSL 1.2 Tutorial.The tutorial is, and will be in转载 2012-07-26 15:23:59 · 650 阅读 · 0 评论 -
GLSL 高级教程 – Tessellation
Tessellation is a stage in the graphics pipeline that receives patches as inputs and generates new primitives which can be points, lines, or triangles.A patch is an array of vertices whose attribute转载 2012-07-26 16:07:08 · 861 阅读 · 0 评论 -
GLSL 高级教程 – Rasterization and Interpolation
This section deals with two important concepts for understading graphic pipelines: rasterization and interpolation. These are fixed components of the graphics pipeline, i.e. they are not programmable.转载 2012-07-26 17:10:51 · 967 阅读 · 0 评论 -
常用光照模型汇总:Lambert/Phong/Blinn-Phong光照模型
最近在钻研Unity3D Shader中的各种渲染效果,自然涉及到各种光照模型的使用,还记得三年前Computer Graphic课有讲过,不得不感慨How time fly...废话少说,进入正题:Lambert漫反射光照模型属于经验模型,主要用来简单模拟粗糙物体表面的光照现象,此模型假设物体表面为理想漫反射体(也就是只产生漫反射现象,也成为Lambert反射体),同时,场景中存在两种光,一原创 2012-11-12 22:11:52 · 5901 阅读 · 0 评论 -
基于物理的镜面BRDF反射模型详解
(一)概述大多数镜面BRDF模型可以分解为多个乘积项:Fresnel项、几何衰减项及N/V/L等多个参数,其中,一个不变的rho_s项用来缩放其强度,m项用来表示粗糙度参数,这样每条光线总的镜面反射为:specularLight += lightColor*rho_s*specBRDF(N,V,L,m,eta)*saturate(NdotL);NOTE:在BRDF的定义中,Ndot原创 2012-11-18 19:05:54 · 3547 阅读 · 0 评论 -
切线空间(Tangent space)详解
题记:法向量的变换矩阵为“顶点变换矩阵的逆矩阵的转置”,具体原因见http://blog.csdn.net/aquathinker/article/details/6610731切线空间在法线贴图中有着重要作用,通常需要把灯光转换到切线空间进行计算(考虑到现有的图形硬件,完全没有这个必要)。对由参数方程计算出的规则曲面(比如,球体,圆环)来说,很容易通过方程计算出切线空间,但对任意的三角形原创 2012-12-20 16:56:51 · 3429 阅读 · 0 评论 -
投影纹理映射(Projective Texture Mapping)详解
投影纹理映射(Projective Texture Mapping)目的是映射一张纹理到物体上,就像将幻灯片投影到墙上一样。该方法不需要在应用程序中指定顶点纹理坐标,实际上,投影纹理映射中使用的纹理坐标是在顶点着色程序中通过视点矩阵和投影矩阵计算得到的,通常也被称作投影纹理坐标(coordinates in projective space)。而我们常用的纹理坐标是在建模软件中通过手工调整纹理和3原创 2012-12-21 11:01:24 · 2945 阅读 · 0 评论 -
GLSL 高级教程 – Primitive Assembly
The primitive assembly stage receives as input the processed vertices from the vertex shader, and the vertex connectivity information from the application as specified by in the glDraw* family of Open转载 2012-07-26 15:56:49 · 1406 阅读 · 0 评论 -
GLSL 高级教程 – Pipeline (OpenGL 3.2 – OpenGL 4.2)
Below is a simplified diagram of the pipeline for OpenGL from version 3.2 forwards. In the next sections each stage will be described. The numbers in parenthesis indicate which OpenGL version is requi转载 2012-07-26 15:28:02 · 655 阅读 · 0 评论 -
billboard 的OpenGL实现&&OpenGL多线程创建纹理
http://hi.baidu.com/atyuwen/blog/item/5355f17370ef9b1b8701b098.html虚拟现实技术与算法的大作业需要用到billboard技术,写了这样一个类来实现。很简单的一个类,完整的代码如下://---------------转载 2011-07-21 12:54:22 · 1454 阅读 · 0 评论 -
着色语言(Shader Language),以及HLSL VS GLSL VS CG
摘抄“GPU Programming And Cg Language Primer 1rd Edition” 中文名“GPU编程与CG语言之阳春白雪下里巴人” In the last year I have never had to write a single HLSL/GLSL shader. Bottom line, I can’t think of any reason转载 2011-07-20 21:41:05 · 959 阅读 · 0 评论 -
GLSL 初级教程 – Vertex Processor
The vertex processor is responsible for running the vertex shaders. The input for a vertex shader is the vertex data, namely its position, color, normals, etc, depending on what the OpenGL application转载 2012-07-26 15:05:52 · 708 阅读 · 0 评论 -
GLSL 高级教程 – Vertex Shader
A vertex shader operates on individual vertices, one vertex at a time. The shader has no knowledge of the other vertices that make up the graphical primitive, and has no clue of what type of primitive转载 2012-07-26 15:45:49 · 1668 阅读 · 0 评论 -
GLSL 高级教程 – Geometry Shader
The geometry shader is part of the specification since OpenGL 3.2.This stage is optional. When present, a geometry shader receives as input the primitives assembled in the previous stage. A geometry转载 2012-07-26 16:26:53 · 1306 阅读 · 0 评论 -
GLSL 初级教程 – Introduction
In this tutorial shader programming using GLSL 1.2 will be covered. Shaders are a hot topic and 3D games have shown that they can be put to good use to get remarkable effects. This tutorial aims at pr转载 2012-07-26 14:44:24 · 731 阅读 · 0 评论 -
GLSL 初级教程 – Pipeline Overview
The following figure is a (very) simplified diagram of the pipeline stages and the data that travels amongst them. Although extremely simplified it is enough to present some important concepts for sha转载 2012-07-26 15:02:12 · 722 阅读 · 0 评论 -
GLSL 初级教程 – Fragment Processor
The fragment processor is where the fragment shaders run. This unit is responsible for operations like:Computing colors, and texture coordinates per pixelTexture applicationFog computationComputin转载 2012-07-26 15:18:06 · 762 阅读 · 0 评论 -
OpenGL programming with GLSL: Part I
The standards of OpenGL/GLSL are evolving constantly, we enter to the era of programmable graphic pipeline at the same time, however, the new interface functions also make it a bit complicated. And原创 2013-08-03 08:27:52 · 1018 阅读 · 0 评论