24 questions
1
vote
2
answers
138
views
GLSL shader not showing anything in scene in THREE.js - why?
I'm trying to make my own shader for a THREE.js project I'm working on, and I wanted to make a GLSL shader as part of it for one of the meshes in my scene. However, despite writing very basic code for ...
0
votes
1
answer
31
views
Why is the animation of the plane not being rendered as the uTime is being altered as the elapsed time is changed everyframe?
I am trying to create a flag like animation by constructing a vertex shader that takes inputs of uFrequency and uTime. I got the vertexshader right but the animation while change in seconds isn't ...
2
votes
0
answers
152
views
How to Implement ShaderToy in Threejs ShaderMaterial?
I am very new in Threejs as well as in ShaderMaterial. And also zero knowledge in GLSL or C/C++.
How to convert the ShaderToy code into Threejs uniforms, vertexShader, fragmentShader?
I want to make ...
1
vote
0
answers
93
views
Three js - shaders on scroll
I'm trying to integrate the 3d object found on this codrops demo: https://tympanus.net/Tutorials/ShadersOnScroll/.
I'm trying to get the same effect but I would like the object to stay the same color ...
1
vote
0
answers
137
views
THREE.JS postprocessing: Duplicating postprocessed shader material to render properly on different meshes in the same scene
Think of my question as a more complicated version of this question here:
Three.js, sharing ShaderMaterial between meshes but with different uniform sets
tl;dr: I'm relying on a skin shader from ...
0
votes
0
answers
298
views
How to add particular texture to particular faces of BoxGeometry using ShaderMaterial in THREE.JS?
I am trying to add texture for each face of BoxGeometry.
I have tried passing an array of ShaderMaterial object into the mesh but its not working.
createMaterials(texture){
return new ShaderMaterial({...
0
votes
0
answers
976
views
Add normalMap to ShaderMaterial
I am trying to add multiple textures on the same object in Three.js. I have a 3d T-shirt and the following elements as .png for the T-shirt textures:
The front, back and sleeves of the T-shirt:
The ...
2
votes
1
answer
1k
views
Image rendered from useLoader @react-three/fiber using shaderMaterial has different color from its original color
Here is my problem, my project is generated from create-react-app, followed by some @react-three/fiber and glsl dependencies, I render simple planeBufferGeometry and for the material I use ...
0
votes
1
answer
1k
views
Implement lights and shadows in ShaderMaterial in Three.js r136
What is the current solution in r136 to blend lights, shadows and color in a ShaderMaterial ? I already found the solution for the fog support.
I found some examples in previous revision (r108) like ...
2
votes
1
answer
2k
views
ThreeJS Points (Point Cloud) with Lighting using custom Shader Material
Coded using:
Using ThreeJS v0.130.1
Framework: Angular 12, but that's not relevant to the issue.
Testing on Chrome browser.
I am building an application that gets more than 100K points. I use these ...
0
votes
1
answer
93
views
UNITY3D - Pink prefab because of BumpedDiffuse shader
I'm trying to download assetBundle from server and unzip it. All is working fine with Standard Shader Material (u can see it on the video).
But if material in assetBundle is Mobile/BumpedDiffuse so ...
-2
votes
1
answer
1k
views
Three.js - How to Rotate Shader Material?
My problem is trying to get the sky to rotate on its z-axis. For example if I rotate the sky by 180 degrees the shadow from the sun light should display in the opposite direction.
The code sandbox: ...
0
votes
0
answers
91
views
Theejs - Change texture on collada element with uses ShaderMaterial
So I have this Collada (dae) export from a 3d model application for creating packaging.
I've managed to import this model in my scene with
var loader = new THREE.ColladaLoader();
loader.load("...
1
vote
1
answer
723
views
Three.js. How do I use a custom material for a scene background rather then color or texture?
The docs for scene say a color or texture can be used for scene.background. I would like to use a ShaderMaterial with my own custom shaders. How can I do this?
Specifically, I want to paint a color ...
1
vote
1
answer
883
views
threejs metaballs with dot shader
I am trying to test a simple dot shader in ThreeJS made by 2pha : https://2pha.com/demos/threejs/shaders/simple_dots.html
It seems to not work properly for metaballs using Marching Cubes : https://...