Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
0 answers
28 views

When using PlaneGeometry with ShaderMaterila my browser throws "Program Info Log: Fragment shader is not compiled."

I am new to Three.js and running on version 0.167.0 of Three.js. I am trying to create a PlaneGeometry with ShaderMaterial, but I get an error and nothing renders in the scene. Here is my code snippet....
Sumit Dubey's user avatar
-1 votes
0 answers
7 views

border around 2D shape shader

I am writing a shader for threeJS to draw a frame around a shape geometry, (usually a rotated rectangle but could have point points potentially). I am passing the corners -2D points- to the shader ...
ventoline's user avatar
0 votes
1 answer
58 views

Normal map BG image for website, with fixed light source

I would like to be able to use normal maps in my site's background images. This CodePen example seems to be the best from all the implementations I've seen so far. It uses three.js to achieve the ...
Mentalist's user avatar
  • 1,667
0 votes
1 answer
16 views

When using points in ThreeJS there is a black background on each point if using depth writing

I have a scene where I use points, like so <points ref={gPoints} position={position}> <bufferGeometry attach="geometry"> <bufferAttribute ...
user25766836's user avatar
0 votes
1 answer
66 views

How to get sharp edge with particles

This is my current output: Torus with crooked edges As you can see, the edges are “blocky”. This is already using round particles through discarding pixels in the Points material custom fragment ...
Nameless's user avatar
0 votes
1 answer
74 views

Generate height map from a mesh

<!--B"H--> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <...
Awtsmoos--עצמות's user avatar
1 vote
0 answers
60 views

GLSL shader difference between desktop and mobile - varyings or noise function?

Context I'm building a WebGL GLSL shader using a 3d Perlin Noise function to warp the vertices as well as color the fragments so they line up with the vertices. I'm running the Perlin Noise function ...
Andy Ray's user avatar
  • 31.6k
0 votes
0 answers
48 views

Chromakey (green screen) video via shaders and custom material?

I have been unable to utilize custom shaders and a custom material to properly key out (remove) the green background from a video. The video used was here: https://youtu.be/ZXsQAXx_ao0?feature=shared ...
VILLMER's user avatar
0 votes
1 answer
128 views

How To Customize Alpha Transparency in Augmented Fragment Shader of Three.js Material?

I'm extending the THREE.MeshStandardMaterial with onBeforeCompile to adjust some details of the shader. I got the vertex shader working fine, but I'm having trouble figuring out how to set the alpha/...
Nicholas Westby's user avatar
0 votes
0 answers
41 views

Three.js how to determine if backfacing in a RawShaderMaterial that's double sided and transparent?

In Three.js, I'm trying to create a fresnel based glowing outline on a sphere, with a RawShaderMaterial, on a double sided transparent sphere. The RawShaderMaterial GLSL is a fairly straightforward ...
Andy Ray's user avatar
  • 31.6k
0 votes
0 answers
36 views

Enabling transparency on objects rendered to render texture makes them disappear completely on iOS - React Three Fiber

In React Three Fiber, I'm rendering objects to a render texture in a separate scene using an orthogonal camera, and I want to use that texture back in my main scene in a custom shader. I have this all ...
Sam Strong's user avatar
0 votes
1 answer
93 views

Three.js using EffectComposer renderTarget texture is causing flickering / strobing

I want to pass the texture of one effect composer into another to be able to blend multiple effects together. The code is based of the following example https://threejs.org/examples/?q=bloom#...
The Sloth's user avatar
  • 377
0 votes
1 answer
147 views

ThreeJS r160 ShaderMaterial Texture Renders Black

I'm trying to add a texture into this shader, but when I do it renders black. I'm probably missing something small, but I couldn't find any info on this for ThreeJS version r160. The shader code is ...
M1ke's user avatar
  • 259
1 vote
1 answer
126 views

Three.js "Fragment shader is not compiled" error when using flat shading

I'm loading a model in three,js using GLTFLoader. It works fine, except I'm trying to use flat shading. If I set flatShading = true, I get an error saying that the fragment shader is not compiled. ...
nanoguy's user avatar
  • 631
0 votes
0 answers
63 views

How to reduce the gray-line artifacts in three.js isosurface rendering of 3D texture example?

the isosurface example in the three.js website shows gray-line artifacts over the surface, please see https://threejs.org/examples/webgl2_materials_texture3d.html the glsl shader source code is here ...
FangQ's user avatar
  • 1,520

15 30 50 per page
1
2 3 4 5
40