All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

How to implement an openGL ES2.0 shader in threeJS

The Goal I'm attempting to convert a shader written in an Android friendly GLES20 syntax to something that will work with the likes of threeJS. Most of the uniforms for the fragment shader are ...
0
votes
0answers
28 views

I change texture's color but text in the texture disappears in WebGL

I have a icon like this. I want to change the color of the texture by using webgl shader, for example I want to change yellow. I do it but text in the texture disappears. My shader code var ...
0
votes
0answers
21 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
47 views

Translate shadertoy texture to webgl not behaving the same

I'm able to translate the code and run it, but it behaves diferrent from the orginal fork. https://www.shadertoy.com/view/llS3zc --orignal https://editor.p5js.org/jorgeavav/sketches/i9cd4lE7H - ...
1
vote
1answer
33 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 ...
1
vote
1answer
96 views

How to fill the area below a curve in a glsl fragment shader?

I'm using the following code to plot a sine-wave curve: #ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; uniform float u_time; const float AMPLITUDE = 0.125; const float ...
3
votes
0answers
183 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, ...
2
votes
1answer
34 views

fragment shader Webgl ERROR: 0:7: 'return' : function return is not matching type:

I don't understand why the return type doesn't match. working with webgl ERROR: 0:7: 'return' : function return is not matching type: precision mediump float; uniform sampler2D previousState; float ...
0
votes
0answers
99 views

I cant implement this threejs file with shaders in react environment.. would really appreciate the help..Thank you

I am trying to integrate this scripts in react environment, But things are not working out for me, dependencies are just fine, if anyone can just tell me out to put things up, it will be grateful <!...
1
vote
1answer
55 views

Add blurriness to drawn elements and frag color of fragment shader

I'm currently trying to achieve an animated kind of gradient by melting 3 blobs with each other where each blob is separately animated. You can find an image of the desired result in the end. I have ...
0
votes
0answers
61 views

Three.js getShadowMask() from chunk is very slow

I am building a quite heavy shader in three.js, and it runs perfecly fine on Chrome, but slows down a lot on Firefox and mobile devices. I noticed that removing the line getShadowMask() from the ...
0
votes
1answer
81 views

How can I make my WebGL Coordinate System "Top Left" Oriented?

Because of computation efficiency, I use a fragment shader to implement a simple 2D metaballs algorithm. The data of the circles to render is top-left oriented. I have everything working, except that ...
0
votes
0answers
55 views

WebGL / GLSL - basic noise shows block/square

I'm trying to render a basic noise so i picked a noise function that i found on the internet. And it works well but when i want to move the noise along y-axis by adding my uTime value some square/...
0
votes
0answers
260 views

How to get the fragment and vertex shader code from blender?

I'm trying to apply a shader from blender to my threeJs project but unable to find any solution. how to export fragment and vertex shader data from blender (version 2.9).

15 30 50 per page
1
2 3 4 5
14