All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

How to use data kept on GPU after model inference with tensorflow.js v3.13.0?

I just got aware of a new feature in tfjs v3.13.0 (see https://github.com/tensorflow/tfjs/pull/5953). I am trying to use the new dataToGPU() method of Tensors to keep my model output on the GPU, since ...
0
votes
0answers
20 views

Flatten Sampler2D to 1D WebGL

I'm encoding a large array into a texture that I can reference in my glsl shader. The array is far to long to encode in a 1d array, so I encoded it as a 2d array. Now I would like to reference each ...
0
votes
1answer
55 views

"Scan Through" a large texture glsl

I've encoded some data into a 44487x1.0 luminance texture: Now I would like to "scrub" this data across my shader, so that a slice of the texture equal in width to the pixel width of my ...
0
votes
0answers
65 views

How to set texel invisible depending on a texture from another object

Introduction I want to be able to create a sort of fog of war for my app using shaders. I feel that I might be close, but I can't figure out how to make it work… (maybe I don’t have the right approach ...
-2
votes
0answers
51 views

Why does the WebGL shader gives me a syntax error?

I just started learning Three.js and am trying to make my first project, but the shader gives me a silly Uncaught SyntaxError: Unexpected token '{' I don't know why. Everything looks good, I think. So ...
1
vote
1answer
49 views

How to add custom shadermaterial to an obj 3D object in Three.js

The following is a working example with ObjLoader for 3D object. Is there anyone that can teach me how to add shader material to this 3D object? Most tutorials are like using standard three.geometry ...
0
votes
0answers
16 views

Tile vertex positions but group them in a way vertex

I'm looking for a simple calculation where I can tile verticies. When I use mod function for that it works but since verticies are being rendered as triangles it glitches. So somehow I need to tile ...
1
vote
1answer
32 views

Apply transformation in a fragment shader

I know that I can perform a transformation(rotation,scale) in the vertex shader. However I wonder if I can do the similar thing in the fragment shader. shadertoy.com - transformation_in_fragment_shade ...
0
votes
0answers
45 views

How is it possible to change the position of an object consisted of points floating around a center in Three Js?

So I have made this galaxy object consisted of points floating around its center const parameters = {} parameters.count = 4500 parameters.size = 0.005 parameters.radius = 0.7 parameters.branches = 4 ...
1
vote
1answer
89 views

How to run a shader from shadertoy in your js file with webgl and glsl [closed]

Im new to programming shaders and i want to create a shader with webgl and glsl. To see how it really works i want to test a shader from shadertoy. But how do you take the code from shadertoy and ...
2
votes
2answers
77 views

How do you increase the space between pixels in a fragment shader?

I'm currently working on a shader for a very mundane effect I'd like to achieve. It's a little bit hard to explain, but the basic gist is that I'm trying to "pull apart" the pixels of a ...
3
votes
0answers
181 views

gl-react show pixelated border when I try to render png with transparency

I'm building an app that let you take a picture and remove background (with machine learning). Now, when I press "Brightness" button app open a screen where I render gl-react. This is code: ...
0
votes
0answers
48 views

Texturing a geometry using WebGL shader

I'm new to texturing and shading in WebGL. The problem is I want to color a sphere with a gradient color but when I use gl_FragColor = vec4(vUv, 0.0, 1.); There is a line on the surface . After that, ...
1
vote
1answer
113 views

WebGL2 : cannot set uniform float

Let's say I have a program that I have compiled and linked using a vertex shader and a fragment shader in WebGL2. Here what my shaders look like : var vertex_shader = gl.createShader(gl.VERTEX_SHADER);...
1
vote
1answer
18 views

Where to store cached data for access within vertex shader?

Is there a reasonable place to store computed data for a vertex shader that is computed once, and then used many times (i.e. for each vertex)? I'm writing a shader that follows a catmull-rom curve, ...

15 30 50 per page
1
2 3 4 5
37