glsl
How to render depth linearly in modern OpenGL with gl_FragCoord.z in fragment shader?
I read lots of information about getting depth with fragment shader. such as http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519[详细]
2023-04-13 10:06 分类:问答Can you use glVertexAttribPointer to assign a smaller vector to a larger one?
From section 5.8 of The OpenGL® ES Shading Language (v1.00, r17) [PDF] (emphasis mine): The assignment开发者_运维技巧 operator stores the value of the rvalue-expression into the l-value and returns[详细]
2023-04-12 10:49 分类:问答Problems trying to apply shader to vertex array in OpenGL using C++
I have 4 dimensional vertices(X,Y,A,B) that I\'d like to draw as 6 separate 2D plots (XxY, XxA, XxB, YxA, ...)[详细]
2023-04-12 07:40 分类:问答GLSL PointSprite for particle system
I\'m using an ParticleSystem with PointSprites (inspired by the Cocos2D Source). But I wonder how to rebuild the functionality for OpenGL ES 2.0[详细]
2023-04-12 03:04 分类:问答OpenGL/GLSL - Writing A Smart Texture Shader
Let\'s say my texture is 256x256 pixel. It contains 16 sub-textures of 64x64 pixel. The sub-textures are to be rendered to quads. To increase performance I want to pass discrete values to the shader w[详细]
2023-04-11 12:15 分类:问答What is supposed to happen with the transpose flag for glUniformMatrix with non-square matrices?
I encountered what seemed to me as strange behavior using glUniformMatrix4x3fv. Specifically when I give TRUE as for the transpose flag entire rows of my matrices are missing in my shader variable (an[详细]
2023-04-11 09:02 分类:问答GLSL - Equivalent Of "layout (location = 1)" In #version 130
I am reading a tutorial about openGL 3.3 (where naturally GLSL 330 is in use). Unfortunately my hardware is limited to openGL 3.0 (where GLSL 130 is the newest format). In GLSL 130 the syntax[详细]
2023-04-11 05:49 分类:问答Displaying multiple frames of a video element simultaneously
Some background: graphics newbie here, have just dipped my toes into the world of 3D in the browser with mrdoob\'s excellent three.js. I intend to go through all the tuts at http://learningwebgl.com/[详细]
2023-04-10 23:23 分类:问答Shader GLSL file Not compiling
I am writing my first program using OpenGL, and I have gotten to the point where I am trying to get it to compile my extremely simple shader program. I always get the error that it failed to compile t[详细]
2023-04-10 11:06 分类:问答Glsl mod vs Hlsl fmod
I\'ve implemented the spiral GLSL shader described in this question in HLSL, but the results are not the same.I think it\'s because of the mod function in GLSL that I\'ve translated to fmod in HLSL.I[详细]
2023-04-09 07:41 分类:问答