glsl
OpenGL ES 2.0 Shader best practices
I\'ve been searching for examples of shaders in OpenGL and I\'ve seen some varying styles. Some shaders specifically use the built in types (ie. gl_Vertex) to transfer data to and from the application[详细]
2023-04-08 15:34 分类:问答using geometry shader to create new primitives types
Is it possible to output new primitive type from geometry shader other than was input? I\'d like to input a point and render a triangle. The point would be used just as center for this triangle. If no[详细]
2023-04-06 14:41 分类:问答*BaseVertex and gl_VertexID
I\'ve skimmed through the specs and OpenGL forum but couldn\'t really make sense of this: Are the *BaseVertex version of the drawing commands supposed to add to the GLSL variable gl_VertexID开发者_运[详细]
2023-04-05 07:08 分类:问答Clipping-planes in OpenGL ES 2.0
I need to clip a few hundred objects under a clipping plane in OpenGL ES 2.0 and would appreciate ideas from people more experienced with this subset of OpenGL.[详细]
2023-04-04 11:43 分类:问答How does a GLSL sampler determine the minification, and thus the mipmap level, of a texture?
I am working with OpenGL ES (via WebGL), but I think this question is applicable to the full OpenGL profile as well.[详细]
2023-04-03 17:11 分类:问答OpenGL: debugging "Single-pass Wireframe Rendering"
I\'m trying to implement the paper \"Single-Pass Wireframe Rendering\", which seems pretty simple, but it\'s giving me what I\'d expect as far as thick, dark values.[详细]
2023-04-03 14:58 分类:问答Why is glGetUniformLocation failing me?
I found Gwen a few days ago and thought it looked like the perfect GUI toolkit for my project.But oh, dear, look at all that OpenGL 2 code in the renderer.So I thought I\'d write an OpenGL 3 renderer[详细]
2023-04-03 14:22 分类:问答glBlendFunc Disables Shader
I have a very simple shader (just sets a background square to green) and this works perfectly. I recently added in some quads that have a texture applied to them. This texture has 开发者_运维技巧some[详细]
2023-04-03 11:53 分类:问答Light Direction and its Transformation in the Simplest Lighting Model
So, I\'ve gotten to basic lighting in my OpenGL learning quest. Imagine this simplest lighting model. Each vertex has a position, color, and normal. The shader gets the ModelViewProjection matrix (M[详细]
2023-04-02 19:11 分类:问答WebGL: glsl attributes issue, getProgramParameter returns wrong number of attributes
I\'m making a simple WebGL demo. I have a simple vertex shader that takes two attributes and some uniforms. Here is the code:[详细]
2023-04-02 17:07 分类:问答