Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Color Diffferance in React-three-fiber

In React three fiber when using both meshBasicMaterial and when using meshStanderard material in the component used to render a box with an image texture, the texture looks different than the original image. I have tried putting colorManagement={false}> in the canvas component,but nothing changed. Thanks in advance.

In React Three Fiber

In React Three Fiber

Original Images Used Original React Logo

Original Js Logo

Code Used

function Element( props ) {
const ref = useRef()
props = props.props
useFrame((state, delta) => (ref.current.rotation.y += 0.01))
const texture = useLoader(TextureLoader, props.texture)
return (
    <mesh
    ref={ref}
    position={props.position}
    rotation={[0,0,-10]}
    >
        <boxGeometry args={[1,0,1]}/>
        <meshBasicMaterial map={texture} texture={'sRGB'} transparent={true} />
    </mesh >
)

}


const CameraControls = () => {
const {
    camera,
    gl: { domElement },
} = useThree();
// Ref to the controls, so that we can update them on every frame using useFrame
const controls = useRef();
useFrame((state) => controls.current.update());
return <orbitControls ref={controls} args={[camera, domElement]} />;
};

export default function App() {
return (
    <>
        <div style={{
            height: '100vh',
            width: '100vw',
        }}>
            <Canvas>
                <CameraControls />
                <ambientLight color={ '#ffffff' } intensity={.5}/>
                <group>
                    <Element props={{texture: 'react.png', position: [1,1,0]}}/>
                    <Element props={{texture: 'js.png', position: [3,3,-2]}}/>
                </group>


            </Canvas>
        </div>
    </>
);
}

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

as seen in Color differences between threejs + vanilla js and react-three-fiber + create-react-app This worked although not the answer on that thread it worked better than what was chosen as the answer. <Canvas gl={{ antialias: true, toneMapping: NoToneMapping }} linear>

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!