All Questions

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

three.js MeshLine vertex implementation

I'm struggling with correct vertex shader implementation for fat lines. I tried using spite/MeshLine, but it hasn't proper mitering which is a must for me. Therefore I started my own implementation (...
1
vote
0answers
188 views

Exact same WebGL code renders differently on different devices

I'm fairly new to shaders, just started playing with them in VisionsOfChaos for Android around a year ago. I implemented my 4D fractal viewer in it (as far as I know, a completely new approach, which ...
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, ...
0
votes
0answers
49 views

Threejs, Webgl: make vertexShader use parent position/rotation as local space

I parented a vertexShader PointCloud to an animated Object3D, unfortunately the shader seems to always calculate the position of the points in WorldSpace, ignoring parent transforms (position, ...
0
votes
0answers
98 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 <!...
0
votes
1answer
79 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 ...
1
vote
1answer
148 views

Three.js what is the most performant way of changing a vertex position?

I'm new to Three.js and I ended up with 2 ways of moving the vertices of a plane. I was wondering which one of the two ways should I use in terms of performance or simply in terms of best practices. ...
1
vote
1answer
52 views

WebGL shaders not respecting shape orientation

I'm very new to WebGL, and I'm modifying an existing project that I found online to suit my needs. My camera is isometric, and I'm rendering two cubes. I'd like to have an infinite grid along the '...
3
votes
1answer
335 views

Using mat4 attribute in WebGL2

I am trying to pass a 4x4 matrix as an attribute to WebGL2 vertex shader. After following closely this SO answer, I am stuck with wrapping my head around why I can't successfully render and get a ...
0
votes
1answer
435 views

Webgl highmap by displacement mapping according to brightness of texture

I am new to webgl and opengl es ,below vertex shader show error that only produce a plan.The fragment shader is a typical one, it is not provided. uniform mat4 modelview; uniform mat4 transform; ...
0
votes
0answers
53 views

GLSL - Using an attribute which is equal to a number, is not the same as directly using the number

This doesn't work as expected (WebGL 1.0): precision highp float; ... uniform float u_time; attribute vec2 a_texCoord; attribute vec2 a_animation; varying vec2 v_texCoord; ...
0
votes
1answer
165 views

Error in calling createcanvas method of p5.js using webgl

I'm studying p5.js. While testing the example below locally, I got the following error: Here's the code I tested locally: let flower = (p) => { let size, shading; p.setup = function() { ...
1
vote
1answer
575 views

Angle between view vector and normal?

Rather standard GLSL problem. Unfortunatly although I'm familiar with the math behind it, I'm not that certain on the implementation at the webgl level. And shaders are rather tricky to debug. I'm ...
1
vote
0answers
48 views

Passing / packing attributes to web gl shader

I need help understanding how to pass an additional attribute in an existing system. I am using nexus to render my mesh. Nexus sort of uses three.js, but down the line it actually does straight calls ...
-2
votes
1answer
151 views

WEBGL: How to Color a Fractal Design within the Fragment Shader

I am looking to color a fractal within my fragment shader in an WebGL project. Within my fragment shader, I have a vec3 called Color that contains the RGB values from 0.0-1.0. To make a fractal ...

15 30 50 per page
1
2 3 4 5
7