All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
379 views

How to create a proper rounded rectangle in WebGL?

I have tried to implement the answer from this question but there seems to be a bit of a problem. If you open their ShaderToys and try changing the border radius, the size (width and height) of the ...
2
votes
1answer
91 views

Can an layout(location=n) out skip an index for drawBuffers in WebGL?

I'm working on MRT in my graphics engine. An interesting point i'm at (and aim to fix) has my generated fragment shader spitting out: layout(location = 0) out vec4 thing1; layout(location = 2) out ...
1
vote
1answer
212 views

WebGL/OpenGL text labeling animated instanced shapes

I'm rendering a variable number of circles in the plane with variable size, color, and position using instancing. I'm hoping to reach on the order of 10k-100k circles/labels. in float instanceSize;...
0
votes
2answers
105 views

in webgl, mod function giving incorrect results in fragment shader if the input came from an int uniform

I am encountering something weird. If I set an int uniform passed into a fragment shader, and then do some math with it in the shader, I get different results than if I set an int variable inside the ...
0
votes
0answers
170 views

Why does WebGL's EXT_texture_filter_anisotropic force linear interpolation when magnifying

I'm beyond confused right now, I am messing with porting minecraft java to WebGL and when I set the texture parameter TEXTURE_MAX_ANISOTROPY to any value above 1.0 on the terrain texture it ...
1
vote
1answer
281 views

how to use gl_InstanceID in ANGLE_instanced_arrays?

WebGL 1 only supports GLSL ES v1.00. Instanced draw calls are supported with the ANGLE_instanced_arrays extension. The extension was so popular that it became part of WebGL 2.0 DrawArraysInstance. ...
1
vote
0answers
134 views

How to divide a texture to tiles and show border for each tile in webgl/opengl?

I am trying to work on a application that requires to split the image into dynamic x,y parts and process each part. For example : if a image is of dimensions 500 X 800, where width is 500 and 800 is ...
1
vote
1answer
40 views

Render several graphs from single vertex buffer

I have a vertex buffer containing several (in this case 2) graphs in the following structure: var vertices = [ x0, y00, y10, x1, y01, y11, x2, y02, y12, ... xn, y0n, y1n ]; and its ...
0
votes
1answer
462 views

Image resize with large scaling factor

For context, this question followed this one. The intent of this shader is to have a predictable image resize algorithm, so that I know if the resulting image from the webgl side can be compared to ...
0
votes
1answer
244 views

Webgl - adding DEPTH_STENCIL renderbuffer prevents rendering to cubemap framebuffer

We're working in Webgl 1 and attempting to render to a cubemap using a stencil. Rendering to the cubemap on its own works fine. When we add a DEPTH_STENCIL renderbuffer it stops writing to the cubemap ...
2
votes
1answer
1k views

What happens to vertex shader `varying` variable with `highp` qualifier if high precision is unsupported in fragment shader?

In OpenGL ES 2.0 (Shading Language 1.00), does qualifying a varying vertex shader variable with the highp qualifier have any effect, such as on performance, if GL_FRAGMENT_PRECISION_HIGH is undefined? ...
1
vote
2answers
937 views

24bit depth buffer with WebGL 1.0

I've found that there's no GL_DEPTH_COMPONENT24_OES renderbuffer storage equivalent in WebGL. But there's WEBGL_depth_texture extension that I can use to make a 24_8 or 32bit depth texture. Are those ...
0
votes
0answers
196 views

Moving a line geometry with three.js using GLSL

I have a line geometry made with three.js, which I want to move as a spermatozoid (i.e. the head moves first, then all of the points along the tail move accordingly to the head) using GLSL. Here is a ...
0
votes
3answers
3k views

Morphing in WebGL shaders with mix() between more then two targets

I am trying to build an image slider using three.js and am having difficulties with wrapping my head around passing the appropriate state to the glsl shaders so I can transition between the slides. I ...
3
votes
1answer
3k views

Edge/outline detection from texture in fragment shader

I am trying to display sharp contours from a texture in WebGL. I pass a texture to my fragment shaders then I use local derivatives to display the contours/outline, however, it is not smooth as I ...

15 30 50 per page
1
2 3 4 5
7