OpenGL
lhy_ps6
这个作者很懒,什么都没留下…
展开
-
graphics shaders : theory and practice 2 命名规范
Prefix a Attribute (from application) aColoru Uniform (from application) uModelViewMatrixv Vertex Shader vSTtc Tessellation Control Shader tcRadiuste Tessellation E转载 2012-10-30 00:38:05 · 813 阅读 · 0 评论 -
opengl4.0 绑定顶点数组
glenableclientstate is depreciatedVAO创建好后,我所知道的有三种绑定方法。第一种在opengl4.0z中看到,psm也是这么做的,优点是清晰。先在shader创建好之后绑定shader顶点输入属性// Bind index 0 to the shader input variable "VertexPosition"glBindAttrib翻译 2012-10-28 18:54:52 · 786 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 3 Dataflow Model
转载 2012-11-01 00:51:58 · 666 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 2.5 Objects and the Object Model
Generated names do not initially correspond to an instance of an object. Objectswith generated names are created by binding a generated name to the context.For example, a buffer object is created转载 2012-11-01 00:42:58 · 678 阅读 · 0 评论 -
做个记号,graphics shader 2的一段 tessalate
#version 400#extension GL_ARB_tessellation_shader : enableuniform float uOuter02, uOuter13, uInner0, uInner1;layout( vertices = 16 ) out;void main( ){gl_out[ gl_InvocationID ].gl_Position翻译 2012-10-31 22:41:01 · 514 阅读 · 0 评论 -
graphics shaders: discard vs transparency
One final additional capability in fragment shaders that should be mentionedis the discard operator. This is used to discard pixels so they will not bepassed to the framebuffer. Note that this is翻译 2012-10-31 23:17:36 · 568 阅读 · 0 评论 -
graphics shader 2: geometry shader
layout( triangles ) in;layout( triangle_strip, max_vertices=32 ) out;uniform float uShrink;uniform mat4 uModelViewProjectionMatrix;in vec3 vNormal[3];out float gLightIntensity;const vec3 L翻译 2012-10-31 22:53:05 · 515 阅读 · 0 评论 -
graphcs shader 2的tessalate evaluation shader
beizer面片16点插值,输出顶点和法线.1.-u就是1.0-u,看着真别扭。#version 400#extension GL_ARB_tessellation_shader : enablelayout( quads, equal_spacing, ccw) in;out vec3 teNormal;void main( ){vec3 p00 = gl翻译 2012-10-31 22:45:29 · 534 阅读 · 0 评论 -
OpenGL4.0 shader night vision效果
先将场景渲染到FBO中,然后在Fragshader中float dist1 = length(gl_FragCoord.xy – vec2(Width/4.0, Height/2.0));float dist2 = length(gl_FragCoord.xy – vec2(3.0 * Width/4.0, Height/2.0));if( dist1 > Radius && dist翻译 2012-10-31 22:25:12 · 1060 阅读 · 0 评论 -
阴影贴图
opengl4.0 shading讲基础阴影贴图的部分有很多我不知道的细节,(基础阴影贴图算法当然所有书都有讲)所以干脆全部贴到下面把。P241To create an OpenGL application that creates shadows using the shadow mapping technique,use the following steps. We'll s翻译 2012-10-28 20:44:22 · 1430 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 2.1 Execution Model
以前从来没有记笔记的习惯,现在记性不好,就开着博客编辑器一面粘贴一面总结吧。Each primitive is a point, line segment, patch, or polygon. patch就是控制面片了,用于tessalator。Data binding occurs on call. This means that data passed to a GL com转载 2012-10-29 18:16:31 · 699 阅读 · 0 评论 -
depth based tessalation (LOD)
opengl4.0 shading TCS(tessa control shader) #version 400layout( vertices=16 ) out;uniform int MinTessLevel;uniform int MaxTessLevel;uniform float MaxDepth;uniform float MinDepth;un转载 2012-10-28 19:14:32 · 629 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 2.2 Command Syntax
In general, a command declaration has the formrtype Name{1234}{f b s i i64 f d ub us ui ui64}{v}( [args ,] T arg1, : : :, T argN [, args] );一句话表示一个函数族。{1234}暗示维度,之后类型描述符,v是vectorType Descri转载 2012-10-29 18:54:35 · 751 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 2.3 Command Execution
Most of the Specification discusses the behavior of a single context bound to asingle CPU thread. It is also possible for multiple contexts to share GL objectsand for each such context to be bound转载 2012-10-29 20:13:56 · 706 阅读 · 0 评论 -
OpenGL 进化史
选自 Graphcs shaders : Theory and practice 2OpenGL 2.0/GLSL 1.10This version of OpenGL introduces shader-based graphics programming,including programmable vertex and fragment shaders and the GLSL转载 2012-10-30 00:35:00 · 673 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) -5.3 Propagating Changes to Objects
Objects that may be shared between contexts include buffer objects, programand shader objects, renderbuffer objects, sampler objects, sync objects, and textureobjects (except for the texture objec转载 2012-11-10 02:17:52 · 592 阅读 · 0 评论