
OpenGL
lhy_ps6
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
graphics shaders : theory and practice 2 命名规范
Prefix a Attribute (from application) aColor u Uniform (from application) uModelViewMatrix v Vertex Shader vST tc Tessellation Control Shader tcRadius te Tessellation E转载 2012-10-30 00:38:05 · 843 阅读 · 0 评论 -
opengl4.0 绑定顶点数组
glenableclientstate is depreciated VAO创建好后,我所知道的有三种绑定方法。 第一种在opengl4.0z中看到,psm也是这么做的,优点是清晰。 先在shader创建好之后绑定shader顶点输入属性 // Bind index 0 to the shader input variable "VertexPosition" glBindAttrib翻译 2012-10-28 18:54:52 · 823 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 3 Dataflow Model
转载 2012-11-01 00:51:58 · 685 阅读 · 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. Objects with 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 · 700 阅读 · 0 评论 -
做个记号,graphics shader 2的一段 tessalate
#version 400 #extension GL_ARB_tessellation_shader : enable uniform float uOuter02, uOuter13, uInner0, uInner1; layout( vertices = 16 ) out; void main( ) { gl_out[ gl_InvocationID ].gl_Position翻译 2012-10-31 22:41:01 · 531 阅读 · 0 评论 -
graphics shaders: discard vs transparency
One final additional capability in fragment shaders that should be mentioned is the discard operator. This is used to discard pixels so they will not be passed to the framebuffer. Note that this is翻译 2012-10-31 23:17:36 · 592 阅读 · 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 · 537 阅读 · 0 评论 -
graphcs shader 2的tessalate evaluation shader
beizer面片16点插值,输出顶点和法线. 1.-u就是1.0-u,看着真别扭。 #version 400 #extension GL_ARB_tessellation_shader : enable layout( quads, equal_spacing, ccw) in; out vec3 teNormal; void main( ) { vec3 p00 = gl翻译 2012-10-31 22:45:29 · 565 阅读 · 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 · 1099 阅读 · 0 评论 -
阴影贴图
opengl4.0 shading讲基础阴影贴图的部分有很多我不知道的细节,(基础阴影贴图算法当然所有书都有讲)所以干脆全部贴到下面把。P241 To 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 · 1450 阅读 · 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 · 725 阅读 · 0 评论 -
depth based tessalation (LOD)
opengl4.0 shading TCS(tessa control shader) #version 400 layout( vertices=16 ) out; uniform int MinTessLevel; uniform int MaxTessLevel; uniform float MaxDepth; uniform float MinDepth; un转载 2012-10-28 19:14:32 · 659 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) - August 6, 2012 spec Fundamental 2.2 Command Syntax
In general, a command declaration has the form rtype Name{1234}{f b s i i64 f d ub us ui ui64}{v} ( [args ,] T arg1, : : :, T argN [, args] ); 一句话表示一个函数族。{1234}暗示维度,之后类型描述符,v是vector Type Descri转载 2012-10-29 18:54:35 · 774 阅读 · 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 a single CPU thread. It is also possible for multiple contexts to share GL objects and for each such context to be bound转载 2012-10-29 20:13:56 · 733 阅读 · 0 评论 -
OpenGL 进化史
选自 Graphcs shaders : Theory and practice 2 OpenGL 2.0/GLSL 1.10 This version of OpenGL introduces shader-based graphics programming, including programmable vertex and fragment shaders and the GLSL转载 2012-10-30 00:35:00 · 708 阅读 · 0 评论 -
OpenGL 4.3 (Core Profile) -5.3 Propagating Changes to Objects
Objects that may be shared between contexts include buffer objects, program and shader objects, renderbuffer objects, sampler objects, sync objects, and texture objects (except for the texture objec转载 2012-11-10 02:17:52 · 625 阅读 · 0 评论